[CentOS] strange disk space calculation ext4 df and du

Rick Thomas rbthomas at pobox.com
Tue Nov 4 07:45:54 UTC 2014


On Nov 3, 2014, at 7:53 AM, Götz Reinicke - IT Koordinator <goetz.reinicke at filmakademie.de> wrote:

> Hi,
> 
> in one server I do have a SSD raid 1 size 219GB.
> 
> df shows 9.4 GB free, 198GB used.
> 
> If I do "du -sch * | sort -h -r" on /, I just have close to 3.5GB used ....
> 
> Any hints, what's eating up the space?
> 
> Centos 6.6, fs = ext4.
> 
> 	regards . Götz

The ext[234] filesystems reserve a certain amount of space for use by root only.  If I remember correctly, the default if 5%, but you can tune that with tune2fs(8) or mkfs.ext4(8). The df command subtracts the reserved space when it shows the amount free.  So an empty 1GB filesystem would show as having 950 MB free.

Hope that helps…

Rick


More information about the CentOS mailing list