Re: Incorrect in-kernel bitmap on raid10

Mario 'BitKoenig' Holbe
2009-05-03T13:22:30Z

[-- Attachment #1: Type: text/plain, Size: 1368 bytes --]

On Sun, May 03, 2009 at 08:41:49AM +1000, NeilBrown wrote:
> I managed to reproduce this thanks to all the detail you provided.
> The problem was caused by trying to add a device to the array while the
> array was readonly.

Okay, I understand. I was just trying to find a way to sync all the
spares simultaneously.

> Can you duplicated the problem without setting the array to readonly?

No, mdadm -A /dev/md7; mdadm --add /dev/md7 /dev/sd[fgh]1 seems to
respect the bitmap, but first adds the first spare only and the two
remaining spares when the first resync has been finished.

According to your previous mail, I will run into your case 3/ this way,
the bug where the bitmap is cleared too early, will I?
I'm very willing to test your announced patch :)

> Yes, it would be nice to be able to add multiple devices at once.
> Maybe I could just get the kernel to wait 100ms after an add before

This is probably the easiest way to work around this issue on the short
run. However, such kind of timeouts cry for race conditions. Perhaps,
allowing to add spares in read-only mode or some flag like "wait for
confirmation before starting to resync" would be a cleaner approach on
the long run.

Thank you very much for your help
Mario
--
Gemuese schmeckt am besten, wenn man es kurz vor dem Verzehr durch ein
Schnitzel ersetzt!

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 481 bytes --]