0

My /tmp directory is now at capacity and I want to increase the available memory:

df -h /tmp
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p3   59G   54G  2.1G  97% /

To try and do this, I plan to move my /tmp folder to /mnt/raid1/tmp (a mounted directory with a lot more available memory) and following this answer I tried adding the following to etc/fstab:

#update /tmp directory to get increased memory for running processes
/tmp    /mnt/raid1/tmp    defaults,noatime,mode=1777   0  0

However this caused an issue after rebooting that was only resloved when I removed these lines. Anybody know how to move /tmp to /mnt/raid1/tmp correctly?

  • That doesn't look right - where's the field specifying the filesystem? Are you trying a bind mount? – muru Dec 14 '21 at 07:40
  • "memory"? As in free up RAM? Not going to happen... /tmp is a dir on disk and will not free up memory. if you mean disk space... /tmp is cleared out on every reboot. What you ask seems off to me. – Rinzwind Dec 14 '21 at 07:42
  • Hi @muru and Rinzwind. Just to mention I'm very new to this so I may not be describing my issue very well. The problem is the current /tmp file is pretty much at capacity so we want to move it to a mounted directory which has a lot more memory. I'll update the question to try make this more clear. muru I wasn't sure what filesystem to specify in this case? – A_Murphy Dec 14 '21 at 08:31

1 Answers1

0

Mount-bind /tmp to the alternative directory as in:

/mnt/raid1/tmp /tmp none bind
vanadium
  • 88,010