martin f. krafft: Check if all known arrays are listed in mdadm.conf
Martin F. Krafft
madduck at alioth.debian.org
Sat Apr 25 17:45:10 UTC 2009
Module: mdadm
Branch: master
Commit: b6ce13f1b19301164c53059654e177b0f8d304b9
URL: http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=b6ce13f1b19301164c53059654e177b0f8d304b9
Author: martin f. krafft <madduck at debian.org>
Date: Sat Apr 25 17:29:40 2009 +0200
Check if all known arrays are listed in mdadm.conf
Patch from Adrian Bridgett: the initramfs hook now checks to see if all known
arrays are listed in mdadm.conf and issues a warning if this is not the case.
Debian bug: 519328
Signed-off-by: martin f. krafft <madduck at debian.org>
---
debian/changelog | 3 +++
debian/initramfs/hook | 12 ++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 1d7f483..cbabd82 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,9 @@ mdadm (2.6.9-1) unstable; urgency=low
and since the alternative does not affect people who already have an MTA
installed, or have a preference, it won't affect them.
* Honour debconf pre-selection of mdadm/initrdstart (closes: #516802).
+ * Incorporate patch from Adrian Bridgett: the initramfs hook now checks to
+ see if all known arrays are listed in mdadm.conf and issues a warning if
+ this is not the case (closes: #519328).
-- martin f. krafft <madduck at debian.org> Thu, 12 Mar 2009 13:08:43 +0100
diff --git a/debian/initramfs/hook b/debian/initramfs/hook
index d824285..93ca081 100644
--- a/debian/initramfs/hook
+++ b/debian/initramfs/hook
@@ -231,6 +231,18 @@ if [ "$INITRDSTART" != none ] && [ -n "$devpairs" ]; then
esac
done
+ # see if /etc/mdadm/mdadm.conf looks like it's missing devices
+ if [ -x $MDADM ]; then
+ $MDADM --detail --scan | while read array device rubbish; do
+ if ! echo $devs | grep -qw $device; 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
More information about the pkg-mdadm-commits
mailing list