From owner-freebsd-questions@FreeBSD.ORG Thu Oct 30 14:38:27 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02CD01065673 for ; Thu, 30 Oct 2008 14:38:27 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id C31A18FC1F for ; Thu, 30 Oct 2008 14:38:26 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (mail.rachie.is-a-geek.net [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id D8406AFCF5B; Thu, 30 Oct 2008 06:38:25 -0800 (AKDT) From: Mel To: freebsd-questions@freebsd.org Date: Thu, 30 Oct 2008 15:38:24 +0100 User-Agent: KMail/1.9.7 References: <021f01c93a28$651752e0$2f45f8a0$@com.au> In-Reply-To: <021f01c93a28$651752e0$2f45f8a0$@com.au> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810301538.24819.fbsd.questions@rachie.is-a-geek.net> Cc: Brendan Hart Subject: Re: Large discrepancy in reported disk usage on USR partition X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 14:38:27 -0000 On Thursday 30 October 2008 01:42:32 Brendan Hart wrote: > Hi, > > I have inherited some servers running various releases of FreeBSD and I am > having some trouble with the /usr partition on one of these boxen. > > The problem is that there appears to be far more space used on the USR > partition than there are actual files on the partition. The utility "df -h" > reports 25GB used (i.e. nearly the whole partition), but "du -x /usr" > reports only 7.6GB of files. > > I have reviewed the FAQ, particularly item 9.24 "The du and df commands > show different amounts of disk space available. What is going on?". > However, the suggested cause of the discrepancy (large files already > unlinked but still held open by active processes), does not appear to be > true in this case as problem is present even after rebooting into single > user mode. > > #: uname -a > FreeBSD ibisweb4spare.strategicecommerce.com.au 6.1-RELEASE FreeBSD > 6.1-RELEASE #0: Sun May 7 04:42:56 UTC 2006 > root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 > > #: df -h > Filesystem Size Used Avail Capacity Mounted on > /dev/aacd0s1a 496M 163M 293M 36% / > devfs 1.0K 1.0K 0B 100% /dev > /dev/aacd0s1e 496M 15M 441M 3% /tmp > /dev/aacd0s1f 28G 25G 1.2G 96% /usr > /dev/aacd0s1d 1.9G 429M 1.3G 24% /var Is this output untruncated? Is df really df or an alias to 'df -t nonfs'? > #: du -x -h /usr > 2.0K /usr/.snap > 24M /usr/bin > .... > > .... > 584M /usr/ports > 140K /usr/lost+found > 7.6G /usr Is it possible that nfs directory got written to /usr at some point in time? You would only notice this with du if the nfs directory is unmounted. Unmount it and ls -al /usr/mountpoint should only give you an empty dir. -- Mel Problem with today's modular software: they start with the modules and never get to the software part.