Bug#639830: mdadm: alternative md-device names

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Tue Aug 30 17:22:55 UTC 2011


Package: mdadm
Version: 3.1.4-1+8efb9d1
Severity: important

Dear Maintainer,
*** Please consider answering these questions, where appropiate ***

   * What led up to the situation?

unbootable system

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

modify /etc/initramfs-tools/modules
# List of modules that you want to include in your initramfs.
#
# Syntax:  module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
raid1
# sd_mod

   * What was the outcome of this action?

bootable system

   * What outcome did you expect instead?

bootable system

*** End of the template - remove these lines ***

My experience is that everything boils down to device names.

/dev/md0 and /dev/md/0 is the same device, AFAICT.
They should be handled as equaly.  This trivial patch:

--- /usr/share/initramfs-tools/hooks/mdadm.orig	2010-09-03 11:11:00.000000000 +0200
+++ /usr/share/initramfs-tools/hooks/mdadm	2011-08-30 18:31:11.454046079 +0200
@@ -235,10 +235,12 @@
   devs= levels=
   for i in $devpairs; do
     dev=${i%:*}
+    alt_dev=${dev%/*}${dev##*/}
     level=${i##*:}
     case "$INITRDSTART" in
-      all|*${dev}*)
+      all|*${dev}*|*${alt_dev}*)
         devs="${devs:+$devs }$dev"
+        devs="${devs:+$devs }$alt_dev"
         levels="${levels:+$levels }$level"
         ;;
       *) :;;

achieved just that, as in "works for me (tm)", but I'm a bit unsure :(
TIMTOWTDI.


Cheers,

-- 
Cristian





More information about the pkg-mdadm-devel mailing list