tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RAIDframe nested autoconfiguration

On Tue, 24 Mar 2009, Jed Davis wrote:

The order should be deterministic, but perhaps not useful; and all
presumed-degraded sets known to exist at any given point will all be
handled at once, without allowing partitions of one to be added to any

More specifically, and cribbing from my own changed comments in

1. Locate all RAID components on regular disks.

2. Sort them into their respective sets.

3. Evaluate each set and configure those having all their components,
  accumulating a list of any components found within those RAID disks.
  (Also, retain any sets not able to be configured here for use by
  future passes through step 2.)

4. If any such components were found, goto 2.

5. As step 3, but including sets missing few enough components to be
  brought up in degraded mode.

6. If any new components were found inside those sets, goto 2.

(All of this applies only to components with the autoconfiguration flag
set, of course.)

Thus, if there's a raid0 of [sd0e, sd1e, missing] and a raid1 of [sd2e,
sd3e, missing], then that will reach step 5 and configure them both
before inspecting the component labels on either raid0e or raid1e.

But, if raid0 is [sd0e, sd1e, wd0e], then that gets handled in step 3
because it's all there, and then raid0e is recognized as the missing
part of raid1, so raid1 is configured on the next trip through step 3,
and everything is happy.  This applies just as well if it's raid1e that
is the component of raid0e (and raid1 is the one built on three physical

On the other hand, if the separation of steps 3/4 and 5/6 weren't there,
then raid1 resp. raid0 would always be configured in degraded mode, even
when all the necessary physical disks were present.

        I'm probably missing something (and not intending to denigrate
        the already better situation your patches have introduced :),
        but if the loop in step 5 was adjusted to encompass 6 as well
        (so after each configuration it checked for new components
        and looped back to 2 if any were found), *and* the loop went
        in strictly ascending raid id order, then the the 'raid1 using
        a degraded raid0 as a component' should work as expected?

                David/absolute       -- No hype required --

Home | Main Index | Thread Index | Old Index