14G 12G 1.7G 88% /
root@SERVER:/> du -hxs /
5.9G /
root@SERVER:/>
What the hell? why would df report such a different size from du for a filesystem?
Well, there are a few answers, many of them are common.
1) deleted filehandles held open by a process!
That's not the case here. Server had been rebooted a few times.
2) Sparse files!
Not the case here either. There are a few sparse files, but nothing anywhere near that big
3) Filesystem corruption!
This is seriously what I thought it was. But nope. Filesystem was cherry.
So, do you know what it was?
Two coworkers suggested I remount or bind mount root to another place.
# mount /dev/VGsys/LVroot /mnt2
# df -h /mnt2
14G 12G 1.7G 88% /
# du -hxs /mnt2
12G
There was a subdirectory that had 5g of crap in it that was also a mountpoint.
The du command I ran restricted to one file system, and saw the mountpoint, and ignored anything under it. Too bad there was actually stuff there.

No comments:
Post a Comment