Mittwoch, 8. September 2010

Ode to autoreadonly

Have you ever come across unused md devices seen as autoreadonly?
 
This particular status is given to md devices lacking IO activity (as in, they never had any since they array was assembled).
If you are wondering why an md device should be started if no IO is taking place on it you are probably right - with one exception - it is legitimate to have swap on a md device.

This doesn't really cause any problem by itself, as soon as IO will start the device will automatically awake from this state, but there is something you should take care of.
Let's assume you are doing an autoinstallation, using (surprise surprise) Autoyast.
Without specifying a filesystem for those newly created mds, AY will do exactly what
it should - setting them up without further action.
Those are going to start in the (in)famous autoreadonly status, with a particularity - sync pending.
This is correct, the sides of the mirror never synced, and are currently readonly.
Practically it also means that you don't really have a working mirror.

If you do not manually take care of it, issuing for example a mdadm --readwrite in order to trigger a sync, you'll have quite some pain in case anything will happen to your storage.

Anything else? Well, do not forget that if by any chance your menu.lst contains a "resume=" option pointing to a md device, you'll get an autoreadonly status for free.
Either go for noresume, feel free to use a fake device to resume from or, if you have a real device that is not md, that one. If you change this early enough

AY related hint, try with a chrooted config:type="boolean">true</chrooted> in your chroot script

you can easily forget about all this rant, and live happily ever after.

Unrelated, but yummy QR of the day:
qrcode

0 Kommentare:

Kommentar veröffentlichen