pmak0
05-27-2001, 03:05 AM
My /tmp directory is on the / partition, which only has 100 MB.
I would like to make it bigger. Is this a safe way of doing it?
cd /
rm -rf tmp
ln -s /home2/tmp tmp # /home2/tmp is an existing directory
/sbin/reboot
I'm worried that some critical system functions might screw up while /tmp doesn't exist.
Chicken
05-27-2001, 01:02 PM
I'm not sure if you just created /home2/tmp for this purpose or not, but I moved mine out of / as well:
cd /
mv /tmp /home/tmp
ln -s /home/tmp tmp
Adjust the names of the directories as needed, but I *think* you should be fine.
What OS are you guys using? Since I'm assuming your using linux, is the tmp directory just a regular directory in linux?
Under solaris, the tmp directory has its own partition on the disk. The tmp directory is just a swap partition using a swapfs file system. It doesn't use up any space from your root.
webfors
05-27-2001, 04:39 PM
Deleting /tmp will delete mysql.sock. Make sure to recreate the link mysql.sock -> /var/lib/mysql/mysql.sock
Other than that (unless you have postgresql installed as well like I do), you should be fine. :)
webfors
05-27-2001, 04:41 PM
The best thing would be to cp /tmp to it's new home first in /home/tmp
That way any links will also be copied. Then delete /tmp and create the link to your new home :)
ezclassified
03-15-2004, 02:25 AM
I am trying to move my /tmp directory as well. Previously, I managed to move mysql out of /var into /home (due to space limiations).
Now that I want to move /tmp, I get a message like /tmp directory is busy. I presume this is due to mysql, but I don't seem to be able to shut down mysql via: /etc/rc.d/init.d/mysql stop
Questions:
-is there another way to stop mysql? .. I don't see an option on wmh either.
-if /tmp being busy due to mysql?
thanks
wKkaY
03-15-2004, 06:30 AM
ezclassified: try using lsof | grep tmp to list processes which are having files open on /tmp.
phpdeveloper
03-15-2004, 11:36 AM
Make sure you also run these commands:
chmod 777 /home2/tmp
chmod a+t /home2/tmp
to set proper permissions on the directory.
ezclassified
03-15-2004, 02:25 PM
[i]
Now that I want to move /tmp, I get a message like /tmp directory is busy. I presume this is due to mysql, but I don't seem to be able to shut down mysql via: /etc/rc.d/init.d/mysql stop
[/B]
Thanks, wKkaY. I did that and killed the 2 processes that showed up, and it still says /tmp is busy.
hiryuu
03-15-2004, 05:10 PM
It is just a regular directory with sticky world-write access. Like any other directory, it can be the start of a new partition or part of an existing one.
One advantage to a separate partition is you can mount it with more restrictive options than other directories (most notably noexec,nodev). I usually go with a small tmpfs partition, but that may not be feasible in a less controlled environment.
Originally posted by vizi
What OS are you guys using? Since I'm assuming your using linux, is the tmp directory just a regular directory in linux?
Under solaris, the tmp directory has its own partition on the disk. The tmp directory is just a swap partition using a swapfs file system. It doesn't use up any space from your root.
ezclassified
03-15-2004, 05:38 PM
so what's the verdict. I am a superuser, and killed all the processes that are linking to that directory. Still cannot touch the /tmp directory (say's it is busy).