mdadm volume works, but won't assemble/mount on startup?

The issue is that the updated version of mdadm relies on the mdadm.conf present in your initrd, which is probably not accurate/complete. To verify its contents, do this:

gunzip -c /boot/initrd.img-2.6.38-11-generic | cpio -i --quiet --to-stdout etc/mdadm/mdadm.conf

If it doesn't contain accurate ARRAY entries, mdadm will try to use the name configured in the superblock as the link name under /dev/md/, which will link to something like /dev/md127. This obviously does not match the earlier behavior.

Rather than directly using mdadm -Ds or mdadm -Es to generate /etc/mdadm/mdadm.conf, it's probably better to use the /usr/share/mdadm/mkconf script:

sudo /usr/share/mdadm/mkconf force-generate /etc/mdadm/mdadm.conf

The most important step is to rebuild your initramfs to include the updated configuration:

sudo update-initramfs -u

Actually, thanks to the magic in /usr/share/initramfs-tools/hooks/mdadm, /usr/share/mdadm/mkconf will be run automatically if /etc/mdadm/mdadm.conf does not exist or contains no arrays. If it exists and contains only a subset of your active arrays, a warning is displayed for each missing array, and you should manually generate a new mdadm.conf.


You may also check that udev is loading mdadm.

Look for /lib/udev/rules.d/85-mdadm.rules; make sure that it has something like this:

\# This file causes block devices with Linux RAID (mdadm) signatures to
\# automatically cause mdadm to be run.
\# See udev(8) for syntax

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

If not copy this into /etc/udev/rules.d/85-mdadm.rules - NOTE /etc NOT /lib.