[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: swap-on-raidframe vs raidctl -P
> As others have mentioned, this happens because the kernel doesn't
> unconfigure swap when in halts, so raid0b was still flagged as dirty
> when the machine halted, which means that it needs to be rewritten on
> the next boot.
> A proper fix would involve making the kernel unconfigure more stuff
> at halt time. This would have to deal with arbitrary layering of
In its full complexity, it would.
However, I think raidframe actually should forcibly close all open
raids late in shutdown, once there's no longer any opportunity for
anyone to write to them. Then they come out clean with no need to
diddle the swap code, the cgd code, all the things that can hold a
Hmm, raid-on-raid, I smell a chicken-and-egg issue. Perhaps we need a
way for subsystems to register shutdown cleanup functions which the
kernel calls iteratively until either everything is closed down or no
further progress is being made - like the current shutdown hooks except
for the looping aspect. Then when stacking vnd/cgd/raid/etc, at least
one thing (the deepest-stacked thing) would get closed down each time
around the loop...and if there's a loopy hierarchy (I'm having trouble
coming up with an example that wouldn't end up infinite-recursing at
run time, but I suspect one exists) then eventually it'll give up
because it's not making progress, which isn't great but is no worse
than what we have now.
> 2) Put swap and filesystems on separate raid devices (not just in
> separate partitions of the same device).
As it happens, I'd already done this. I'm not sure why, but it worked
out rather serendipitously. :-)
> Parity may still be dirty in the raid device used for swap, but
> at least the raid device used for file systems won't suffer.
...and the swap raid will be small enough that the rewrite will finish
comparatively fast. (Swap isn't always small, but it _is_ (almost)
always small compared to data filesystems.)
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents.montreal.qc.ca@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Main Index |
Thread Index |