Bug#684708: mdadm: support external metadata arrays correctly

Miquel van Smoorenburg miquels at debian.org
Tue Oct 2 13:20:03 UTC 2012


Package: mdadm
Version: 3.2.5-1

[version 2 of the patch]

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 the following:

- 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
  arrays that are still running, it calls mdadm --wait-clean to wait
  for the array to go idle.  This is needed so that the array is marked
  clean, otherwise it will start to resync at the next boot.
- it adds a few lines to /etc/init.d/mdadm for the start and stop actions:
  o start: if a mdmon pidfile is found in /run/mdadm, restart mdmon
  o stop: link pidfiles of mdmon processes into /run/sendsigs.omit.d,
    and make sure that happens before sendsigs runs.
- RUNDIR in /etc/init.d/mdadm is set to /run. This is sure to be ok:
  mdadm itself is already compiled with rundir hardcoded to /run.

Note that I've made sure that this actually doesn't do /anything/
if you do not have running MD arrays with external metadata. Iow,
this should not break anything, or cause regressions.

I have added support for installation on Intel Matrix raid (imsm)
arrays using mdadm to d-i, and I'll be sending patches to the debian-boot
list soon. Please consider this patch for inclusion in wheezy.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mdadm-3.2.5-mdmon.v2.patch
Type: text/x-diff
Size: 6159 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20121002/ad931f07/attachment.patch>


More information about the pkg-mdadm-devel mailing list