View Full Version : Linux Disk space discrepancy?
Zrikz
12-22-2008, 11:35 AM
So is this a discrepancy or normal? Where does the extra space go?
http://eve.evilavatarcomics.com/eh.jpg
Should be 6 gigs free but there is only 2.2 available, what about the other 4ishgb ? Is this gone to cache, or what?
LiquidRain
12-22-2008, 01:14 PM
Most filesystems reserve space for inode metadata and, I believe, some overfill spaced is reserved for the root user in case space runs out.
df also intentionally misreports free space. I forget the reasons why and it's not in the man page, but df is telling me I have 1.7G free, when Nautilus tells me I have 4.5GB free.
KingGorilla
12-22-2008, 10:10 PM
I do not know off the top of my head but by default each disc in the hard drive has overfill space reserved. Depending on the age of the 100 GB drive, this could be a large amount of real estate. Also there is space left for virtual memory, generally at least one or two GB of space.
What I am seeing is not out of the ordinary, depending on the number of discs in the drive.
LiquidRain
12-23-2008, 09:32 AM
Well, virtual memory has its own partition entirely. It won't show up in a df.
Just open a file browser like Nautilus/Konq/Dolphin and see what you get instead of using df. :)
DangerousDaze
12-23-2008, 11:54 AM
You might also want to fsck, just in case.
/edit - thinking about it further, if you have a process that's deleted a file but still retains a handle to it then the file will appear gone to other processes but the disk blocks will still be allocated to the (usually long running) process. Of couse, if you reboot and the space is still missing then this isn't your problem. Chances are, as has already been said, it's reserved by root.
TrackZero
12-23-2008, 12:05 PM
If you want to figure out where all your space is going, just run (for example on my box):
root@batora:/# du -h --max-depth=1
16K ./lost+found
234M ./var
356K ./dev
7.3M ./bin
103M ./etc
33M ./lib
48K ./mnt
etc etc
Takes a little bit to run, depending on the drive size/speed/seek, as it trawls through the filesystem counting all the file use up and summarizes it to the current directory for you (you can change max-depth to go lower, but I wouldn't recommend it, makes a real mess).
Then you can follow down the tree running the command to see where all the big amounts of space are going.
LiquidRain
12-23-2008, 01:03 PM
And here I always did it the long way and used ls -1 | xargs du -hs.
TrackZero
12-23-2008, 05:05 PM
And here I always did it the long way and used ls -1 | xargs du -hs.
Well now you know, that's half the battle.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.