Is it possible to boot from a system where /boot is located within an lvm2 raid1 partition. I've tried a variety of configurations, but I have yet to discover how to do it.
I am using two 2TB disks. Each disk contains a GPT partition table with a 1MB bios_grub partition and a 2TB partition. The large 2TB partition on each disk is allocated as a physical volume to lvm2.
I am using Ubuntu 14.04 LTS as my OS. Initially I configured Ubuntu with two 5GB logical volumes. The first one for / and the second for /home. The Ubuntu setup did not have options to configure these logical volumes with a segment type of raid1. So, I just installed it with what it defaulted to, which was linear. This worked fine and the system booted without any issues.
I then rebooted into a live CD environment, and converted the two partitions into raid1 with the following commands.
lvconvert --type raid1 -m1 /dev/vg_storage/os_root lvconvert --type raid1 -m1 /dev/vg_storage/os_home
These operations completed without any errors. I then monitored the progress of lvm2 mirroring both of these logical volumes until copy% was 100%
root@ubuntu:~# lvs LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert os_home vg_storage rwi-a-r-- 4.66g 100.00 os_root vg_storage rwi-a-r-- 4.66g 100.00
Now the system fails to boot. I get the following error immediately after BIOS attempts to boot from the first of the two disks. And I am left with a grub rescue prompt.
error: disk 'lvmid/L1VIor-PKIM-mtCO-TUQ2-iWe2-ndnY-df2wOu/yCDXMZ-2q4X-jbJJ-qZhI-sHNL-hrjw-Q5bg6v' not found. Entering rescue mode... grub rescue>
I'm thinking there is a grub2 module that isn't being loaded. One that supports the raid1 functionality of lvm2. Either that or such support does not yet exist within grub2.