Bug#691710: unblock: mdadm/3.2.5-4 (pre-upload)

Michael Tokarev mjt at tls.msk.ru
Sun Oct 28 20:42:56 UTC 2012


Package: release.debian.org
Severity: normal
User: release.debian.org at packages.debian.org
Usertags: unblock

This is a "pre-upload unblock request" for mdadm/3.2.5-4.

Recently, upstream released a new version of mdadm, v3.2.6,
which contains only bugfixes or documentation improvements.

I'm cherry-picking only the most important changes from this
version.  These changes fixes a number of important bugs, each
of which is not of RC severity, but important enough to be
included into wheezy in my point of view.

Each of the bug has relatively low impact or probability, or
can be seen in only very specific configurations, but once you
hit it, it might be difficult to recover the data which was
on the raid array in question.  This is why I consider these
to be good candidates for wheezy.

This "unblock request" consists of two parts.  First, the "main"
part, which talks about several bugfixes:

Here are the list of changelog entries of this nature:

  * Fix 'enough' function for RAID10, to prevent starting of a RAID10
    array which does not have required minimum of component devices.
    (Closes: #691668).

  * fix segfaults in Detail() - mdadm --detail may segfault if a drive
    has been removed from the array (Closes: #691670)

  * super0: do not override uuid with homehost.  The bug prevented
    re-creating an array with v0.90 superblock with the specified uuid
    when homehost is also specified.  (Closes: #686703)

Each of the above 3 patches fixes specific bugs relevant to data stability,
so to say.

  * several fixes for mdmon argument processing (Closes: #691671):
    - allow --takeover when original was started with --offroot
    - fix arg parsing.
    - fix arg processing for -a

The last series - mdmon argument processing fixes - is not directly
relevant for version of the package currently in wheezy, since mdmon
utility there is not used right now.  For this reason, the fixes above
are of zero risk for configurations which are directly supported by
mdadm debian package infrastructure.  However, mdmon is required to
support raid arrays with "external" metadata, which are all the
"fakeraid" arrays (ahci and other in-chipset implementations), found
in almost all modern motherboards or PCs.  These tiny bugfixes allows
usage of such arrays in saner way.  More about mdmon is below.

While at it, I'm also fixing 2 minor issues with packaging which were
slipped in - one debian/changelog typo and an inverse logic in
`/etc/init.d/mdadm status' handling (#686100).

Debdiff between current version in wheezy (3.2.5-3) and the proposed
release attached in file named mdadm_3.2.5-4.debdiff.

Whole packaging is done in git, and each change is visible in the
git repository on git.debian.org, maybe this one is easier to review:
http://anonscm.debian.org/gitweb/?p=pkg-mdadm/mdadm.git;a=shortlog;h=master


And second, there's a second part, which talks especially about mdmon
and usage of arrays with external metadata.

There's one bugreport of RC severity, filed by Miquel van Smoorenburg,
who requested a new feature: adding support for raid arrays with
"external" metadata.  It is #684708.

First, a little explanation.

mdadm utility is used to manage raid arrays.  For native linux arrays,
only 2 components are necessary: mdadm utility to start/stop/etc, and
the kernel to handle all the rest.  However, for arrays with non-native
formats/metadata, metadata updates are handled by external program,
kernel sends events affecting metadata to userspace and expects an
external program to udpate the metadata using whatever format it is in.
This external program is mdmon.  Kernel refuses to make the device
read-write unless such external prgram is running for the array in
question.

When mdadm is asked to assemble such a non-native array, it tries to
execute mdmon automatically.  Once running, it will handle metadata
updates from kernel, and the array becomes fully operational.  No
additional actions are necessary, mdadm does it all internally.

If such non-native arrays are assembled from initramfs, mdmon should
be in the initramfs too, because else, say, ext4 journal replay
(which is done even on a read-only mount) can not be completed,
so an uncleanly umounted ext4 can't be mounted.  And we need to
just provide mdmon binary in initramfs for the whole thing to
start working.

But we also need 3 extra steps _after_ such an array is started:
first, we need to restart mdmon from real root once the system is
booted, in order to release initramfs.  Second, we need to ensure
that these mdmon processes will not be killed by sendsigs during
shutdown, because mdmon might still be needed after sendsigs is
done - when umounting filesystems etc.  And third, we need to
wait for such arrays to settle down (to sync metadata etc) at
the very end of the shutdown process (mdmon need to finish its
task there), or else at next boot the array will not be clean.

Miquel provided a patch implementing all this, and I reworked it
a bit.

In the second attached file, named mdadm_3.2.5-4+mdmon.debdiff,
there's incremental debdiff between version described above,
and the one which implements this mdmon functionality.

And one more thing -- the udeb now includes mdmon binary -- for
exactly the same reason, mere presence of this binary is enough
to start such non-native raid array from within the installer.
There's no other changes which affects udeb/d-i in this release.


Both set of changes is included into mdadm_3.2.5-4+mdmon which
I uploaded to experimental today.

I don't know which changes the release team will decide to be
okay or not okay for wheezy, -- so I'm asking first, before
uploading it to unstable.

I'll upload will be okay for the release team (and for the d-i team
as well!) to unstable, if at all.

Thank you for your time!

/mjt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mdadm_3.2.5-4.debdiff
Type: text/x-diff
Size: 12372 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20121029/9018bf7b/attachment-0002.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mdadm_3.2.5-4+mdmon.debdiff
Type: text/x-diff
Size: 6069 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20121029/9018bf7b/attachment-0003.diff>


More information about the pkg-mdadm-devel mailing list