Peter Peltonen
2013-Nov-09 12:58 UTC
[CentOS] logical volume and drive names after mirroring a centos installation via rsync
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
Arun Khan
2013-Nov-09 15:08 UTC
[CentOS] logical volume and drive names after mirroring a centos installation via rsync
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'. HTH, -- Arun Khan Sent from my non-iphone/non-android device
James A. Peltier
2013-Nov-09 21:06 UTC
[CentOS] logical volume and drive names after mirroring a centos installation via rsync
----- Original Message ----- | 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 Why didn't you just remove the disk from server A and perform a dd of server B's disk onto the sdb disk that was in server A? Then you don't have to do anything as the disks are exact replica of each other. -- James A. Peltier Manager, IT Services - Research Computing Group Simon Fraser University - Burnaby Campus Phone : 778-782-6573 Fax : 778-782-3045 E-Mail : jpeltier at sfu.ca Website : http://www.sfu.ca/itservices ?A successful person is one who can lay a solid foundation from the bricks others have thrown at them.? -David Brinkley via Luke Shaw