Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
Hi,
I have searched the net extensively and have not discovered a solution to my problem where my hard disk shows full (about 27G) whereas there is only about 4G of files.
I have found other users experience similar discrepancies between du and df due to rm being called on open files yet a suitable solution eludes me.
The details -
Slackware 11.0 installed on a single ext2 partition
I have experienced several lockups forcing the system to be reset without unmounting properly (may be a cause or a symptom).
Following resets, I have proceeded with e2fsck -v -y /dev/hda1 which eventually shows all is well.
However
df -h /dev/hda1 gives 27G
and
du -s -h /dev/hda1 gives only about 4G (which agrees with the files that I can find)
Here are the exact details-
------------------------------------------------
root@slackbox:/home/wiz# df -h /dev/hda1
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 27G 25G 595M 98% /
root@slackbox:/home/wiz# du -s -h
4.9G .
root@slackbox:/home/wiz#
------------------------------------------------
OK, whats the mount information? there might be only 4G of files that du can see, but the filesystem might be fuller if another filesystem is mounted over, covering up the original files.
root@slackbox:/home/wiz# mount -l
/dev/hda1 on / type ext2 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw,devgid=10,devmode=0666)
nfsd on /proc/fs/nfs type nfsd (rw)
root@slackbox:/home/wiz#
thanks matthewg42,
at least I can see the usage now with du -
Code:
root@slackbox:/home/wiz# df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 27G 25G 595M 98% /
root@slackbox:/home/wiz# du -s -h /
25G /
root@slackbox:/home/wiz#
These now correlate with a KInfoCenter showing full drive but KDirStat shows my files to total only 8.83G? Any Ideas on what may be happening as there should be 19G available?
kdirstat looks like the file size view method of konqueror ... what does konqueror show when in file size view?
What does du show in these cases (sorry if this takes a long time - the first will be the worst... subsequent operations should be quicker if done soon after the first):
Code:
du --apparent-size -s -h /
du --count-links -s -h /
du --one-file-system -s -h /
Oh something just occurred to me... what user are you running kdirstat as? The output you pasted suggests you are running du as root... If kdirstat is running as a non-root user, maybe that user cannot see inside all the directories on the system.
Oh something just occurred to me... what user are you running kdirstat as? The output you pasted suggests you are running du as root... If kdirstat is running as a non-root user, maybe that user cannot see inside all the directories on the system.
Actually, i am logged in as the user 'wiz' and using terminal as super user using the su command.
Yes, Kdirstat run as non-root user, although when logged into file manager as super user, the calcuate command for the storage device hda1 also gives about 9G only
Thanks for sticking with it matthewg42, I am running those commands you suggested now.
Last edited by twiz; 11-27-2007 at 12:45 AM.
Reason: Afterthought
Ahhh...KDirStat when logged into KDE as root user finds 19.52G of files!Although still not showing 25-27G I can now at least see enough files to delete away.This seems so obvious to me now, I think I was thrown by the incorrect syntax of du giving only 4.9G (as you pointed out for me) and KDE file manager and KDstat all showing that the disk wasn't full.I guess the KDE file manager will when logged in as root will now show the full size of files, so currently doing the calculate on storage media hda1 in KDE as root.Will post again when done.Thanks very much SciYro and especially mattewg42, hopefully I can now find some files to delete.I am guessing that the unclean dismounts have caused some large backup type files, I can now use KDirStat (as root) to find the offending files.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.