{upstream} no console message when array is not created as specified

Bug #491377 reported by Sylvain Mandon
6
This bug affects 1 person
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-Maintainer: Debian mdadm maintainers <email address hidden>
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-agent, module-init-tools
Conflicts: mdctl (<< 0.7.2), raidtools2 (<< 1.00.3-12.1)
Breaks: udev (<< 136-1)
Filename: pool/main/m/mdadm/mdadm_2.6.7.1-1ubuntu13_amd64.deb
Size: 238928
MD5sum: 93261d47d484027c10fdf55589c11cd6
SHA1: 62c02adcef685d578bfcf5639aca0735363815ea
SHA256: 91253cb70dc92a3ad476bc0f92c8058150864bd786a92d554946c3bfaf3209f5
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://neil.brown.name/blog/mdadm
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
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:a8463868:2eb0c2f1:3193ed16

Revision history for this message
Aryeh Gregor (simetrical+launchpad) wrote :

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.

ceg (ceg)
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
ceg (ceg)
summary: - mdadm uses one more spare than specified while creating a RAID5 array
+ no console message when array is not created as specified
ceg (ceg)
summary: - no console message when array is not created as specified
+ {upstream} no console message when array is not created as specified
Revision history for this message
ceg (ceg) wrote :

how to remove issue from a LP project / reassign to another project?

affects: mdadm (Ubuntu) → ubuntu
affects: ubuntu → mdadm (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.