LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   move /tmp (http://www.linuxquestions.org/questions/linux-newbie-8/move-tmp-69071/)

puzz_1 06-30-2003 12:30 PM

move /tmp
 
I have a my / partition which is nearly full /opt is also on the same partition and is occupying almost 50% of /

Can I move /opt to a second hard disk (with dd or cp) and then add an entry in /etc/fstab so that it looks like

LABEL=/ / ext3 auto 11
LABEL=/opt /opt ext3 auto 11


and mtab looks like

/dev/hda6 / ext3 rw 0 0
/dev/hdb1 /opt ext3 rw 0 0


does this look right?

acid_kewpie 06-30-2003 12:48 PM

well mtab won't loko like anything, as you shouldn't edit it yourself. best way to move the /opt branch is probably...

mkdir /mnt/opt
find -xdev /opt | cpio -pvd /mnt

as this will take care of symlinks and such like.

puzz_1 06-30-2003 02:03 PM

But then /opt becomes /mnt/opt
What happens to all my paths (exports) do I have to change them to /mnt/opt

I wanted to move the filesystem so that it still has the /opt label

acid_kewpie 06-30-2003 02:22 PM

hehe, i missed the middle line... that was clever...

mount /dev/hda6 /mnt/opt

where hda6 is the new opt partition. once it's copied you can then delete the contents of /opt and mount the partition there.


All times are GMT -5. The time now is 07:08 AM.