From owner-freebsd-stable@FreeBSD.ORG Mon Nov 10 16:26:07 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29B1E106567D for ; Mon, 10 Nov 2008 16:26:07 +0000 (UTC) (envelope-from jille@quis.cx) Received: from mulgore.hexon-is.nl (mulgore.hexon-is.nl [82.94.237.14]) by mx1.freebsd.org (Postfix) with ESMTP id 7C8AD8FC24 for ; Mon, 10 Nov 2008 16:26:06 +0000 (UTC) (envelope-from jille@quis.cx) X-Hexon-MailScanner-Watermark: 1226938211.49569@M2lQmOEXU4QfF2HezeHecA Received: from [10.0.0.72] ([10.15.16.6]) (authenticated bits=0) by mulgore.hexon-is.nl (8.14.1/8.13.8) with ESMTP id mAAG9qOC029136; Mon, 10 Nov 2008 17:09:53 +0100 Message-ID: <49185CDB.70702@quis.cx> Date: Mon, 10 Nov 2008 17:10:03 +0100 From: Jille Timmermans User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: sclark46@earthlink.net References: <49185ABC.6080004@earthlink.net> In-Reply-To: <49185ABC.6080004@earthlink.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Hexon-MailScanner-Information: Please contact the ISP for more information X-Hexon-MailScanner-ID: mAAG9qOC029136 X-Hexon-MailScanner: Found to be clean X-Hexon-MailScanner-From: jille@quis.cx Cc: FreeBSD Stable Subject: Re: du and df don't agree X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 16:26:07 -0000 Probably some file descriptor to an unlinked file is still open. The space on disk will be freed when the last descriptor is closed. and because there is no file linked to the data, du can't see it. (iirc MySQL does this in some situaties when using temp-tables or rebuilding tables) -- Jille Stephen Clark wrote: > Why would du show 630k used by /tmp while df show 161M used > by /tmp? > > > # du -sh /tmp > 630K /tmp > # df -h > Filesystem Size Used Avail Capacity Mounted on > /dev/ad0s1a 94M 41M 45M 47% / > devfs 1.0K 1.0K 0B 100% /dev > /dev/ad0s1e 193M 161M 17M 91% /tmp > ... remaining fs info removed > > # uname -a > FreeBSD 6.1-STABLE FreeBSD 6.1-STABLE > > I have run fstat /tmp and can't find any files that are using > the space that df is claiming as being used. >