tech-kern archive

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

Re: raid-on-raid during shutdown

> 1) If a user unmounts a partition that is the last open partition,
> then we want to mark the RAID set as clean -- but we don't
> necessarily want to unconfigure the RAID set.

Right, of course.

> 2) If we're unconfiguring a RAID set, then there is still nothing
> that says we really should unconfigure any underlying RAID sets

Right again.

> 3) If we *are* in the process of shutting down the system, then we
> want to have everything unstack itself

And again.

That's the problem: we need some way to tell raidframe to unwind itself
on shutdown.

For my purposes, the shutdown hook works.  (I'm not mixing RAIDs with
other stackable devices, so I don't have to care about whether things
like cgd unwind themselves similarly.)  Jed's approach isn't a good
solution for shutdown, because some things are written to as, for
example, filesystems are unmounted, and the system then goes down
before they have a chance to go idle.  (It is certainly a valuable
thing to do in general, since it means that a system that (eg) loses
power unexpectedly has a decent chance of having RAIDs marked as clean
if they actually are clean.  Just that it isn't a panacea for unclean
RAIDs at shutdown.)

Ideally, I think they should all be done: stackable devices should do
basically what raidframe does with doing_shutdown in their close
routines, and should register shutdown hooks to trigger teardown of
closed but configured units.  (Detaching everything detachable a la
dyoung's work may also help, but strikes me as more for dealing with
removable hardware like PCMCIA than for things like this.  But perhaps
the two forms of teardown can be conflated.)

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML      
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index