Comment 12 for bug 136252

After doing a bit of digging it looks like the arrays are built using the --incremental option to mdadm, specifically with following UDEV rule:

SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="linux_raid*", \
 RUN+="/sbin/mdadm --incremental $env{DEVNAME}"

Here is my not-working mdadm.conf:

------------------------------------------------------------------------------------------------
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR <email address hidden>

# definitions of existing MD arrays

# This file was auto-generated on Wed, 27 Jan 2010 15:02:41 +1100
# by mkconf $Id$
------------------------------------------------------------------------------------------------

If I add a line:
ARRAY /dev/md0 level=raid1 num-devices=2 metadata=00.90 UUID=blah:blah:blah:blah

The system will boot fine, which suggests that we are breaking one of the rules that mdadm requires for --incremental to work (or mdadm has a bug).

My first thoughts are:
1. is /proc/partitions is valid at the point where this UDEV rule runs.
2. does the homehost match. i.e. is gethostname working when this rule runs?

This is about where my knowledge is exhausted.

-Patrick