[afnog] Server reporting wrong partition size

Brian Candler B.Candler at pobox.com
Thu Jul 20 16:33:58 EAT 2006


On Thu, Jul 20, 2006 at 11:38:52AM +0300, Davidson Thaba wrote:
> When I do a df -k, it reports that /usr is full, yet I only have very
> few files there whose size don't add up to the partition size
...
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/rd/c0d0p2         2972268   2790948     27900 100% /usr
...
> # du -sh /usr
> 612M    /usr
...
> Any ideas what is amiss?

There may be a large file still open on in the partition. When you rm a file
it disappears from the directory, but if one or more processes have it open
at the time then it won't actually disappear until all those processes have
closed it.

You may be able to find the culprit using 'fuser' or 'lsof':

    fuser -v -m /usr

(look for processes with 'f' in the ACCESS column, although note that many
programs to legitimately hold open files under /usr)

It will be hard to tell what the file was, because at this stage all you
will see is the inode number. However, you may be able to identify a suspect
process and kill or restart it. Or for simplicity you can just reboot.

If that's not it, then maybe the filesystem is corrupt - reboot into single
user mode and run fsck -y on the partition.

HTH,

Brian.



More information about the afnog mailing list