Quantcast
Channel: FedoraForum.org
Viewing all articles
Browse latest Browse all 35424

Help: GRUB2, software RAID and LVM

$
0
0
Anyone out there know about software RAID and LVM in grub2? I'm having real trouble getting it to work. I have an F19 system in a server, which has a reasonably large and fast RAID disk (software RAID0 over hardware RAID1 - this configuration chosen because the hardware RAID controller only supports levels 0 and 1). I'll call this RAID array md0 (that's what grub2 calls it). Currently, the system boots from and to a small and relatively slow 2.5" disk, call it sda, with the system being on an lvm logical volume SLOWVG/root. I'm happy to leave the boot partition on sda, but I would like to move the system to lvm logical volumes on a volume group (called RAIDVG) sitting on md0. So far, I have
  1. copied SLOWVG/root to a volume FASTVG/root. I did this using an lvm snapshot and dd-ing the snapshot, then deleting the snapshot, as documented here, so that SLOWVG/root and FASTVG/root have different UUIDs, and I also changed the UUID of the ext4 filesystem in FASTVG/root
  2. edited /etc/default/grub to include the line
    Code:

    GRUB_PRELOAD_MODULES="raid mdraid09 lvm"
    to make sure the relevant RAID and LVM modules were loaded
  3. added a new menuentry for booting from FASTVG/boot to /etc/grub.d/40_custom by taking the current menuentry for booting from SLOWVG/boot from /boot/grub2/grub.cfg and copying it to 40_custom, editing to replace all references to SLOWVG with FASTVG, and changing the corresponding references
  4. running grub2-install and grub2-mkconfig -o /boot/grub2/grub.cfg, to make sure the changes were reflected in the boot installation
It isn't working. When I try to boot from FASTVG, the boot fails. The reason for the failure, when I check the logs, is clear: grub2 only searches sda for FASTVG, it doesn't search md0. I think I know why: when I run "ls" from the grub prompt, I see md0 and sda listed, and I also see SLOWVG listed. But I don't see FASTVG. That is, even with modules lvm and mdraid09 loaded, grub2 seems to fail to search md0 for lvm VGs (I'm pretty sure they are loaded, because I wouldn't see SLOWVG if lvm wasn't loaded, and I wouldn't see md0 if mdraid09 wasn't loaded). Is there some other module needed to handle the combination? Or is there a known bug in searching this combination?

TIA for any help on this
Best Wishes
Bob

Viewing all articles
Browse latest Browse all 35424

Trending Articles