Go from a /tmp partition to tmpDSK?
I want to increase my /tmp and secure it with the securetmp script, which as far as I understand, stops using the partition and saves onto /usr/tmpDSK? (I may very well be incorrect, hence I am asking... I don't assume I know these things)
Now, I have this on my fstab (among other things):
So, from what I have found on several posts and other forums, I should: umount -l /tmp umount -l /var/tmp Then run the script etc. But I believe this assumes I am already running /tmp on a loop device? In other words, given my specific situation mentioned above: 1. Can I just unmount /tmp and run the securetmp script? 2. Will /tmp not mout automatically on next boot? 3. Will the partition's physical space not go to waste? I suppose I'd have to add it back to any other of the partitions but by doing that, I'd have to format that other partition? 4. Will I have to remove those lines from fstab? Can anyone advise if my understanding of the concepts is correct and what would be the way to go? I like the idea of being able to resize /tmp via a script rather than it being set on stone.
/dev/mapper/VolGroup00-LogVol01 /tmp ext4 defaults,nodev,nosuid,noexec 1 2
/tmp /var/tmp none rw,noexec,nosuid,nodev,bind 0 0So, from what I have found on several posts and other forums, I should: umount -l /tmp umount -l /var/tmp Then run the script etc. But I believe this assumes I am already running /tmp on a loop device? In other words, given my specific situation mentioned above: 1. Can I just unmount /tmp and run the securetmp script? 2. Will /tmp not mout automatically on next boot? 3. Will the partition's physical space not go to waste? I suppose I'd have to add it back to any other of the partitions but by doing that, I'd have to format that other partition? 4. Will I have to remove those lines from fstab? Can anyone advise if my understanding of the concepts is correct and what would be the way to go? I like the idea of being able to resize /tmp via a script rather than it being set on stone.
-
Hello, Here are a couple of threads you may find helpful: SOLVED - secure /tmp directory increasing /usr/tmpDSK directory Thank you. 0 -
Hi Michael, Thanks for that but I am not sure that addresses my specific situation? - ]
- Backup /var/tmp by typing the following: mv /var/tmp /var/tmpbackup
- Make a symbolic link that makes /var/tmp point to /tmp by typing the following: ln -s /tmp /var/tmp
- Copy back the old data using the command: cp /var/tmpbackup/* /tmp/
- Remove the un-needed backup you created: rm -rf /var/tmpbackup
My problem is my /tmp partition is already full. I want to stop using a separate partition and run tmp on the main drive, is that possible? That, and my original questions. I am very concerned about doing something that I see on someone else's blog or form thread without really knowing the implications and differences vs my own scenario. I reckon that this whole operation could seriously break my server and don't want to take it lightly.0 -
My problem is my /tmp partition is already full. I want to stop using a separate partition and run tmp on the main drive, is that possible?
Hello, That's not the intended purpose of the "/scripts/securetmp" script. This is more of an OS operation as opposed to a cPanel operation. The following CentOS thread should help point you in the right direction: move /tmp to separate partition - /tmp not mounted - CentOS It's generally a good idea to consult with a system administrator if you are uncomfortable making these types of changes to a system. We provide a list of system admin services at: System Administration Services | cPanel Forums Thank you.0
Please sign in to leave a comment.
Comments
3 comments