Score:0

How to mount /tmp to another directory to increase memory

cn flag

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?

muru avatar
us flag
That doesn't look right - where's the field specifying the filesystem? Are you trying a bind mount?
cn flag
"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.
A_Murphy avatar
cn flag
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?
Score:0
cn flag

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

/mnt/raid1/tmp /tmp none bind
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.