{upstream} no console message when array is not created as specified
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mdadm |
New
|
Undecided
|
Unassigned | ||
mdadm (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: mdadm
root@HCSERV1:~# apt-cache show mdadm
Package: mdadm
Priority: optional
Section: admin
Installed-Size: 660
Maintainer: Ubuntu Core Developers <email address hidden>
Original-
Architecture: amd64
Version: 2.6.7.1-1ubuntu13
Replaces: mdctl
Depends: libc6 (>= 2.8), debconf (>= 1.4.72), lsb-base (>= 3.1-6), udev (>= 136-1), initramfs-tools (>= 0.85eubuntu24), util-linux (>= 2.15-1)
Recommends: postfix | mail-transport-
Conflicts: mdctl (<< 0.7.2), raidtools2 (<< 1.00.3-12.1)
Breaks: udev (<< 136-1)
Filename: pool/main/
Size: 238928
MD5sum: 93261d47d484027
SHA1: 62c02adcef685d5
SHA256: 91253cb70dc92a3
Description: tool to administer Linux MD arrays (software RAID)
The mdadm utility can be used to create, manage, and monitor MD
(multi-disk) arrays for software RAID or multipath I/O.
.
This package automatically configures mdadm to assemble arrays during the
system startup process. If not needed, this functionality can be disabled.
Homepage: http://
Bugs: https:/
Origin: Ubuntu
root@HCSERV1:~# lsb_release -rd
Description: Ubuntu 9.10
Release: 9.10
root@HCSERV1:~# uname -a
Linux HCSERV1 2.6.31-14-server #48-Ubuntu SMP Fri Oct 16 15:07:34 UTC 2009 x86_64 GNU/Linux
While installing ubuntu on a machine with 5 disks, I tried to create two RAID arrays :
/dev/md0 : a RAID1 array of 5 devices from /dev/sda1 to /dev/sde1
/dev/md1 : a RAID5 array of 4 active and 1 spare from /dev/sda2 to /dev/sde2
The RAID1 array works fine but not the RAID5 array, instead it created a RAID5 array of 3 active devices + 1 spare
I then stop /dev/md1, deleted and recreated the partitions and created the array manually with the following command :
root@HCSERV1:~# mdadm --create /dev/md1 --level=5 --raid-devices=4 --spare-devices=1 /dev/sd[abcde]2
But it created a 5 disks array with 3 active and 2 spare.
I had to create the array with the following command :
root@HCSERV1:~# mdadm --create /dev/md1 --level=5 --raid-devices=5 --spare-devices=0 /dev/sd[abcde]2
Now it works, I have an array of 5 disks : 4 active and 1 spare :
root@HCSERV1:~# mdadm --detail --scan | grep /dev/md1
ARRAY /dev/md1 level=raid5 num-devices=5 metadata=00.90 spares=1 UUID=a0dbe637:
summary: |
- mdadm uses one more spare that specified while creating a RAID5 array + mdadm uses one more spare than specified while creating a RAID5 array |
summary: |
- mdadm uses one more spare than specified while creating a RAID5 array + no console message when array is not created as specified |
summary: |
- no console message when array is not created as specified + {upstream} no console message when array is not created as specified |
From the man page:
When creating a RAID5 array, mdadm will automatically create a degraded array with an extra spare drive. This is because building the spare into a degraded array is in general faster than resyncing the parity on a non-degraded, but not clean, array. This feature can be overridden with the --force option.
I admit that I don't understand this at all (spotted this bug while looking for something else), but thought it might be helpful.