Ubuntu – Overflow /tmp mounted when there is free space on /

tmpUbuntu

I recently faced an "overflow" issue on /tmp. I don't have a separate /tmp partition, and there is 17% free in / – then why did I get an overflow tmp filesystem?

enter image description here

enter image description here

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/mapper/safesquid-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=d029e04b-11e9-42e1-b1d3-9cde73cb3b67 /boot           ext2    defaults        0       2
/dev/mapper/safesquid-swap_1 none            swap    sw              0       0

mount output

/dev/mapper/safesquid-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
/dev/sda1 on /boot type ext2 (rw)
overflow on /tmp type tmpfs (rw,size=1048576,mode=1777)
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)


root@safesquid:~# free -m
             total       used       free     shared    buffers     cached
Mem:          2009        182       1826          0          9         48
-/+ buffers/cache:        124       1885
Swap:          715        130        585
root@safesquid:~# uname -a

Linux safesquid 2.6.32-41-server #94-Ubuntu SMP Fri Jul 6 18:15:07 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

I'm running Ubuntu 12.04.1 LTS.

I also checked df -i, there are free inodes.

Best Answer

When the system boots and the harddrive is full, nothing can write to /tmp. So during init a tmpfs is created and mounted. This way your system can safely boot, because it can write to /tmp.

Free up disc space, and reboot your machine. (Or simply unmount /tmp, if you are sure nothing uses it).

Setting this value to 0 disables the setup., which I would expect carries the risk of init-failure, or being unable to log in to the system.

I think the answer by Nitesh B. is dangerous and should be avoided.

Related Question