Comment 106 for bug 75681

Revision history for this message
Peter Haight (peterh-sapros) wrote :

There is a problem with the solution outlined by Scott James Remnant above. (https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/75681/comments/84)

What happens when one of the raid devices has failed and it isn't getting detected? Take Scott's example a raid with (sda1 and sdb1):

> This should work as follows:
> * an underlying block device, sda1, is detected
> * udev (through vol_id) detects that this is a RAID member
> * udev invokes mdadm, which fails to assemble because the RAID-1 is not complete
> * the creation of a new raid, md0, is detected
> * udev fails to detect this device, because it is not yet complete

At this point, mdadm should assemble the RAID with just sda1 because sdb1 is down, but in the current scheme mdadm only assembles the RAID if all drives are available. This sort of defeats the point of using any of the mirrored RAID schemes.

So because the only case that I know of where this is an issue is a case with drive failure, how about trying to run mdadm again after the root mount timeout, but this time without the --no-degraded arg so that if we can assemble some of the RAID arrays without the missing drives, we do it.

I'll attach some patches to some /usr/share/initramfs-tools scripts which fix this problem for me.

So then the question is how do we know that sdb1 is down and should go ahead with assembling the RAID array? I'm not sure exactly what kind of information we have this early in the bootup process, but how about something like this