Cloning OS - Kernel Won't Boot
Hi,
I have a few stand alone servers (RHEL 6.2) which I'm trying to configure OS backup procedure for.
My intention is to use a second internal device in the server with the same size to clone the boot device to it.
I created two partitions similar to the boot device - one for /boot (/dev/sda1) and another for LVM.
I added the second partition as a PV to the root Volume Group and converted each LV to be mirrored across both PVs.
I then reduced each Mirrored LV to one copy on the original PV and split the other PV to be a separated VG.
I've used dd and grub-install to use /dev/sdb1 as the boot partition.
I also edited fstab on the cloned root LV to reflect changes in the root VG name.
I then used dracut to create a new initramfs image and edited grub.conf on the cloned boot partition.
However, when I reboot the server and choose the second device as the boot device in BIOS, the grub menu appears but the Kernel does not start to load.
I get a blank screen with a "_" and nothing else, as if grub is unable to load the kernel according to what I've configured in grub.conf.
I'm certain I've missed a basic step somewhere in this procedure.
If anyone can help it would be much appreciated.
Thanks,
Yair
Responses
I don't have any absolute answers to this question (and now I want to try this as well).
Have you tried booting the host from Rescue Media and run a [pv|vg|lv]scan to make sure all your devices and volumes are sound? Also - have you tried using BLKID (and UUID) rather than Volume Names to configure.
Also - did you run your dracut after the Volume split? I believe the dracut grubs lvm.conf , but it should scan regardless and find the PVs and see the metadata to create the VG from that. One thing I wonder about is disk-alignment also. I.e. if you installed on sda and laid down the boot-blocks and then sda1/2 followed... as opposed to a new device (sdb1) and then you create sdb1 which might start at an earlier block on the disk.
[root@apoc backup]# egrep 'pe_[sc]|extent' centos
extent_size = 8192 # 4 Megabytes
pe_start = 2048
pe_count = 4994 # 19.5078 Gigabytes
start_extent = 0
extent_count = 512 # 2 Gigabytes
start_extent = 0
extent_count = 4482 # 17.5078 Gigabytes
Have you considered using MDadm instead? (sorry if I missed a requirement that makes software RAID not an option).
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
