Results 1 to 4 of 4
Howzit Folks?
I get the following results for various commands and can't figure out what is causing the discrepancy:
df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 ...
- 12-22-2009 #1Just Joined!
- Join Date
- Sep 2004
- Posts
- 3
Discrepancy df/du
Howzit Folks?
I get the following results for various commands and can't figure out what is causing the discrepancy:
df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 2.0G 2.0G 0 100% /
du -hx --max-depth=1 /
0 /proc
12K /mnt
20K /tmp
4.0K /opt
14M /sbin
0 /sys
14K /media
4.0K /selinux
4.0K /srv
4.0K /winsys
4.0K /var
4.0K /usr
4.0K /home
0 /dev
8.1M /bin
258M /lib
18M /lib64
44M /boot
16K /lost+found
24M /root
44M /etc
408M /
Can anyone tell me why there is a difference of 1640 MB between the 2 commands for the root partition?
Cheers
Bruce
- 12-22-2009 #2
Most likely one gives the actual file size the other the size of all the blocks used. If a file uses even just one byte of a block no other file can use it. So one is good to determine backup size the other the actual space used.
- 12-22-2009 #3Linux Newbie
- Join Date
- Mar 2007
- Posts
- 139
Concerning the first output, these cannot be true.
Size=Used=2.0G cannot have the same value.
And Available cannot be 0.
So maybe your system isn't installed properly.
Anyway, my machines don't produce such strange values.
- 12-23-2009 #4Linux Guru
- Join Date
- Jan 2009
- Location
- Dover, NH
- Posts
- 1,633
I'm going to agree with GT. If #files == #inodes, then usage = 100%, regardless of files' actual size total.
Do you get different results running df as root vs a user? I seem to remember some percentage of inodes are reserved exclusively for root's use, just so if 100% get's used up by a user, the system isn't completely locked out...
You could run fsck for the statistics.


Reply With Quote