Moving/merging a filesystem back into /
CMarcus at Media-Brokers.com
Mon Dec 2 12:31:23 MST 2013
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
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
3. Mount old /usr to be moved/merged
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
7. Reboot into new system
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rsync