I have a SCSI disk in a server (hardware Raid 1), 32G, ext3 filesytem. df
tells me that the disk is 100% full. If I delete 1G this is correctly shown.
However, if I run a du -h -x /
then du
tells me that only 12G are used (I use -x
because of some Samba mounts).
So my question is not about subtle differences between the du and df commands but about how I can find out what causes this huge difference?
I rebooted the machine for a fsck that went w/out errors. Should I run badblocks
? lsof
shows me no open deleted files, lost+found
is empty and there is no obvious warn/err/fail statement in the messages file.
Feel free to ask for further details of the setup.
Best Answer
Check for files on located under mount points. Frequently if you mount a directory (say a sambafs) onto a filesystem that already had a file or directories under it, you lose the ability to see those files, but they're still consuming space on the underlying disk. I've had file copies while in single user mode dump files into directories that I couldn't see except in single usermode (due to other directory systems being mounted on top of them).