From owner-freebsd-questions Sun Oct 20 09:38:46 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA29637 for questions-outgoing; Sun, 20 Oct 1996 09:38:46 -0700 (PDT) Received: from diablo.ppp.de (diablo.ppp.de [193.141.101.34]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id JAA29630 for ; Sun, 20 Oct 1996 09:38:41 -0700 (PDT) From: Greg Lehey Received: from freebie.lemis.de by diablo.ppp.de with smtp (Smail3.1.28.1 #1) id m0vF0ta-000QoyC; Sun, 20 Oct 96 17:38 MET Received: (grog@localhost) by freebie.lemis.de (8.8.2/8.6.12) id SAA13263; Sun, 20 Oct 1996 18:11:14 +0200 (MET DST) Organisation: LEMIS, Schellnhausen 2, 36325 Feldatal, Germany Phone: +49-6637-919123 Fax: +49-6637-919122 Message-Id: <199610201611.SAA13263@freebie.lemis.de> Subject: Re: Missing disk space In-Reply-To: <9610170927.AA18514@iworks.InterWorks.org> from "Daniel M. Eischen" at "Oct 17, 96 04:27:53 am" To: deischen@iworks.InterWorks.org (Daniel M. Eischen) Date: Sun, 20 Oct 1996 18:11:13 +0200 (MET DST) Cc: questions@FreeBSD.org (FreeBSD Questions) X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk Daniel M. Eischen writes: > > I recently re-installed FreeBSD from a 2.1.5-RELEASE CD, after > which I immediately upgraded to -current. I allocated 50MB > for the root partition, which has always been more than enough > with /usr, /home, and /var mounted (or linked to mounted) > partitions. > > A du -kx shows: > > bash# du -kx / > 1 /dev/fd > 41 /dev > 2 /usr > 1 /stand > ... > 15439 / > > for a total of ~15MB. Looking at df -k tells a different story: > > bash# df -k > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/sd0a 49231 45229 64 100% / > /dev/sd1s1e 504046 359048 104676 77% /opt/a > /dev/sd1s1f 504046 287618 176106 62% /opt/b > /dev/sd1s1g 599060 52364 498772 10% /opt/c > /dev/sd1s1a 504046 441594 22130 95% /usr > procfs 4 4 0 100% /proc > > Notice there is about 45MB of used disk space for /. It seems that > "df -k" is showing what the system thinks is there, because I can > easily fill up the root filesystem. But, I know that I haven't used > that much disk space - manual surfing through / shows the same as > du. > > bash# df -k > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/sd0a 49231 45229 64 100% / > ... > > bash# dd of=/junk if=/dev/zero bs=1024 count=4000 > > /: write failed, file system is full > dd: /junk: No space left on device > 3969+0 records in > 3968+0 records out > 4063232 bytes transferred in 1 secs (4063232 bytes/sec) > > bash# df -k > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/sd0a 49231 49205 -3912 109% / > ... > > Where or where did my disk space go? Good question. I can think of several possibilities: 1. You used it up, and du is lying. 2. You have a broken file system, and for some reason you haven't performed an fsck on the file system since it happened. 3. (Most likely). You have data on the root file system in /usr or /opt/*. When you mount the corresponding file system, this data is no longer accessible, but it's still there, and it can been seen on NFS mounts. I'd suggest going into single user mode (only / mounted) and doing an fsck. Then check with du again. I suspect that you'll find different results. To go into single user mode, you should be able to say 'shutdown now', but that will almost invariably leave /usr mounted and not dismountable. It's easier to reboot and specify the -s option to the Boot: prompt. Greg