tech-userlevel archive

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

Re: swap-on-raidframe vs raidctl -P

On Tue, 22 Jan 2008, der Mouse wrote:
> > See <> for
> > my proposal from 2005.
> This works in almost all cases, but
> [...] the hierarchy can end up loopy.

I think it's an error to configure a loop in something that's supposed
to be a hierarchy.  I think it would be fine if the kernel paniced on
shutdown in such a case.

Even without loops, a setup like this would be problematic:

    1. configure raid0 on (disk1, disk2)
    2. configure raid1 on (disk3, disk4)
    3. mount filesystem on raid1
    4. configure vnd0 on filesystem
    5. modify raid0 to use (disk1, vnd0) instead of (disk1, disk2)

It's not feasible to have a shutdownhook to undo step 5, so (under my
proposal) we would end up with shutdownhooks for:

   4. unconfigure vnd0
   3. unmount filesystem
   2. unconfigure raid1
   1. unconfigure raid0

Here hook 4 would fail because vnd0 is in use.  Alternatively, hook
4 could be forced to succeed, leaving raid0 to think that a disk
had failed; and then the remaining shutdownhooks would succeed in
unconfiguring everything.

--apb (Alan Barrett)

Home | Main Index | Thread Index | Old Index