tech-kern archive

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

Re: raid-on-raid during shutdown



On Tue, Mar 24, 2009 at 12:41:57PM -0400, der Mouse wrote:
> As a few of you may recall, I've been working with a machine for
> $DAYJOB on which raidframe is rather important.  It's been doing its
> jobs well - in almost all respects, at least; this is, unsurprisingly,
> about one of the exceptions.
> 
> This machine is set up RAID-on-RAID.  It's got a RAID 5 and a RAID 1
> that are each layered atop a bunch of single-member RAID 1s.  There are
> two downsides to this: one is that the upper-layer RAIDs can't be
> autoconfigured and the other is that shutdown doesn't close things down
> properly.  (There are of course upsides as well, or I wouldn't've done
> it to begin with, but these two downsides are what are of interest for
> the purposes of this note.)

I have some patches in my tree that may help.  They make the system try
to detach every device in the device tree, starting with the "leaves,"
before shutting down.

As my patch is now, the system tries just once to detach each device.
I think that it may be possible for the system to try to detach a
raid(4)-on-raid(4) instance before its underlying raid(4).  In order to
solve that problem, I think that the system needs to try another round
of detachments as long as some device is still attached and the system
detached some device in the previous round.  This is an easy extension
to the patch I'm running, today.

I think that in order for the system to tear devices down in a gentle
but orderly fashion, it's necessary to do something like this:

        do {
                detach all devices (including raid, cgd, vnd)
                unmount all filesystems
        } while (progress is being made or devices / filesystemss remain);

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933


Home | Main Index | Thread Index | Old Index