My root filesystem on one of my servers is showing 87% full and I can't work out why. I have several servers that perform similar functions to this one that are running around 25-35% full. The 5GB free on this server is filling during month end when that 5GB freespace gets chewed up by sort tempfiles and their reporting stuff fails.
df -k
reports:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/ol-root 39265556 34049040 5216516 87% /
Yet: du -skx
reports:
11776608 /
So there's 20-ish GB of space being taken up there by something I can't explain.
I thought I might have had some hidden files under several mount points from NFS mounted drives. I unmounted the mounts and rechecked and still the same - the directories under the mounts were empty.
From the root directory I did (cutting errors from /proc):
[root@xxx /]# for i in `ls -1` ; do du -skx $i; done
0 appliance
0 bin
199876 boot
0 dev
66260 etc
0 files
74300 home
0 lib
0 lib64
0 media
0 mnt
3572720 opt
0 proc
75144 root
165212 run
0 sbin
0 srv
0 sys
263512 tmp
4872936 usr
4383596 var
I went and checked for open files:
lsof / | awk '{if($7 > 1048576) print $7/1048576 "MB" " " $9 }' | sort -n -u
There's nothing there larger than 180MB and most of them are single digit, certainly nothing in the 20GB range.
I've done google things looking for answers, most were a variation of the things I've done (and the lsof idea came exactly from a google search).
One of the other guys in my team has looked as well (neither of us are super experts), and we're both drawing blanks here.
Anyone got any bright ideas ?
Thanks in advance
/dev/mapper/ol-root / xfs defaults 0 0
/var/log/lastlog
huge size ? See askubuntu.com/a/618667/350004