Bug#675452: mdadm: initramfs script race condition between loading modules and assembling arrays

Alastair Irvine (Warpspace IT) alastair at plug.org.au
Fri Jun 1 10:11:08 UTC 2012


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

/usr/share/initramfs-tools/scripts/local-top/mdadm does not wait after
loading modules in the "Loading MD modules" step.  Therefore, when it
does the "Assembling all MD arrays" step the relevant modules might not
have created the /dev/md* nodes yet.

I have seen this happen on a live system:
1) raid modules are loaded
2) array assembly is attempted
3) assembly fails
4) drops to busybox prompt
5) kernel message appears showing discovery of md0 etc.

This issue cannot be solved by the rootdelay kernel parameter since the
issue relates to actions taken solely within the initramfs script.

/usr/share/initramfs-tools/scripts/local-top/mdadm has not been changed
between squeeze and wheezy.

-- Package-specific info:

Using stock /etc/default/mdadm

/etc/mdadm/mdadm.conf:
# definitions of existing MD arrays
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=b36f0bd4:cab828a7:5992f6ac:53538ad0
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=0dca4f37:f7ca8a5d:6063584c:84c0bcc1
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=0e5ea519:39088dae:f48fc6bd:56a6866b
ARRAY /dev/md3 level=raid5 num-devices=4 UUID=29333179:958cbe2e:e69bb13b:b2322f99

-- System Information:
Debian Release: 6.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mdadm depends on:
ii  debconf                 1.5.36.1         Debian configuration management sy
ii  libc6                   2.11.3-2         Embedded GNU C Library: Shared lib
ii  lsb-base                3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip
ii  makedev                 2.3.1-89         creates device files in /dev
ii  udev                    164-3            /dev/ and hotplug management daemo

Versions of packages mdadm recommends:
ii  module-init-tools       3.12-2+b1        tools for managing Linux kernel mo
ii  postfix [mail-transport 2.7.1-1+squeeze1 High-performance mail transport ag

mdadm suggests no packages.

-- debconf information:
  mdadm/autostart: true
  mdadm/mail_to: root
  mdadm/initrdstart_msg_errmd:
* mdadm/initrdstart: all
  mdadm/initrdstart_msg_errconf:
  mdadm/initrdstart_notinconf: false
  mdadm/initrdstart_msg_errexist:
  mdadm/initrdstart_msg_intro:
  mdadm/autocheck: true
  mdadm/initrdstart_msg_errblock:
  mdadm/start_daemon: true





More information about the pkg-mdadm-devel mailing list