Subject: Re: RAIDframe: why are only "root" raidsets closed on reboot/halt?
To: David Laight <david@l8s.co.uk>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 12/02/2002 15:42:31
On Tue, 26 Nov 2002, David Laight wrote:

> > > I note that if I "ccdconfig -U" for "raidctl -u" the stripe first,
> > > parity will stay clean.
> >
> > Right.  And this is the part that is missing for the shutdown/reboot.
> > Without doing the "ccdconfig -U" or "raidctl -u" on the stripe, the
> > underlying components (raid sets themselves) will always remain "in use".
> > That means that their parity bits will never get updated properly on
> > a shutdown.  Something like the following:
>
> Is there some merit in looping through the raid and unmount
> actions until no more progress is made?

Sorry for the delay, was out of town.

I think it would work better to go through all the raid volumes and ccds
and such, and mark them, "unconfig when not in use" or something. Then
when you unmount the last file system on one of them, it tears itself
down. The difference is the kernel does the tear-down, now a userland
program.

That way you can build a file system on top of a RAID5 made up of RAID1s.
When you unmount the file system, the RAID5 deactiveates itself, and as
each RAID1 goes to zero activity, it deactivates itself.

The main difference is that you don't need to loop through things in
userland, the right unwinding just happens.

Take care,

Bill