problems with /tmp overflow

Asked by bill purvis

I've recently upgraded to Hardy, followed today by an update to kernel, modules etc.
As a result my / parition got full. This was spotted when gcc reported 'no space on device'
while writing a temporary file.
I then discovered that there were several earlier kernels (and modules etc.) from
gutsy and feisty still around. Deleting these has cleared plenty of space in /
but it now appears that /tmp is mounter on 'overflow' and has a 1Meg limit.
As a result, my compilations are still failing. Any way of getting /tmp back into
the root partition without a reboot?

Many thanks

Bill

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
nglnx
Solved:
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Have you already rebooted your pc...?

Usually /tmp is under the "/" root filesystem, so please tell more about your issue...

Please also open a Terminal from the menu Applications->Accessories->Terminal and type:

sudo apt-get clean all

give your user password when requested, you don't see nothing when you type it, then press enter.

Thank you

Revision history for this message
bill purvis (bill-billp) said :
#2

No, I've not (yet) rebooted. I've managed to get around the immediate problem by
setting TMPDIR=/var/tmp which is on a partition with lots of space.

My /tmp was under "/" until this happened. I Presume the system needed some space
in /tmp and mounted it on "overflow" which I assume is a RAM filesystem.

I'm an old-fashioned guy and always work in terminals for most things.
I've deleted a lot of the bigger bits and made plenty of free space in "/" but
/tmp seems reluctant to revert. I guess a reboot is the only way out....

Revision history for this message
bill purvis (bill-billp) said :
#3

Rebooted, and /tmp is back under "/".
Can anyone tell me what was going on and how to deal with it in future?

Revision history for this message
Best nglnx (nglnx) said :
#4

The script responsible for mounting your /tmp as overflow is run at boot time (it is located in /etc/init.d/mountoverflowtmp). It runs a check to see if there is a minimum acceptable space on /tmp and if there is not, it mounts it overflow. It also checks for unneeded overflow tmpfs for /tmp and removes them if that is appropriate. That is why after you freed some disk space and rebooted everything went back to normal.

Revision history for this message
bill purvis (bill-billp) said :
#5

Thanks nglnx, that solved my question.

Revision history for this message
Luca Greco (luca-greco) said :
#6

If you need more space in /tmp without a reboot and overflow tmpfs is already mounted, you can (with some risks) bind another directory on that mount point:

sudo mount -o bind /var/tmp /tmp

this workaround can be useful with applications that don't evaluate TMPDIR.

Revision history for this message
cube (cube) said :
#7

You could just

umount overflow

which would make /tmp point to the tmp directory on your root partition.

You need to restart X (if you're using it), but other than that, everything seems to work alright, /tmp is getting populated pretty normally.

Revision history for this message
pramod (pramod974) said :
#8

Thank you very much Luca Greco.

This solved my problem and it was very much important indeed... thanks a ton !