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

Sat Nov 9 15:08:22 UTC 2013
Arun Khan <knura9 at gmail.com>

On Sat, Nov 9, 2013 at 6:28 PM, Peter Peltonen <peter.peltonen at gmail.com> wrote:
> 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?

Yes, you need to use the new LVM device names in the /etc/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) ?

It depends are you going to remove 'sda' from the server.  In which
case your sdb will become the sda.   You will need to install grub on
this disk.

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

What are you planning to do with the 'old' sda?   Do you want to keep
it around until things check out with sdb?  In this case, you need to
add entry for the CentOS on sdb to the existing menu.lst.

> 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?

You could boot the OS on the second disk from grub on the first disk.
See above.

> - 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?

See above.   First finalize your strategy -- keep 'old' sda in the
system or remove it.  Depending on this you may or may not have to
install grub on the 'sdb'.

Arun Khan
Sent from my non-iphone/non-android device