Free space in tmpfs partition not adding up
- by Dean Herbert
I have had my /tmp/ partition filling up recently when it should not be anywhere near full. On further investigation, I found that the partition was listing free space a lot lower than it should be. I am guessing a remount will fix this, but am very curious as to why this has happened and where this space has gone.
du output:
root@odoroki:/tmp# du --summarize -h
3.3M .
df output:
root@odoroki:/tmp# df -h /tmp
Filesystem Size Used Avail Use% Mounted on
tmpfs 3.9G 3.3G 653M 84% /tmp
Update: after deleting some files it has happened again.
du output:
root@odoroki:/tmp# du -h --summarize
11M .
df output:
root@odoroki:/tmp# df -h /tmp
Filesystem Size Used Avail Use% Mounted on
tmpfs 3.9G 3.9G 0 100% /tmp
I have a feeling this has started since a recent apt-get upgrade, but it still seems like strange behaviour.
I did do a quick scan over lsof output and couldn't see any open/stuck file handles. Unfortunately due to the seriousness of the issue I had to reboot the server, after which usage seems to match correctly.