4

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.

1 Answers1

2

From a similar question on ServerFault (and particularly one response there), one possible explanation for the disparity is that there are processes hanging on to files they've accessed on /tmp that have since been deleted.

# lsof | grep deleted

will list such files along with the processes still attached to them.