From owner-freebsd-fs@FreeBSD.ORG Wed Jan 13 12:57:20 2010 Return-Path: Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DCA5106566B for ; Wed, 13 Jan 2010 12:57:20 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id E63E38FC08 for ; Wed, 13 Jan 2010 12:57:19 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o0DCv1IO094653; Wed, 13 Jan 2010 13:57:16 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o0DCv1D2094652; Wed, 13 Jan 2010 13:57:01 +0100 (CET) (envelope-from olli) Date: Wed, 13 Jan 2010 13:57:01 +0100 (CET) Message-Id: <201001131257.o0DCv1D2094652@lurza.secnetix.de> From: Oliver Fromme To: freebsd-fs@FreeBSD.ORG, peppe.maniscalco@gmail.com In-Reply-To: X-Newsgroups: list.freebsd-fs User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Wed, 13 Jan 2010 13:57:17 +0100 (CET) Cc: Subject: Re: A simple (?) question about fs... X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-fs@FreeBSD.ORG, peppe.maniscalco@gmail.com List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 12:57:20 -0000 Giuseppe Maniscalco wrote: > On a FreeBSD 6.1 server, I can't find a way to free up space on the / > file system... Please install lsof (/usr/ports/sysutils/lsof) and execute this command: lsof +aL1 / It will list all processes that keep files (inodes) open in the root file system with a link count of zero. Killing or restarting those processes will free the space occupied by the files. Explanation: When you delete a file, but the file is still opened by a process, then the space of the file is still kept allocated in the file system. df(1) will see it, because it lists the block allocations, but du(1) doesn't see it because the directory entry of the file was already removed. That's why you see such a difference in the output between df(1) and du(1). As soon as the files are closed (which happens when the processes are killed or restarted), the space will be freed in the file system. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd Perl is worse than Python because people wanted it worse. -- Larry Wall