I am trying to move /tmp
to RAM and obey good practice:
/var/tmp
should NOT be placed intmpfs
, as it must survive rebootsnot mount
/tmp
as a stand-alonetmpfs
, but rely on/dev/shm
or/run/shm
However, things have changed between 2.6 and 3.2 kernels :
Changes to the configuration and defaults of tmpfs filesystems
On 3.2 kernel, use RAMTMP=yes
in /etc/default/tmpfs
.
My question is: how can I achieve this goal with older kernels ?
My choice is nor to modify /etc/fstab neither this :
mkdir /dev/shm/tmp
chmod 1777 /dev/shm/tmp
mount --bind /dev/shm/tmp /tmp
Is there something like RAMTMP
for 2.6 kernels ?
tmpfs
considered harmful. Food for thought./tmp
can and should be used for temporary files, that's the whole point of it./tmp
is not supposed to survive a reboot (use/var/tmp
for that) and who composes an email half the size of RAM+swap (without saving it)?