[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

df is lying: where's our free space gone?


We were doing a routine check of one of our redhat 7.0 servers and noticed that it was getting low on disk space when it should have had plenty. 

Example 1:

[root dhp0946 /]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda6              16G   13G  3.0G  80% /
/dev/sda1              61M  6.3M   51M  11% /boot

Example 2:
[root dhp0946 /]# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda6             16782640  12704088   3232732  80% /
/dev/sda1                62193      6387     52595  11% /boot

So according to df we have 13 GB of data on this disk, but du  does _not_ agree. Out put of du (note du's own  grand total at the bottom)

[root dhp0946 /]# du -shc *
22M     backup
4.8M    bin
6.3M    boot
.264M    dev
.004M    duout
4.3M    etc
282M    home
0       htlog
40M     lib
0       log
.004M    lost+found
.012M     mnt
235M    mpbackup
.016     mpsnapshot
.036     nsr
.004    opt
.001M    proc
15M     root
5.7M    sbin
.008M    tmp
604M    usr
3900M    var
0       wh
338M    work

5.5G    total

I added it all up by hand and came out with 5458.449 MB.

Can anyone explain this anomaly? Which one is correct, du or df ? Is there any other utility I can use to calculate free/taken space? And what is the cause of <which ever one is wrong> being wrong?


Jonathan Wilson
System Administrator

Cedar Creek Software     http://www.cedarcreeksoftware.com
Central Texas IT     http://www.centraltexasit.com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]