linux rootmirror afterwards

1. Create VM witch 2 drives. Use drive 1 for install.
It installs /boot on partition sda1
It installs VolGroup/lv_root and lv_swap on partition sda2

2. Login and partition sdb to be equal to sda
Make sdb bootable: grub-install --recheck /dev/sdb

3. Add entry for (hd1,0) to /boot/grub/grub.conf
Copy /boot to sdb1
dd if=/dev/sda1 of=/dev/sdb1

4. Extend VolGroup
(sdb2 should have 8e flag)
vgextend VolGroup /dev/sdb2

5. lvconvert -dv -m 1 --corelog vg/lv_root /dev/sdb2
lvconvert -dv -m 1 --corelog vg/lv_swap /dev/sdb2

6. break the original disk
dd if=/dev/zero of=/dev/sda1
Ctrl+C
dd if=/dev/zero of=/dev/sda2
Ctrl+C
vgreduce --removemissing --force VolGroup

This entry was posted in linux. Bookmark the permalink.

Comments are closed.