Bug#474548: mdadm: error hot-adding drive to raid1 array after fail

Alex Samad alex at samad.com.au
Sun Apr 6 13:25:48 UTC 2008


Package: mdadm
Version: 2.6.4-1
Severity: normal


seems like there is an error in 2.6.x stream of mdadm, when trying to
hot add a disk to a raid1 array after 1 disk failed.

I tried to do it and I kept getting errors. down graded to 2.5.x and it
worked fine.

Found this thread (with patch)

http://www.mail-archive.com/linux-raid@vger.kernel.org/msg10248.html

Alex

-- Package-specific info:
--- mount output
/dev/md1 on / type ext3 (rw,errors=remount-ro,acl)
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)
none on /selinux type selinuxfs (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/md0 on /boot type ext3 (rw)
/dev/mapper/raid0-tmp on /tmp type ext3 (rw,noexec,nosuid,nodev,noatime,nodiratime)
/dev/mapper/raid0-varlog on /var/log type ext3 (rw,noatime,nodiratime,acl)
/dev/mapper/raid1-home on /home type ext3 (rw,noatime,nodiratime,acl)
/dev/mapper/raid1-alexhome on /home/alex type ext3 (rw,noatime,nodiratime,acl)
/dev/mapper/raid1-anastazia on /home/anastazia type ext3 (rw,noatime,nodiratime,acl)
/dev/mapper/raid1-kathrinhome on /home/kathrin type ext3 (rw,noatime,nodiratime,acl)
/home/alex/Maildir on /home/alex/Maildir type none (rw,bind)
/home/kathrin/Maildir on /home/kathrin/Maildir type none (rw,bind)
/dev/mapper/raid1-bblxfw01 on /home/bblxfw01 type ext3 (rw,nosuid,nodev,noatime,nodiratime,acl)
/dev/mapper/raid0-squid on /var/cache/squid type ext3 (rw,noexec,nosuid,nodev,noatime,nodiratime,acl)
/dev/mapper/raid1-apt--cacher on /var/cache/apt-cacher type ext3 (rw,noexec,nosuid,nodev,noatime,nodiratime,acl)
/dev/mapper/raid0-apt on /var/cache/apt type ext3 (rw,noexec,nosuid,nodev,noatime,nodiratime,acl)
/dev/mapper/raid1-downloads on /exports/downloads type ext3 (rw,nosuid,nodev,noatime,nodiratime,acl)
/dev/mapper/raid1-video on /exports/video type ext3 (rw,noexec,nosuid,nodev,noatime,nodiratime,acl)
/dev/mapper/raid1-music on /exports/music type ext3 (rw,noexec,nosuid,nodev,noatime,nodiratime,acl)
/dev/mapper/raid1-shared on /exports/shared type ext3 (rw,noexec,nosuid,nodev,noatime,nodiratime,acl)
/dev/mapper/raid1-pictures on /exports/Pictures type ext3 (rw,noexec,nosuid,nodev,noatime,nodiratime,acl)
/dev/mapper/raid1-cvs on /exports/cvs type ext3 (rw,noexec,nosuid,nodev,noatime,nodiratime,acl)
/dev/mapper/raid1-webdav on /exports/webdav type ext3 (rw,noexec,nosuid,nodev,noatime,nodiratime,acl)
/dev/mapper/raid1-doc on /usr/share/doc type ext3 (rw,noexec,nosuid,nodev,noatime,nodiratime,acl)
/dev/mapper/raid1-usrlocal on /usr/local type ext3 (rw,nodev,noatime,nodiratime,acl)
/dev/mapper/raid1-www on /var/www type ext3 (rw,noexec,nosuid,nodev,noatime,nodiratime,acl)
/dev/mapper/raid0-vmware on /srv/vmware type ext3 (rw,nosuid,nodev,noatime,nodiratime,acl)
/dev/mapper/raid1-spoolexim on /var/spool/exim4 type ext3 (rw,noexec,nosuid,nodev,sync,acl)
/dev/mapper/raid1-VideoCamera on /exports/VideoCamera type ext3 (rw,noexec,nosuid,nodev,sync,noatime,nodiratime,acl)
/dev/dm-5 on /exports/rex type xfs (ro,noexec,nosuid,nodev,noatime,nodiratime)
/dev/mapper/raid1-chroot on /chroot type ext3 (rw,acl)
proc on /chroot/etch-ia32/proc type proc (rw)
/tmp on /chroot/etch-ia32/tmp type none (rw,bind)
/home on /chroot/etch-ia32/home type none (rw,bind)
/home/alex on /chroot/etch-ia32/home/alex type none (rw,bind)
/exports/downloads on /chroot/etch-ia32/exports/downloads type none (rw,bind)
/exports/video on /chroot/etch-ia32/exports/video type none (rw,bind)
/exports/music on /chroot/etch-ia32/exports/music type none (rw,bind)
/exports/shared on /chroot/etch-ia32/exports/shared type none (rw,bind)
/exports/Pictures on /chroot/etch-ia32/exports/Pictures type none (rw,bind)
/dev/mapper/raid1-backups on /backups type ext3 (rw,nosuid,nodev,acl)
nfsd on /proc/fs/nfsd type nfsd (rw)

--- mdadm.conf
# 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=04698cd3:a02af09f:069cb42f:03f72d27
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=ba8c4627:6e74a6c4:1a2e6c15:22feafcf
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=6afd4ab6:ce0ef994:2f0e35eb:2949c9ef
ARRAY /dev/md3 level=raid1 num-devices=2 UUID=5782df0f:22160d41:2f0e35eb:2949c9ef
#ARRAY /dev/md0 level=raid1 num-devices=2 UUID=04698cd3:a02af09f:069cb42f:03f72d27
#ARRAY /dev/md1 level=raid1 num-devices=2 UUID=ba8c4627:6e74a6c4:1a2e6c15:22feafcf
#ARRAY /dev/md2 level=raid5 num-devices=3 UUID=98c007c6:3f751b9b:96bc634e:8ff321a3


--- /proc/mdstat:
Personalities : [raid1] 
md3 : active raid1 sda4[1] sdb4[2]
      964052544 blocks [2/1] [_U]
      [=====>...............]  recovery = 26.0% (251304192/964052544) finish=183.3min speed=64802K/sec
      
md2 : active(auto-read-only) raid1 sdb3[0] sda3[1]
      1959808 blocks [2/2] [UU]
      
md0 : active raid1 sdb1[0] sda1[1]
      979840 blocks [2/2] [UU]
      
md1 : active raid1 sdb2[0] sda2[1]
      9767424 blocks [2/2] [UU]
      
unused devices: <none>

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

   8     0  976762584 sda
   8     1     979933 sda1
   8     2    9767520 sda2
   8     3    1959930 sda3
   8     4  964052617 sda4
   8    16  976762584 sdb
   8    17     979933 sdb1
   8    18    9767520 sdb2
   8    19    1959930 sdb3
   8    20  964052617 sdb4
   8    32  244198584 sdc
   8    33  244196001 sdc1
   9     1    9767424 md1
   9     0     979840 md0
   9     2    1959808 md2
   9     3  964052544 md3
 253     0   20971520 dm-0
 253     1    1048576 dm-1
 253     2   10485760 dm-2
 253     3   10485760 dm-3
 253     4    5242880 dm-4
 253     5  146800640 dm-5
 253     6   18612224 dm-6
 253     7   47185920 dm-7
 253     8  241172480 dm-8
 253     9   20971520 dm-9
 253    10   73400320 dm-10
 253    11    5242880 dm-11
 253    12   10485760 dm-12
 253    13   73400320 dm-13
 253    14     102400 dm-14
 253    15    1048576 dm-15
 253    16    5242880 dm-16
 253    17    5242880 dm-17
 253    18      53248 dm-18
 253    19    3145728 dm-19
 253    20    2621440 dm-20
 253    21   10485760 dm-21
 253    22     512000 dm-22
 253    23    2097152 dm-23
 253    24   62914560 dm-24
 253    25      53248 dm-25

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

--- /proc/modules:
dm_mirror 27008 0 - Live 0xffffffff88170000
dm_snapshot 21960 0 - Live 0xffffffff88169000
dm_mod 67832 56 truecrypt,dm_mirror,dm_snapshot, Live 0xffffffff88157000
raid1 27648 4 - Live 0xffffffff8814f000
md_mod 84380 5 raid1, Live 0xffffffff88139000

--- volume detail:

--- /proc/cmdline
root=/dev/md1 ro console=tty0 selinux=1 

--- grub:
kernel		/vmlinuz root=/dev/md1 ro console=tty0 selinux=1 
kernel		/vmlinuz root=/dev/md1 ro console=tty0 selinux=1 single
kernel		/vmlinuz.old root=/dev/md1 ro console=tty0 selinux=1 
kernel		/vmlinuz.old root=/dev/md1 ro console=tty0 selinux=1 single
kernel		/vmlinuz-2.6.24-1-amd64 root=/dev/md1 ro console=tty0 selinux=1 
kernel		/vmlinuz-2.6.24-1-amd64 root=/dev/md1 ro console=tty0 selinux=1 single
kernel		/vmlinuz-2.6.22-2-amd64 root=/dev/md1 ro console=tty0 selinux=1 
kernel		/vmlinuz-2.6.22-2-amd64 root=/dev/md1 ro console=tty0 selinux=1 single
kernel		/vmlinuz-2.6.20-1-amd64 root=/dev/md1 ro console=tty0 selinux=1 
kernel		/vmlinuz-2.6.20-1-amd64 root=/dev/md1 ro console=tty0 selinux=1 single


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

Kernel: Linux 2.6.24-1-amd64 (SMP w/2 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.20     Debian configuration management sy
ii  libc6                         2.7-6      GNU C Library: Shared libraries
ii  lsb-base                      3.1-24     Linux Standard Base 3.1 init scrip
ii  makedev                       2.3.1-87   creates device files in /dev
ii  udev                          0.114-2    /dev/ and hotplug management daemo

Versions of packages mdadm recommends:
ii  exim4-daemon-heavy [mail-tra 4.69-2      Exim MTA (v4) daemon with extended
ii  module-init-tools            3.3-pre11-4 tools for managing Linux kernel mo

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





More information about the pkg-mdadm-devel mailing list