From owner-freebsd-questions Sat Dec 29 19:28:56 2001 Delivered-To: freebsd-questions@freebsd.org Received: from creme-brulee.marcuscom.com (rdu57-28-046.nc.rr.com [66.57.28.46]) by hub.freebsd.org (Postfix) with ESMTP id 7EE1F37B405 for ; Sat, 29 Dec 2001 19:28:51 -0800 (PST) Received: from shumai.marcuscom.com (marcus@shumai.marcuscom.com [192.168.1.4]) by creme-brulee.marcuscom.com (8.11.6/8.11.6) with ESMTP id fBU3S7539056; Sat, 29 Dec 2001 22:28:13 -0500 (EST) (envelope-from marcus@marcuscom.com) Subject: Re: du and df not consistency ? From: Joe Clarke To: sothat Cc: freebsd-questions@FreeBSD.ORG In-Reply-To: <20011230030524.GA32059@bsd.ee.ntu.edu.tw> References: <20011230030524.GA32059@bsd.ee.ntu.edu.tw> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0 (Preview Release) Date: 29 Dec 2001 22:28:59 -0500 Message-Id: <1009682944.79990.0.camel@shumai.marcuscom.com> Mime-Version: 1.0 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 2001-12-29 at 22:05, sothat wrote: > > Hi , > > I've met a weird problem the "/" is going out of space. > > Trying to find out what use the file system , I use > > du to figure it out what files use the space. Well, my thoughts would be in either /tmp or /var will give you the most trouble. It's not a good idea to leave these on the root filesystem. / should be read-only for all intents and purposes. The more writing you do to /, the more chance you have to corrupt it. > > below is df output: > > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/da0s1a 297663 255876 17974 93% / > /dev/da1s1e 297663 173693 100157 63% /usr/local > /dev/ad0s1f 992239 668380 244480 73% /usr/src > /dev/ad0s1e 2980238 2209800 532019 81% /backup > /dev/ad0s1g 4037030 2587663 1126405 70% /backup2 > /dev/vinum/vinum0 7000492 6230498 209955 97% /mnt > /dev/da2e 68798704 7827914 55466894 12% /ftp > procfs 4 4 0 100% /proc > > the "/" Used 255876 kilo byte > > But when I use du -d 1 -x in / > > 77 ./dev > 93796 ./usr > 1812 ./stand > 861 ./etc > 1 ./proc > 3965 ./bin > 714 ./boot > 1 ./mnt > 5193 ./modules > 4887 ./root > 11776 ./sbin > 17965 ./tmp > 2468 ./var > 4 ./modules.old > 2 ./ftp > 1 ./mnt2 > 1 ./backup > 1 ./backup2 > 49 ./lost+found > 153189 . > > I just got 153189 kilo. > > why the df output and du got the different result ? > ( I've sync many times :) What does echo $BLOCKSIZE report? What version of FreeBSD is this? With 4.5-PRE, and BLOCKSIZE set to K, I get fairly consistent df/du reporting. Also, du may report different values if you run it as a non-root user. Try doing du -r -d 1 -x and see if you get any errors about unreadable directories. Joe > -- > -sothat > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message