Moving/merging a filesystem back into /

Charles Marcus CMarcus at Media-Brokers.com
Mon Dec 2 12:31:23 MST 2013


Hello,

I'm going to be moving a filesystem around, and was planning on using 
rsync to do it, so like to get some advice from those more experienced 
than I (both using rsync, and moving filesystems)...

I currently have a system that has a separate /usr on an LVM partition.

I want to merge this back into the / (root) filesystem.

This is a production server (mail server, gentoo linux), so I'd really 
like to not brick this thing in the process.

What would the best arguments to use for making sure that everything is 
preserved properly for a smooth transition?

Some suggestions on the gentoo list have been:

-a, or -axAHX, or -apogXx, or -PvasHAX

or should I go with a combined -apogsvxAHPX ?

Or is all that necessary? Would -a be all I need?

Thanks for any comments/suggestions...

********** OT *********

If anyone cares to comment on the steps I've settled on, I'd appreciate 
that too:

1. Boot off of the latest gentoo LiveDVD

2. Mount /

mount /dev/sda3 /mnt/gentoo/

There should already be a /usr directory where it was being mounted 
before, right? If not, then I guess I create it with root:root 755 
permissions.

3. Mount old /usr to be moved/merged

vgscan
vgchange -a y
mount /dev/vg/usr /mnt/gentoo/oldusr

4. Copy /oldusr to /usr

rsync -a? /mnt/gentoo/oldusr/ /mnt/gentoo/usr/

Are the trailing slashes required/important/necessary?

Which arguments should I use?

5. Edit /etc/fstab and comment/remove the /usr line

nano -wc /mnt/gentoo/etc/fstab

#/dev/vg/usr       /usr        reiserfs        noatime         0 0

6. Unmount mounted filesystems

umount /mnt/gentoo/oldusr
umount /mnt/gentoo

7. Reboot into new system

Done?

-- 

Best regards,

*/Charles/*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20131202/2c517475/attachment.html>


More information about the rsync mailing list