-   Linux - Newbie (
-   -   move /tmp (

puzz_1 06-30-2003 01: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 01: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 03: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 03: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 09:54 AM.