How do I change my tmp dir to another partition in Linux using fstab?

I want my tmp dir to be on /dev/sda9.  How do I do this?

[root@co-pacman-fc home]# cat /etc/fstab

# /etc/fstab
# Created by anaconda on Fri Aug 21 21:16:54 2009
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or vol_id(8) for more info
UUID=6b954268-589a-40ac-ae15-c3a7b9fa7424 /                       ext3    defaults        1 1
UUID=81412341-3f64-46a8-9a71-e2e3c7948195 /rpms                   ext3    defaults        1 2
UUID=23c471b0-c356-4e9c-a051-f335d7efc6fb /tmp                    ext3    defaults        1 2
UUID=1adab79f-d00c-48ae-bb1c-0cb5aafd3bbe /altroot                ext3    defaults        1 2
UUID=fad5b0b9-2c9c-4b4e-845e-388f4dd05a90 /var                    ext3    defaults        1 2
UUID=1f6979c4-d9ba-4e69-a3fe-f8fbdfc5c97a /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
UUID=ee1ed115-46dc-4451-940f-256eb415c26c swap                    swap    defaults        0 0
/var/swapfile                             swap                    swap    defaults        0 0

/dev/sdb1       /opt/hudson/builds      ext2    defaults
/dev/sda9       /opt/hudson/home        ext2    defaults
coax01-fs01-vif0.eng.trans.corp:/group1/groups/le/co /home/le nfs
caax02-fs01-vif01.trans.corp:/home2/home/le/ca /home/isg nfs
codv09-as52.eng.trans.corp:/export/build1 /nfs/codv09-build1 nfs
coax01-fs01-vif0.eng.trans.corp:/home2/home/pacman /home/pacman nfs
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

stev0931Connect With a Mentor Author Commented:
Looks like I got it to work with this in fstab:

/opt/hudson/home/tmp    /tmp    bind    defaults,bind 0 0

Double checking it now...
stev0931Author Commented:
Also, I'd need to find a way to do this without screwing up  /opt/hudson/home ;)
SuperdaveConnect With a Mentor Commented:
mkdir /opt/hudson/home/tmp
chmod 4777 /opt/hudson/home/tmp
rm -rf /tmp
ln -s /opt/hudson/home/tmp /tmp
Never miss a deadline with

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Make that chmod 1777 (not 4777), sorry.  Or just 777.  Do ls -ld /tmp and see what it is now.
stev0931Author Commented:
That didn't work.  I get this:

[root@co-pacman-fc /]# rm -rf /tmp
rm: cannot remove directory `/tmp': Device or resource busy
stev0931Author Commented:

[root@co-pacman-fc /]# ls -ld /tmp
drwxrwxrwt 2 root root 569344 2010-03-25 10:05 /tmp

The 'tmp' is backcolored in green
stev0931Author Commented:
It worked
All Courses

From novice to tech pro — start learning today.