LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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

Reply
 
Search this Thread
Old 11-26-2007, 06:52 PM   #1
twiz
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Rep: Reputation: 0
Hard Drive shows full in error


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#
------------------------------------------------


Any information will be greatly appreciated.

Thanks

Last edited by twiz; 11-26-2007 at 06:59 PM.
 
Old 11-26-2007, 07:24 PM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
what does "df -ih" have to say on the issue?
 
Old 11-26-2007, 07:34 PM   #3
twiz
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Hi SciYro,
df -ih says-
root@slackbox:/home/wiz# df -ih
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/hda1 6.8M 265K 6.6M 4% /
root@slackbox:/home/wiz#
 
Old 11-26-2007, 07:47 PM   #4
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
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.
 
Old 11-26-2007, 07:54 PM   #5
twiz
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Original Poster
Rep: Reputation: 0
I only have one hard drive mounted at /dev/hda1/

Code:
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#
 
Old 11-26-2007, 08:20 PM   #6
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 62
du needs to be run on a normal directory, not a /dev/ special file.

df can run on either the device node in /dev/, or in any regular directory or file path which exists on that device.

Since /dev/hda1 is mounted as the root of the filesystem, your two commands should probably be:

Code:
df -h /
du -s -h /

Last edited by matthewg42; 11-26-2007 at 08:22 PM.
 
Old 11-26-2007, 09:10 PM   #7
twiz
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Original Poster
Rep: Reputation: 0
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?
 
Old 11-27-2007, 12:24 AM   #8
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 62
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 /
 
Old 11-27-2007, 12:25 AM   #9
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 62
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.
 
Old 11-27-2007, 12:42 AM   #10
twiz
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by matthewg42 View Post
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
 
Old 11-27-2007, 12:58 AM   #11
twiz
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Original Poster
Rep: Reputation: 0
The results -
Code:
root@slackbox:/home/wiz# du --apparent-size -s -h /
25G     /
root@slackbox:/home/wiz# du --count-links -s -h /
25G     /
root@slackbox:/home/wiz# du --one-file-system -s -h /
25G     /
root@slackbox:/home/wiz#
Currently logged into KDE as root user and running KDirStat again to see if any discrepancy.

Last edited by twiz; 11-27-2007 at 12:59 AM.
 
Old 11-27-2007, 01:22 AM   #12
twiz
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Original Poster
Rep: Reputation: 0
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.

Last edited by twiz; 11-27-2007 at 01:51 AM.
 
  


Reply

Tags
df, du, free, space


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
My FAT 32 hdb1 drive shows full in SuSE10.2 riba43 Suse/Novell 28 09-04-2007 01:54 AM
df -h shows 112GB size hard drive, but I have 120GB Anithen Linux - Hardware 7 05-08-2007 09:01 PM
why win98 shows the full capacity of drive in part of which i installed linux? sonisumit84 Suse/Novell 3 01-19-2007 10:19 AM
320GB hard drive shows up as 150GB bluelightning Linux - Hardware 4 07-03-2006 06:26 AM
Used dd now, then reformatted drive - still shows 80% full! bluehz Linux - Hardware 3 03-15-2004 08:46 PM


All times are GMT -5. The time now is 07:26 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration