Genkernel generates an initramfs. It lacks the functionality to run degraded mdadm arrays.
Steps to Reproduce:
1. Put mdadm raid1 in degraded state (by removing 1 of 2 drives).
2. Then reboot the system.
3. Initramfs reports that it can't find rootfs, prompts user to type "shell" for a shell, "q" to skip.
Initramfs reports that it can't find rootfs, prompts user to type "shell" for a shell, "q" to skip.
Degraded raid1 should be assembled with 1 of 2 drives. Normal boot order.
Looks like initramfs assembles mdadm arrays using udev rules with --incremental command to mdadm. Once it finds a block device like /dev/sd* it tries to add disk/partition to mdadm array. Array becomes active after adding all disks/partitions to it.
In my case raid1 is degraded, udev adds only one partition to it and leaves the array in inactive state. There're no other scripts or actions that could run a degraded array.
In order to continue booting I have to enter recovery shell (prompted by initramfs). Then execute:
mdadm --stop /dev/md3
mdadm --assemble --run /dev/md3
Another workaround is to patch genkernel's initrd.scripts to re-assemble all arrays according to mdadm.conf.
This is critical for servers, since the remote access will be lost upon reboot.