[Bug 252365] Re: mdadm does not add spares to arrays on boot
JanCeuleers
252365 at bugs.launchpad.net
Fri Jan 24 18:39:57 UTC 2020
Many years later I can no longer reproduce this
** Changed in: mdadm (Ubuntu)
Status: Incomplete => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to mdadm in Ubuntu.
https://bugs.launchpad.net/bugs/252365
Title:
mdadm does not add spares to arrays on boot
Status in initramfs-tools:
Fix Released
Status in mdadm package in Ubuntu:
Invalid
Bug description:
Binary package hint: mdadm
After rebooting my server, spares are not automatically re-inserted
into my RAID5 and RAID1 arrays.
I was able to get the above to work correctly by explicitly telling
mdadm which partitions to scan:
# extract from /etc/mdadm/mdadm.conf
#DEVICE partitions
DEVICE /dev/sd[abcdef][12]
I think that this should work properly also in the case of "DEVICE
partitions".
Some information about my system below, followed by detailed disk and
md configs.
root at via:~# apt-cache show mdadm
Package: mdadm
Priority: optional
Section: admin
Installed-Size: 612
Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Original-Maintainer: Debian mdadm maintainers <pkg-mdadm-devel at lists.alioth.debian.org>
Architecture: i386
Version: 2.6.2-1ubuntu2
Replaces: mdctl
Depends: libc6 (>= 2.6), makedev, debconf (>= 0.5) | debconf-2.0, lsb-base (>= 3.1-6), udev (>= 113-0ubuntu1), initramfs-tools (>> 0.85eubuntu11), debconf (>= 1.4.72)
Recommends: mail-transport-agent, module-init-tools
Conflicts: mdctl (<< 0.7.2), raidtools2 (<< 1.00.3-12.1)
Filename: pool/main/m/mdadm/mdadm_2.6.2-1ubuntu2_i386.deb
Size: 219708
MD5sum: 67dc0977d5818218a6eead01ec52dee4
SHA1: adcf0faafc84a241668d6b6c3a0069f59dcab14c
SHA256: 8a44014791a370fd7ef1e5c7f161d042249388897cfabacb0b141682f203ff13
Description: tool to administer Linux MD arrays (software RAID)
mdadm is a program that can be used to create, manage, and monitor MD
arrays (e.g. software RAID, multipath devices).
.
This package automatically configures mdadm to assemble arrays during the
system startup process. If not needed, this functionally can be disabled.
Bugs: mailto:ubuntu-users at lists.ubuntu.com
Origin: Ubuntu
root at via:~# lsb_release -rd
Description: Ubuntu 7.10
Release: 7.10
root at via:~# cat /etc/mdadm/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
DEVICE /dev/sd[abcdef][12]
# 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 spares=1 UUID=19e69537:f7a6aec8:5a5f7576:3fc29e0d spare-group=swapgroup
ARRAY /dev/md1 level=raid1 num-devices=2 spares=1 UUID=5e728621:c8b356a8:01f8e270:f0e280cb spare-group=swapgroup
ARRAY /dev/md2 level=raid5 num-devices=4 spares=1 UUID=714e46f1:479268a7:895e209c:936fa570
# This file was auto-generated on Fri, 22 Jun 2007 19:12:10 +0000
# by mkconf $Id: mkconf 261 2006-11-09 13:32:35Z madduck $
MAILFROM jan.ceuleers at example.com
root at via:~# sfdisk -l /dev/sda
Disk /dev/sda: 38913 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 0+ 121 122- 979933+ fd Linux raid autodetect
/dev/sda2 122 38912 38791 311588707+ fd Linux raid autodetect
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
root at via:~# sfdisk -l /dev/sdb
Disk /dev/sdb: 38913 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdb1 0+ 121 122- 979933+ fd Linux raid autodetect
/dev/sdb2 122 38912 38791 311588707+ fd Linux raid autodetect
/dev/sdb3 0 - 0 0 0 Empty
/dev/sdb4 0 - 0 0 0 Empty
root at via:~# sfdisk -l /dev/sdc
Disk /dev/sdc: 38913 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdc1 0+ 121 122- 979933+ fd Linux raid autodetect
/dev/sdc2 122 38912 38791 311588707+ fd Linux raid autodetect
/dev/sdc3 0 - 0 0 0 Empty
/dev/sdc4 0 - 0 0 0 Empty
root at via:~# sfdisk -l /dev/sdd
Disk /dev/sdd: 38913 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdd1 0+ 121 122- 979933+ fd Linux raid autodetect
/dev/sdd2 122 38912 38791 311588707+ fd Linux raid autodetect
/dev/sdd3 0 - 0 0 0 Empty
/dev/sdd4 0 - 0 0 0 Empty
root at via:~# sfdisk -l /dev/sde
Disk /dev/sde: 60801 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sde1 0+ 60800 60801- 488384001 83 Linux
/dev/sde2 0 - 0 0 0 Empty
/dev/sde3 0 - 0 0 0 Empty
/dev/sde4 0 - 0 0 0 Empty
root at via:~# sfdisk -l /dev/sdf
Disk /dev/sdf: 60801 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdf1 0+ 121 122- 979933+ fd Linux raid autodetect
/dev/sdf2 122 38912 38791 311588707+ fd Linux raid autodetect
/dev/sdf3 38913 60800 21888 175815360 83 Linux
/dev/sdf4 0 - 0 0 0 Empty
root at via:~# mdadm --detail /dev/md0
/dev/md0:
Version : 00.90.03
Creation Time : Fri Jun 22 20:56:08 2007
Raid Level : raid1
Array Size : 979840 (957.04 MiB 1003.36 MB)
Used Dev Size : 979840 (957.04 MiB 1003.36 MB)
Raid Devices : 2
Total Devices : 3
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Sun Jul 27 18:18:46 2008
State : clean
Active Devices : 2
Working Devices : 3
Failed Devices : 0
Spare Devices : 1
UUID : 19e69537:f7a6aec8:5a5f7576:3fc29e0d
Events : 0.52
Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 33 1 active sync /dev/sdc1
2 8 81 - spare /dev/sdf1
root at via:~# mdadm --detail /dev/md1
/dev/md1:
Version : 00.90.03
Creation Time : Fri Jun 22 20:56:31 2007
Raid Level : raid1
Array Size : 979840 (957.04 MiB 1003.36 MB)
Used Dev Size : 979840 (957.04 MiB 1003.36 MB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 1
Persistence : Superblock is persistent
Update Time : Sun Jul 27 18:51:38 2008
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
UUID : 5e728621:c8b356a8:01f8e270:f0e280cb
Events : 0.54
Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 8 49 1 active sync /dev/sdd1
root at via:~# mdadm --detail /dev/md2
/dev/md2:
Version : 00.90.03
Creation Time : Fri Jun 22 20:56:51 2007
Raid Level : raid5
Array Size : 934765824 (891.46 GiB 957.20 GB)
Used Dev Size : 311588608 (297.15 GiB 319.07 GB)
Raid Devices : 4
Total Devices : 5
Preferred Minor : 2
Persistence : Superblock is persistent
Update Time : Sun Jul 27 19:07:06 2008
State : clean
Active Devices : 4
Working Devices : 5
Failed Devices : 0
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 64K
UUID : 714e46f1:479268a7:895e209c:936fa570
Events : 0.13760
Number Major Minor RaidDevice State
0 8 2 0 active sync /dev/sda2
1 8 18 1 active sync /dev/sdb2
2 8 34 2 active sync /dev/sdc2
3 8 50 3 active sync /dev/sdd2
4 8 82 - spare /dev/sdf2
root at via:~# mount
/dev/hda5 on / type ext3 (rw,noatime,nodiratime,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw,size=102400000)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.22-15-generic/volatile type tmpfs (rw)
/dev/hda1 on /boot type ext3 (rw,noatime,nodiratime)
/dev/md2 on /raid5 type ext3 (rw)
none on /sys/kernel/config type configfs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
To manage notifications about this bug go to:
https://bugs.launchpad.net/initramfs-tools/+bug/252365/+subscriptions
More information about the foundations-bugs
mailing list