Help Finding Disk Drive Usage

Drew Tomlinson drew at mykitchentable.net
Fri Mar 30 15:22:52 UTC 2007


I have a small system that has happily run various versions of FBSD over 
the years.  Currently it's on 6.1-R-p11.

This morning I found /usr was out of disk space.  I freed a little by 
clearing  /usr/tmp, /usr/obj, and some log files I didn't need in 
/usr/var/log just to keep the "/usr: write failed, filesystem is full" 
from filling my screen.  Next I checked my periodic.daily messages to 
see when the big increase happened.  I found I lost nearly half of my 
space two days ago:

Disk status:
Filesystem       1K-blocks    Used   Avail Capacity  Mounted on
/dev/da0s1a         738318  101270  577984    15%    /
devfs                    1       1       0   100%    /dev
/dev/stripe/user   6726926 3132434 3056338    51%    /usr
devfs                    1       1       0   100%    /usr/var/named/dev


Today my "df -h" output looks like this:

Filesystem          Size    Used   Avail Capacity  Mounted on
/dev/da0s1a         721M     99M    564M    15%    /
devfs               1.0K    1.0K      0B   100%    /dev
/dev/stripe/user    6.4G    5.9G   -9.5M   100%    /usr
devfs               1.0K    1.0K      0B   100%    /usr/var/named/dev

I have not done any upgrades or installations.

So I tried tracking down the usage with du and got the following:

blacksheep# du -r -c -d 1 -h /usr
2.0K    /usr/.snap
 41M    /usr/sup
 42M    /usr/share
 13M    /usr/include
 33M    /usr/lib
 92K    /usr/libdata
 17M    /usr/libexec
903M    /usr/local
 26M    /usr/bin
 14M    /usr/sbin
2.0K    /usr/compat
186K    /usr/games
 12M    /usr/home
 15M    /usr/var
 10K    /usr/tmp
6.0K    /usr/X11R6
537M    /usr/ports
428M    /usr/src
2.0K    /usr/obj
2.0G    /usr
2.0G    total

So why does du report only 2.0 GB of usage while df reports over 6 GB?  
Where has my storage gone?  Or do I not understand proper usage of du?

Thanks for your help,

Drew

-- 
Be a Great Magician!
Visit The Alchemist's Warehouse

http://www.alchemistswarehouse.com




More information about the freebsd-questions mailing list