Disable mounting /tmp as a tmpfs

For reasons that escapes me the default of my Debian machines is now to mount the /tmp directory as a tmpfs device. This caused a bit of problems for me as I had programs that needed to dump large tmp files in /tmp.

Luckily this is quite easy to solve on the fly. Initially the tmpfs was only 794MB large:

[root@kelvin]$ df -h  
...
tmpfs 794M 764K 793M 1% /tmp/

But it is easily exepandable my remouting it with a size of 2000MB, fitting in my 4GB of memory along the other programs.

[root@kelvin]$ mount -t tmpfs tmpfs /tmp -o size=2000M,mode=1777,remount

This isn’t however a permanent solution, so in the file /etc/default/rcS there I have commented out the following line to disable the use of tmpfs for tmp.

# mount /tmp as a tmpfs
#RAMTMP=yes

So for all following boots I will have the traditional size for my /tmp folder shared with the / partition.

Leave a Reply