From owner-freebsd-stable@FreeBSD.ORG Mon Nov 10 16:27:25 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 AE9F31065676 for ; Mon, 10 Nov 2008 16:27:25 +0000 (UTC) (envelope-from sclark46@earthlink.net) Received: from elasmtp-masked.atl.sa.earthlink.net (elasmtp-masked.atl.sa.earthlink.net [209.86.89.68]) by mx1.freebsd.org (Postfix) with ESMTP id 7ABBB8FC1A for ; Mon, 10 Nov 2008 16:27:25 +0000 (UTC) (envelope-from sclark46@earthlink.net) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=Gw5FiTTR6UX8c3q6GOe9p5ZgaGkKr/5U29BPe9pPv4ozJ3K5THQPVyympXHxli0C; h=Received:Message-ID:Date:From:Reply-To:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-ELNK-Trace:X-Originating-IP; Received: from [208.118.36.229] (helo=joker.seclark.com) by elasmtp-masked.atl.sa.earthlink.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1KzZbm-00006w-GS; Mon, 10 Nov 2008 11:27:22 -0500 Message-ID: <491860E9.2020400@earthlink.net> Date: Mon, 10 Nov 2008 11:27:21 -0500 From: Stephen Clark User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: Jille Timmermans References: <49185ABC.6080004@earthlink.net> <49185CDB.70702@quis.cx> In-Reply-To: <49185CDB.70702@quis.cx> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ELNK-Trace: a437fbc6971e80f61aa676d7e74259b7b3291a7d08dfec79da04cc8ee45de1623a184327b02e4ffd350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 208.118.36.229 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 Reply-To: sclark46@earthlink.net 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:27:25 -0000 Jille Timmermans wrote: > 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. >> > Thanks, I managed to find the offending process with fstat and kill it. Now: Filesystem Size Used Avail Capacity Mounted on /dev/ad0s1e 193M 666K 177M 0% /tmp $ du -sh /tmp 682K /tmp Regards, Steve -- "They that give up essential liberty to obtain temporary safety, deserve neither liberty nor safety." (Ben Franklin) "The course of history shows that as a government grows, liberty decreases." (Thomas Jefferson)