Bug#519999: mdadm: Init script calls modprobe with argument it no longer recognizes

Jan Hudec bulb at ucw.cz
Mon Mar 16 19:52:15 UTC 2009


Package: mdadm
Version: 2.6.8-12-gb47dff6-2
Severity: important
Tags: patch

After recent upgrade, mdadm stopped working for me. The modules did not
load and thus array was not assembled. Manual inspection revealed, that when
modprobe is called as:

  modprobe -kq md

from /etc/init.d/mdadm-raid, it complains about unrecognized option -k and
does nothing.

People who have root on md device are not affected, because the script used
in initramfs does not specify that option.  Attached patch removes -k option
from all invocations of modprobe I found in the package. The one in
mdadm-raid was the one that hit me.

Since there was no upgrade of mdadm, but there was upgrade of
module-init-tools, I am CC'ing it's maintainer. I leave it up to you to
consider whether modprobe should silently ignore -k for compatibility with
legacy scripts.

Because I use etckeeper, I can tell you the packages I upgraded between last
successful and today's unsuccessful boot:

    Date: Sat Mar 14 11:18:21 2009 +0100
    Package changes:
    -asciidoc 8.2.7-2
    +asciidoc 8.2.7-3
    -awesome 3.2~rc4-1
    +awesome 3.2-1
    -dictionaries-common 1.1.1
    +dictionaries-common 1.2.0
    -groff 1.18.1.1-21
    -groff-base 1.18.1.1-21
    +groff 1.18.1.1-22
    +groff-base 1.18.1.1-22
    -libdes425-3 1.6.dfsg.4~beta1-9
    +libdes425-3 1.6.dfsg.4~beta1-11
    -libgssapi-krb5-2 1.6.dfsg.4~beta1-9
    +libgssapi-krb5-2 1.6.dfsg.4~beta1-11
    -libgssrpc4 1.6.dfsg.4~beta1-9
    +libgssrpc4 1.6.dfsg.4~beta1-11
    -libhesiod0 3.0.2-18.3
    +libhesiod0 3.0.2-19
    -libk5crypto3 1.6.dfsg.4~beta1-9
    -libkadm5srv5 1.6.dfsg.4~beta1-9
    +libk5crypto3 1.6.dfsg.4~beta1-11
    +libkadm5srv5 1.6.dfsg.4~beta1-11
    -libkdb5-4 1.6.dfsg.4~beta1-9
    +libkdb5-4 1.6.dfsg.4~beta1-11
    -libkrb5-3 1.6.dfsg.4~beta1-9
    -libkrb5-dev 1.6.dfsg.4~beta1-9
    -libkrb53 1.6.dfsg.4~beta1-9
    -libkrb5support0 1.6.dfsg.4~beta1-9
    +libkrb5-3 1.6.dfsg.4~beta1-11
    +libkrb5-dev 1.6.dfsg.4~beta1-11
    +libkrb53 1.6.dfsg.4~beta1-11
    +libkrb5support0 1.6.dfsg.4~beta1-11
    -mc 2:4.6.2~git20080311-4
    +mc 2:4.6.2-1
    -module-init-tools 3.7-pre5-1
    +module-init-tools 3.7-pre9-1
    -x11proto-core-dev 7.0.14-2
    +x11proto-core-dev 7.0.15-1

    Date: Fri Mar 13 17:02:26 2009 +0100
    Package changes:
    -alsa-base 1.0.17.dfsg-4
    +alsa-base 1.0.19.dfsg-1
    -autoconf-doc 2.59-3
    -kde-icons-oxygen 4:4.2.1-1
    +kde-icons-oxygen 4:4.2.1-2
    -kdebase-runtime 4:4.2.1-1
    -kdebase-runtime-bin-kde4 4:4.2.1-1
    -kdebase-runtime-data 4:4.2.1-1
    +kdebase-runtime 4:4.2.1-2
    +kdebase-runtime-bin-kde4 4:4.2.1-2
    +kdebase-runtime-data 4:4.2.1-2
    -kdelibs-bin 4:4.2.1-1
    +kdelibs-bin 4:4.2.1-2
    -kdelibs5 4:4.2.1-1
    -kdelibs5-data 4:4.2.1-1
    +kdelibs5 4:4.2.1-2
    +kdelibs5-data 4:4.2.1-2
    -libpod-pom-perl 0.17-6
    +libpod-pom-perl 0.18-1
    -libxi-dev 2:1.2.0-2
    -libxi6 2:1.2.0-2
    +libxi-dev 2:1.2.1-1
    +libxi6 2:1.2.1-1
    -libxrandr-dev 2:1.2.3-1
    -libxrandr2 2:1.2.3-1
    +libxrandr-dev 2:1.3.0-1
    +libxrandr2 2:1.3.0-1
    -linux-sound-base 1.0.17.dfsg-4
    +linux-sound-base 1.0.19.dfsg-1
    -x11proto-randr-dev 1.2.99.3-2
    +x11proto-randr-dev 1.3.0-1


-- Package-specific info:
--- mount output
/dev/sda1 on / type ext3 (rw,relatime)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/md0 on /home type ext3 (rw,relatime)
/home/.tmp on /tmp type none (rw,bind)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)

--- I have reinstalled the package while trying to find the root of the
    problem. During that, the package configuration step regenerated the
    mdadm file. First the new version, than the original. Unfortunately,
    I can't similarly compare the initrd content, because that is not
    versioned by etckeeper.
--- mdadm.conf (version after reinstall -- matches the debconf settings)
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=8abb4a39:a40aea90:4c43ed57:183200f0

# This file was auto-generated on Mon, 16 Mar 2009 19:58:43 +0100
# by mkconf $Id$

--- mdadm.conf (previous version):
DEVICE partitions
MAILADDR root
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=8abb4a39:a40aea90:4c43ed57:183200f0

--- /proc/mdstat:
Personalities : [raid1] 
md0 : active raid1 sdb2[0] sda3[1]
      238356288 blocks [2/2] [UU]
      
unused devices: <none>

--- /proc/partitions:
major minor  #blocks  name

   8     0  293056295 sda
   8     1   48853633 sda1
   8     2    5839627 sda2
   8     3  238356405 sda3
   8    16  244198584 sdb
   8    17    5839596 sdb1
   8    18  238356405 sdb2
   9     0  238356288 md0

--- initrd.img-2.6.26-1-amd64:
42097 blocks
scripts/local-top/mdadm
etc/mdadm
etc/mdadm/mdadm.conf
lib/modules/2.6.26-1-amd64/kernel/drivers/md/raid1.ko
lib/modules/2.6.26-1-amd64/kernel/drivers/md/multipath.ko
lib/modules/2.6.26-1-amd64/kernel/drivers/md/md-mod.ko
lib/modules/2.6.26-1-amd64/kernel/drivers/md/dm-mirror.ko
lib/modules/2.6.26-1-amd64/kernel/drivers/md/dm-mod.ko
lib/modules/2.6.26-1-amd64/kernel/drivers/md/raid0.ko
lib/modules/2.6.26-1-amd64/kernel/drivers/md/linear.ko
lib/modules/2.6.26-1-amd64/kernel/drivers/md/dm-log.ko
lib/modules/2.6.26-1-amd64/kernel/drivers/md/raid10.ko
lib/modules/2.6.26-1-amd64/kernel/drivers/md/raid456.ko
sbin/mdadm

--- /proc/modules:
raid1 24192 1 - Live 0xffffffffa04bd000
md_mod 80164 2 raid1, Live 0xffffffffa04a8000
dm_snapshot 19400 0 - Live 0xffffffffa04a2000
dm_mirror 20608 0 - Live 0xffffffffa0015000
dm_log 13956 1 dm_mirror, Live 0xffffffffa0010000
dm_mod 58864 3 dm_snapshot,dm_mirror,dm_log, Live 0xffffffffa0000000

--- /var/log/syslog:

--- volume detail:

--- /proc/cmdline
root=/dev/sda1 ro console=tty0 vga=794 

--- grub:
kernel		/boot/vmlinuz root=/dev/sda1 ro console=tty0 vga=794 
kernel		/boot/vmlinuz.old root=/dev/sda1 ro console=tty0 vga=794 
kernel		/boot/vmlinuz root=/dev/sda1 ro console=ttyS1,115200n8 console=tty0 vga=794 


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (100, 'experimental')
Architecture: amd64 (x86_64)

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

Versions of packages mdadm depends on:
ii  debconf                       1.5.26     Debian configuration management sy
ii  libc6                         2.9-5      GNU C Library: Shared libraries
ii  lsb-base                      3.2-20     Linux Standard Base 3.2 init scrip
ii  makedev                       2.3.1-88   creates device files in /dev
ii  udev                          0.125-7    /dev/ and hotplug management daemo

Versions of packages mdadm recommends:
ii  exim4-daemon-light [mail-tran 4.69-9     lightweight Exim MTA (v4) daemon
ii  module-init-tools             3.7-pre9-1 tools for managing Linux kernel mo

mdadm suggests no packages.

-- debconf information:
* mdadm/autostart: true
* mdadm/mail_to: root
  mdadm/initrdstart_msg_errmd:
* mdadm/initrdstart: none
  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
-- 
						 Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-k-from-modprobe-params.diff
Type: text/x-diff
Size: 1702 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20090316/c18af23a/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20090316/c18af23a/attachment.pgp 


More information about the pkg-mdadm-devel mailing list