Comment 5 for bug 75681

Revision history for this message
Aurelien Naldi (aurelien.naldi) wrote : Re: initramfs script: race condition between sata and md

It looks like a race condition is still here: the initramfs tryes to assemble my RAID upon detection of /dev/sda. Obviously with 3 drives missing out of 4, it fails... Then, /dev/md0 is not here but inactive and not correctly created when the other drives are detected.

Is it possible to get and udev event when udev knows that all drives have been detected ?
I think that the best behaviour looks like:
- upon disk detection, scan for RAID volumes. If a volume is available, assemble it ONLY if all of its drives are present.
- try to assemble uncomplete (degraded) RAID volumes ONLY when ALL drives have been detected (i.e. if a drive is still missing, it will _not_ appear later).

This would make it faster without breaking things when a drive is just slow to answer.
Is it what the "udev-mdadm" and "udev-lvm" specs are for ? They seem to only deal with sending udev events for newly created md/lvm volumes, not about detecting/assembling them.