There is still a race condition here. I does not attempt to start the array before detecting devices but it often starts it too early. My 4 devices RAID5 is, most of the time, either not assembled (i.e. 1 or 2 devices out of 4 is not enough) or assembled in degraded mode. An array should be assembled in degraded mode ONLY when no more devices are expected (or at least after a timeout)!
There is still a race condition here. I does not attempt to start the array before detecting devices but it often starts it too early. My 4 devices RAID5 is, most of the time, either not assembled (i.e. 1 or 2 devices out of 4 is not enough) or assembled in degraded mode. An array should be assembled in degraded mode ONLY when no more devices are expected (or at least after a timeout)!