Re: correct way to move /usr to a new partition...
On Fri, 17 Sep 1999, rich wrote:
> I have decided that I need more room for my Slink system... my 1GB linux
Didn't we just do this one? :}
First go to single user mode. It is probably not necessary but won't
hurt.
> 1. as root, cp -r -p /usr /linux2a
The correct sequence is:
cd /usr
tar cf - . | (cd /linux2a; tar xvf - )
cp gets things subtly wrong from time to time. That includes sparse
files, device files and pipes, and hard links. You probably won't
encounter any of these on /usr (although you might!). But why do it wrong
when you can do it right?
> 2. change fstab to mount /dev/hdb1 as /usr (with options set to
> "defaults, errors=remount -ro" ???)
You should use the same mount options that you have for /usr currently. I
see no reason why this process should generate filesystem errors.
> 3. rm /usr
This will not work. You want 'umount /usr'. You'll have to be in the /
directory to do that and you can't have any processes running that are
using any directory under /usr as their current directory, or which have
any files open on that partition. You can use 'fuser' to determine which
processes are using the /usr partition. In practice it may be simpler to
reboot at this point.
> 4. mount -a
ok. That should work. :}
Reply to: