Package: mdadm
Version: 2.6.7.2-1
Severity: minor

This patch warns if /etc/mdadm/mdadm.conf has some devices but not all.

I hadn't realised you were supposed to edit /etc/mdadm/mdadm.conf each
time you created a new md device.  

/usr/share/initramfs-tools/hooks/mdadm looks like it will ensure a
scan takes place if /etc/mdadm/mdadm.conf is devoid of any MD devices.
However if you have an one from a long time ago (and have perhaps just
added another MD device into your root volume group), only the
original MD device is assembled in the initramfs and you can't boot.

Hopefully this will save someone else hitting this issue.

Adrian
-- 
Email: [email protected]  -*-  GPG key available on public key servers
Debian GNU/Linux - the maintainable distribution   -*-  www.debian.org
--- /var/tmp/mdadm.orig	2009-03-11 20:55:01.000000000 +0000
+++ mdadm	2009-03-11 21:30:58.000000000 +0000
@@ -231,6 +231,18 @@
     esac
   done
 
+  # see if /etc/mdadm/mdadm.conf looks like it's missing devices
+  if [ -x /sbin/mdadm ]; then
+    /sbin/mdadm --detail --scan | while read array device rubbish; do
+      if !  echo $devs | grep -w $device >/dev/null; then
+        warn "You appear to be missing $device from /etc/mdadm/mdadm.conf"
+	warn "If this is required to boot you must add this line:"
+        rubbish=`echo $rubbish | sed 's/metadata=[^ ]* //'`
+	warn "$array $device $rubbish"
+      fi
+    done
+  fi
+
   for i in $INITRDSTART; do
     case "$INITRDSTART" in all|none|'') break;; *) :;; esac
     case "$devs" in

Reply via email to