RHEL4 root directory says full but sum of use is nowhere near full. Why?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
You might have files hiding underneath mount points. There is a way of finding out without umount'ing everything.
Share the / filesystem out over NFS to localhost (read-only, unless you like living on the edge), and mount it somewhere (/mnt maybe?). You can then run 'du -sh' at the mount point (i.e. cd /mnt; du -sh) and see where all the space is. The trick works because NFS exports shouldn't cross filesystem boundaries. Mount as NFS V3 to avoid some interestingness with NFS V4
Just rebooted server. When I did df -ah I found this:
Filesystem_______________Size___Used__Avail__Use%_Mounted on
/dev/mapper/vg00-root____1008M__212M___746M__23%_____/
I have no idea why the reboot (unmount / remount) would 'clean up' the issue. Can someone explain?
Last edited by SteveInTallyFL; 02-04-2009 at 09:47 PM.
Reason: formatting
Such is the mysticism of an inode based filesystem. Basically what's (probably) happened is that an application had one or more files open, which were then rm'ed. On Unix, files which are open aren't actually removed from disk until all the filesystem links are gone and all the open file descriptors are dropped (incidentally, this is one of the reasons that you don't need to reboot Unix boxes when you're updating software - you can remove files from under a running application and it won't necessarily notice).
If there's rm'ed, but still open files on a filesystem, the space will be taken up (so df shows the disk as full), but the files aren't visible any more (so du can't find them to count the space). When you rebooted, all the open file handles were dropped, so the space was freed. The fact that you had processes filling up the / filesystem is worrying, though.
To see processes with the open, but unlinked files, run 'lsof' as root, and take a look at the output. Any processes with these files open should have something like 'anon_inode' listed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.