Date: Wed, 13 Jan 2010 13:57:01 +0100 (CET) From: Oliver Fromme <olli@lurza.secnetix.de> To: freebsd-fs@FreeBSD.ORG, peppe.maniscalco@gmail.com Subject: Re: A simple (?) question about fs... Message-ID: <201001131257.o0DCv1D2094652@lurza.secnetix.de> In-Reply-To: <a7599c851001130218h71c1a26bw705244e11e935d02@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001131257.o0DCv1D2094652>