[CentOS] logical volume and drive names after mirroring a centos installation via rsync

Sat Nov 9 12:58:09 UTC 2013
Peter Peltonen <peter.peltonen at gmail.com>

I have a working CentOS5 installation on server A's first SATA drive (sda).
I had an empty SATA drive on that server (sdb).

I was asked to mirror the installation of server B (installed on first SATA
drive, sda), also running CentOS5, to the second drive (sdb) of server A.

I am unsure what should be done after mirroring to get the new system boot.


What I have done already:

- On server A/sdb I created the same partition layout and a little bit
bigger logical volumes as on server B/sda plus created the filesystems
(130G / fs and 200M /boot fs). The volume group and logical volumes have
different names. I have mounted the new volumes on server A.

- From server B/sda I rsynced all data to server A/sdb (excluding
/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found) whitle
most services were stopped on server B


Now I would need to figure out how to boot to the CentOS installation on
server A/sdb and I would like to ask about a few details:

- I am confused about the logical volume names: which ones should I use on
the new server's fstab, the old ones (rsynced from server B/sda) or the
ones I used when creating the logical volumes from server A? If I need to
use the new ones, should I update the names also somewhere else than fstab?

- As the new installation will boot from sdb instead of sda, do I need to
update this information somewhere (like /boot/grub/device.map) ?

- How do I install grub on the second drive? Do I simply command from the
A/sda installation:

grub-install /dev/sdb

?

- And to access this new grub I just mark the second drive as the boot
drive in BIOS and boot, yes?

- If I also wanted to boot to the new A/sdb system by using the grub in
A/sda installation, what should the entry in /boot/grub/menu.lst look like,
do I just change the hd(0,0) parameter to hd(1,0) and edit correct kernel
and initrd values?


Regards,
Peter