I have a clean CentOS server. Well, it’s about a year old, but I’m working only in one directory there and I have a Docker daemon installed. The problem is that the amount of free disc space is going down, slowly and consistently. This is what I have now (after deleting
/var/lib/docker
):$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/xvda1 377476072 313590548 63885524 84% / devtmpfs 7597592 0 7597592 0% /dev tmpfs 7486540 4 7486536 1% /dev/shm tmpfs 7486540 24932 7461608 1% /run tmpfs 7486540 0 7486540 0% /sys/fs/cgroup tmpfs 1497312 0 1497312 0% /run/user/1001 tmpfs 1497312 0 1497312 0% /run/user/1002
300Gb is occupied by something. I can’t understand what that could be… When I’m trying to find the biggest files on disc, I’m getting some files with 40-80Mb size. Definitely not 300Gb. Any ideas?
This is my
du
:$ sudo du -sh /* 0 /bin 270M /boot 0 /dev 23M /etc 322M /home 0 /lib 0 /lib64 0 /media 0 /mnt 0 /opt 0 /proc 48K /root 33M /run 0 /sbin 0 /srv 0 /sys 16M /tmp 1.4G /usr 13G /var
These are my inodes:
# df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/xvda1 213202208 81389 213120819 1% / devtmpfs 1899398 318 1899080 1% /dev tmpfs 1871635 2 1871633 1% /dev/shm tmpfs 1871635 468 1871167 1% /run tmpfs 1871635 13 1871622 1% /sys/fs/cgroup tmpfs 1871635 1 1871634 1% /run/user/1003 tmpfs 1871635 1 1871634 1% /run/user/1001 tmpfs 1871635 1 1871634 1% /run/user/1002
Answer
You might have deleted files since the du
looks ok
lsof | grep deleted
That’ll show you any processes holding open large files.. From there you can find the process like
ps aux | grep pidNumberYouGetfromlsof
That should give you an idea of what process to restart.
Attribution
Source : Link , Question Author : yegor256 , Answer Author : Mike