Bug#421915: mdadm doesn't detect raid6 arrays with --monitor --scan

Mikko Rasa tdb at mbnet.fi
Wed May 2 14:14:13 UTC 2007


Package: mdadm
Version: 2.5.6-9
Severity: normal
Tags: patch

In Monitor mode, mdadm fails to detect raid6 devices with --scan, and
thus the monitor daemon started by the init script does not monitor such
arrays.  The following patch fixes the problem:

*** begin patch ***
--- Monitor.c.orig	2006-10-23 02:28:20.000000000 +0300
+++ Monitor.c	2007-05-02 15:49:53.000000000 +0300
@@ -371,6 +371,7 @@
 				if (mse->devnum != MAXINT &&
 				    (strcmp(mse->level, "raid1")==0 ||
 				     strcmp(mse->level, "raid5")==0 ||
+				     strcmp(mse->level, "raid6")==0 ||
 				     strcmp(mse->level, "multipath")==0)
 					) {
 					struct state *st = malloc(sizeof *st);
*** end patch ***

I couldn't find any similar checks in other files with a quick grep, so
I hope other modes are not affected by this problem.

-- Package-specific info:
--- mount output
/dev/loop0 on / type ext3 (rw,errors=remount-ro)
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)
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/root on /mnt/initrd type cramfs (ro)
/dev/md0 on /mnt/storage type ext3 (rw,data=ordered)
/dev/sda1 on /boot type ext3 (rw)
/mnt/storage/home on /home type none (rw,bind)
nfsd on /proc/fs/nfsd type nfsd (rw)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

--- mdadm.conf
DEVICE partitions
MAILADDR root

--- /proc/mdstat:
Personalities : [raid6] [raid5] [raid4] 
md0 : active raid6 sdd2[6](F) sdb2[5] sda2[4] sdc2[3] sdf2[2] sde2[1]
      1250145792 blocks level 6, 64k chunk, algorithm 2 [6/5] [_UUUUU]
      
unused devices: <none>

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

   8     0  312571224 sda
   8     1      32098 sda1
   8     2  312536542 sda2
   8    16  312571224 sdb
   8    17      32098 sdb1
   8    18  312536542 sdb2
   8    32  312571224 sdc
   8    33      32098 sdc1
   8    34  312536542 sdc2
   8    48  312571224 sdd
   8    49      32098 sdd1
   8    50  312536542 sdd2
   8    64  312571224 sde
   8    65      32098 sde1
   8    66  312536542 sde2
   8    80  312571224 sdf
   8    81      32098 sdf1
   8    82  312536542 sdf2
   9     0 1250145792 md0
   7     0   10485760 loop0

--- initrd.img-2.6.18.1:

--- /proc/modules:
raid456 113168 1 - Live 0xf88a3000
xor 15048 1 raid456, Live 0xf885d000
md_mod 68468 2 raid456, Live 0xf8873000

--- volume detail:

--- /proc/cmdline
root=/dev/ram0 ro vga=ext init=/linuxrc 

--- grub:
menu.lst file not readable.


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.18.1 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=fi_FI.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages mdadm depends on:
ii  debconf [debconf-2.0]         1.5.13     Debian configuration management sy
ii  libc6                         2.5-2      GNU C Library: Shared libraries
ii  lsb-base                      3.1-23.1   Linux Standard Base 3.1 init scrip
ii  makedev                       2.3.1-83   creates device files in /dev

Versions of packages mdadm recommends:
ii  module-init-tools             3.3-pre4-2 tools for managing Linux kernel mo
ii  postfix [mail-transport-agent 2.4.0-3    A high-performance mail transport 

-- 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: false
  mdadm/initrdstart_msg_errblock:
* mdadm/warning:
* mdadm/start_daemon: true




More information about the pkg-mdadm-devel mailing list