I have a server which has a handful of services (Apache, MySQL, DNS, Nagios), and have been having issues with the harddrive filling up. Upon further review, I noticed that the percentage used according to df
doesn't make any sense. Used space plus available space does not equal total space. At the time I first became aware of this (thanks to a Nagios notification), the available space was less than 1 GB out of our 40 GB harddrive. According to du
and df
"Used" column, the actual used was 11GB. That's a difference of 28GB. At the moment it's fluctuating only a little, but sometimes it fluctuates at over 1000 bytes per second. See here:
$ df / && sleep 5 && df /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vzfs 41943040 11398324 29195724 29% /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vzfs 41943040 11398324 29173016 29% /
This is a VPS that I don't have physical access to. It's running XFS, so a normal reboot fsck isn't an option either. It doesn't do it constantly, and log files don't seem to indicate anything going on. iotop
doesn't even show any activity at all. Twist, we have people actively using this machine so we can't just format.
Output of df -a
:
$ sudo df -a
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vzfs 41943040 11398740 29064180 29% /
proc 0 0 0 - /proc
sysfs 0 0 0 - /sys
none 524288 4 524284 1% /dev
none 0 0 0 - /dev/pts
none 5242880 12 5242868 1% /var/tmpfs
none 0 0 0 - /proc/sys/fs/binfmt_misc
/etc/named 41943040 11398740 29064180 29% /var/named/chroot/etc/named
/var/named 41943040 11398740 29064180 29% /var/named/chroot/var/named
/etc/named.rfc1912.zones
41943040 11398748 29064172 29% /var/named/chroot/etc/named.rfc1912.zones
/etc/rndc.key 41943040 11398748 29064172 29% /var/named/chroot/etc/rndc.key
/usr/lib64/bind 41943040 11398756 29064164 29% /var/named/chroot/usr/lib64/bind
/etc/named.iscdlv.key
41943040 11398764 29064156 29% /var/named/chroot/etc/named.iscdlv.key
/etc/named.root.key 41943040 11398772 29064148 29% /var/named/chroot/etc/named.root.key
ext4
, but similar principles will apply toXFS
. – Graeme Mar 01 '14 at 21:00