Linux Raid using LVM
I am having problems booting into my newly created software raid device /dev/md1 using grub as my bootloader and /dev/md1 being a PV in LVM.
This is not my first attempt at this so I saved detailed information about how I set up this array so please ask if any additional information is needed. In short though, here is how I set this up:
I have a VG named /dev/rootvg which has the PV /dev/sda2. All of my OS filesystems are in this volume group.
• I added an identical size disk and used sfdisk to mirror the configuration of /dev/sda.
• Used fdisk to change the partition type of /dev/sdb2 from “LVM Linux” to “Linux raid autodetect”
• Created a raid device named /dev/md1 with one missing device and /dev/sdb2
• Ran pvcreate on /dev/md1 and added this PV to rootvg
• Ran pvmove /dev/sda2 /dev/md1
• Removed /dev/sda2 from rootvg and ran pvremove to remove it from LVM
• Used fdisk to change the /dev/sda2 partition from “LVM Linux” to “Linux raid autodetect”
• Added /dev/sda2 to /dev/md1 array and let the raid software complete the data sync
Now, rootvg is completely accessible and pvdisplay, vgdisplay all show what I would want which is /dev/md1 as being my PV. The problem I am having is when I reboot. I get a kernel panic with the error.
No volume groups found
Volume group “roovg” not found
For those dying in suspense. The solution was for me was to create a new initrd image and edit /boot/grub/grub.conf to use this new image. Here's the command I used to create the image:
mkinitrd --force-raid-probe --force-lvm-probe /boot/initrd-2.6.18-53.el5.raid.img 2.6.18-53.el5
Oh dear. Why are you doing such things so early in the morning? Or is it morning where you are? Argh. And why LVM on raid at all?
|All times are GMT -5. The time now is 01:04 AM.|