In this case, this command found not md1, as desired, but md11.
The full line found was:
md11 : active (auto-read-only) raid1 sdm1[0] sdn1[1]
This is easily fixed with the following patch:
--- /usr/share/initramfs-tools/hook-functions 2008-12-18 16:41:11.000000000 +0000
+++ hook-functions 2010-09-23 17:31:56.000000000 +0100
@@ -256,7 +256,7 @@
fi
# lvm on md or luks on md
if [ "${block#md}" != "${block}" ]; then
- block=$(awk "/^${block}/{print substr($5, 1, 4); exit}"
+ block=$(awk "/^${block} /{print substr($5, 1, 4); exit}"
/proc/mdstat)
fi
block=${block%[0-9]*}
Subsequent bugs which were exposed by this one:
2) In this case md11 is marked auto-read-only (because it has not been
written to) which means that the fifth column is not a component device
name, but the raid level
3) the substr use here would presumably break discovery of component
devices with something other than exactly four characters.
but I'm not sure it's worth filing separate bugs for them, especially
since it looks like it's all changed in sid/sqeeze.
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100924164130.8230.78805.reportbug@gunboat-diplomat.oucs.ox.ac.uk">http://lists.debian.org/20100924164130.8230.78805.reportbug@gunboat-diplomat.oucs.ox.ac.uk