tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: RAIDframe nested autoconfiguration
David Brownlee <abs%NetBSD.org@localhost> writes:
> Is the order in which 'presumed degraded' disks are configured
> deterministic? For example, in ascending id order?
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
other.
More specifically, and cribbing from my own changed comments in
rf_autoconfig():
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
disks).
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.
--
(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l)))))) (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k))))))) '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))
Home |
Main Index |
Thread Index |
Old Index