Bug#684708: mdadm: support external metadata arrays correctly
Michael Tokarev
mjt at tls.msk.ru
Mon Aug 20 09:42:39 UTC 2012
On 13.08.2012 14:10, Miquel van Smoorenburg wrote:
> Package: mdadm
> Version: 3.2.5-1
> Severity: serious
> Tags: patch wheezy sid
>
> The initramfs hook supplied by mdadm doesn't install mdmon. Also, mdmon
> is not included in the .udeb for the installer.
>
> This means that if you have an array with external metadata (ddf or,
> more widely used, imsm - Intel Matrix Raid) that it will come up
> readonly. This causes the installer to hang or the system not being
> able to boot if root is on that array.
>
> The attached patch does a couple of things:
>
> - it makes sure mdadm is included in the initramfs and the udeb package
> - it adds a mdadm-waitidle script that runs just before reboot/halt. For all
> arrays that are still running, it sets safe_mode_delay to a low version,
> sets sync_action to idle, and waits for the array(s) to go idle.
> This is needed so that the array is clean, otherwise it will start
> to resync at the next boot.
> - it adds 2 lines of code to mdmon.c so that it symlinks its pidfile
> into /run/sendsigs.omit.d - mdmon should not be killed at shutdown,
> we still need it after the rootfs has been unmounted.
There's one more thing missing in there: mdmon should be re-started
from real root after switching from rootfs -- the takeover. I guess
it needs to be added to mdadm-raid.
BTW, why mdadm-waitidle is a separate script? Can't we fold it into
mdadm-raid directly?
The more I think about this all, the more it looks like it is too
heavily change for wheezy. I understand the situation, but I still
think it is not a good idea in general. Oh well.
Thanks,
/mjt
More information about the pkg-mdadm-devel
mailing list