[SOLVED] ubuntu 16.04 | move /tmp to secondary partition
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Our /tmp directory is being often filled with temporary files from users running jobs on the machine. As a result, we'd like to move the /tmp directory to a secondary partition so that:
1) / does not get filled up so often when users can't specify TMPDIR in their applications.
2) The secondary partition is a 1TB SSD which will take time to get filled up and because it's SSD, will add up some speed.
I believe an entry should be added to fstab for this device, specifiying the UUID and mountpoint. But as this is a production machine, I would really appreciate some feedback, if anyone has successfully done this change in the past.
I understand that the lifetime of the SSD will be greatly reduced, but this is offset by the gains we shall be having afterwards. I searched on the ubuntu forums but I could only find a procedure for moving /home folders.
So, you have second ssd with partition and filesystem created.
You can check under /dev/disk/by-uuid/ for UUID of the disk.
Then update fstab...
Since you have user jobs writing to /tmp, I would make sure no jobs are running then rename existing /tmp to something else then mount the new partition as /tmp
Since you have user jobs writing to /tmp, I would make sure no jobs are running then rename existing /tmp to something else then mount the new partition as /tmp
You can hardly be sure if /tmp is not in use.
I would rather set it in fstab and reboot. Also need to clean up the original /tmp.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.