I am fairly "green" when it comes to setting up RAIDs and LVM, but I can't work out why this setup doesn't work as intended. I have a server with two physical HDD's, upon which I'd like to setup things in a software RAID such that either drive can fail and the machine remain functional.
+------+------------+
| swap | / (root) |
| 5 GB | 113.5 ext4 |
+-----------+-------------------+
| /boot | LVM |
| 1 GB ext4 | 118.5 GB |
+----------------------+-----------+-------------------+
| EFI system partition | RAID 1 | RAID 1 |
| 500 MB | 1 GB | 118.5 GB |
+----------------------+-----------+-------------------+
| HDD (120 GB) |
+------------------------------------------------------+
ie. both drives are configured identically, and the RAID's span both drives.
However, when I remove drive #1, the system boots to some state but tells me it cannot find my root LVM volume group and fails to come up fully. When I remove drive #2, the system cannot boot at all.
If more detail is needed I can provide it, but is there some fundamental design flaw with this configuration?
cat /proc/mdstat
both when it's working and when you pull drive #1 (you might have to boot from rescue disk for it)? Also, did you pull drive #2 right after putting drive #1 back? the drives would need to rebuild before you can do that..lsblk
andfdisk -l
would probably help us a bit./proc/mdstat
doesn't exist. I configured this as part of Ubuntu's setup, and I assumed it was usingmdadm
. Clearly not 🤔fdisk
for old school BIOS boot or 512 MB EFI boot partition if you want to use UEFI) as the first partition for both disks and another "Linux RAID" partition for the rest of the disk (minus 10 MB of empty space at the end to allow easy replacement to almost identical disk from another manufacturer, sector counts may differ a bit between manufacturers). Then rungrub-install
for both drives and put LVM on of top mdraid.