From owner-freebsd-questions@FreeBSD.ORG Wed Feb 6 19:55:40 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 D38A816A41B for ; Wed, 6 Feb 2008 19:55:40 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id 69C2813C47E for ; Wed, 6 Feb 2008 19:55:40 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-25-183.bredband.comhem.se ([83.253.25.183]:58864 helo=falcon.midgard.homeip.net) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1JMqMt-00036Z-51 for freebsd-questions@freebsd.org; Wed, 06 Feb 2008 20:55:39 +0100 Received: (qmail 7442 invoked from network); 6 Feb 2008 20:55:35 +0100 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 6 Feb 2008 20:55:35 +0100 Received: (qmail 29602 invoked by uid 1001); 6 Feb 2008 20:55:35 +0100 Date: Wed, 6 Feb 2008 20:55:35 +0100 From: Erik Trulsson To: alex@schnarff.com Message-ID: <20080206195535.GA29563@owl.midgard.homeip.net> Mail-Followup-To: alex@schnarff.com, freebsd-questions@freebsd.org References: <20080206142843.8hwz8rim80sgok8g@mail.schnarff.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080206142843.8hwz8rim80sgok8g@mail.schnarff.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Originating-IP: 83.253.25.183 X-Scan-Result: No virus found in message 1JMqMt-00036Z-51. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1JMqMt-00036Z-51 8371458ca59a6d56fe86382789238b22 Cc: freebsd-questions@freebsd.org Subject: Re: df & du showing different usages for /var 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: Wed, 06 Feb 2008 19:55:40 -0000 On Wed, Feb 06, 2008 at 02:28:43PM -0500, alex@schnarff.com wrote: > After nearly running out of space on my /var partition recently, I went in > to clean things up and ensure that it didn't happen again. Using the "du" > command to look for offending directories and files, I wiped out a bunch of > old Apache and Qmail logs...and then found that I was still using 90% of > the partition. So I cd'd over to /var, and got this rather surprising set > of results: > > [alex@tms /var]$ sudo du -sh > 395M . > [alex@tms /var]$ df -h > Filesystem Size Used Avail Capacity Mounted on > /dev/ad4s1a 484M 126M 320M 28% / > devfs 1.0K 1.0K 0B 100% /dev > /dev/ad4s1f 269G 40G 207G 16% /data > /dev/ad4s1d 9.7G 7.2G 1.7G 81% /usr > /dev/ad4s1e 1.9G 1.6G 173M 90% /var > > These wildly different results have me confused. How in the world can there > be a ~1.2GB difference between the disk space in use as reported by these > two tools? Which is right? More importantly, how do I fix this? http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#DU-VS-DF -- Erik Trulsson ertr1013@student.uu.se