Bug 732818 - nested md's are not assembled correctly.
nested md's are not assembled correctly.
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mdadm (Show other bugs)
15
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Doug Ledford
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-23 14:07 EDT by Thomas Davis
Modified: 2011-09-10 19:59 EDT (History)
3 users (show)

See Also:
Fixed In Version: mdadm-3.2.2-9.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-09-10 19:59:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Thomas Davis 2011-08-23 14:07:38 EDT
Description of problem:

I have a volume built of 3 different md's, from 4 drives (2 are 1TB drives, 2 are 2TB drives)

two md's are raid1, and then these used to build a raid0 array.

upon boot, Fedora15 finds the two raid1's, but does not do the final assembly of the raid0 from the raid1's.

Using raid10 in the kernel results in wasted space, for the 2tb drives are not fully utilized.

Version-Release number of selected component (if applicable):


How reproducible:

Build 3 raid partitions, make the 3rd dependent on the first
two being properly built.


Steps to Reproduce:
1. Create a raid1 md, create a second raid1 md, then create a raid0 md from md0 & md1.
2. Reboot.
3. System errors out.
  
Actual results:

system errors out.

Expected results:

system should build correct volume.

Additional info:

edit /lib/systemd/fedora-storage-init and add:

# Start any nest MD RAID arrays.
[ -f /etc/mdadm.conf -a -x /sbin/mdadm ] && /sbin/mdadm -As --auto=yes --run

before:

# Start any MD RAID arrays that haven't been started yet
[ -r /proc/mdstat ] && [ -r /dev/md/md-device-map ] && /sbin/mdadm -IRs

if [ -x /sbin/lvm ]; then
        action $"Setting up Logical Volume Management:" /sbin/lvm vgchange -a y --sysinit
fi

fixes the problem; ie:

[root@tank systemd]# pwd
/lib/systemd
[root@tank systemd]# more fedora-storage-init 
#!/bin/bash
#
# Storage initialization

. /etc/init.d/functions

[ -z "${cmdline}" ] && cmdline=$(cat /proc/cmdline)

if ! strstr "$cmdline" nompath && [ -f /etc/multipath.conf ] && \
                [ -x /sbin/multipath ]; then
        modprobe dm-multipath > /dev/null 2>&1
        /sbin/multipath -v 0
        if [ -x /sbin/kpartx ]; then
                /sbin/dmsetup ls --target multipath --exec "/sbin/kpartx -a -p p" >/dev/null
        fi
fi

if ! strstr "$cmdline" nodmraid && [ -x /sbin/dmraid ]; then
        modprobe dm-mirror >/dev/null 2>&1
        dmraidsets=$(LC_ALL=C /sbin/dmraid -s -c -i)
        if [ "$?" = "0" ]; then
                for dmname in $dmraidsets; do
                        if [[ "$dmname" == isw_* ]] && \
                           ! strstr "$cmdline" noiswmd; then
                                continue
                        fi
                        /sbin/dmraid -ay -i --rm_partitions -p "$dmname" >/dev/null 2>&1
                        /sbin/kpartx -a -p p "/dev/mapper/$dmname"
                done
        fi
fi

[ -f /etc/mdadm.conf -a -x /sbin/mdadm ] && /sbin/mdadm -As --auto=yes --run
# Start any MD RAID arrays that haven't been started yet
[ -r /proc/mdstat ] && [ -r /dev/md/md-device-map ] && /sbin/mdadm -IRs

if [ -x /sbin/lvm ]; then
        action $"Setting up Logical Volume Management:" /sbin/lvm vgchange -a y --sysinit
fi
Comment 1 Thomas Davis 2011-08-23 14:31:03 EDT
Desired:

[root@tank systemd]# cat /proc/mdstat 
Personalities : [raid1] [raid0] 
md2 : active raid0 md0[0] md1[1]
      2723933888 blocks super 1.2 32k chunks
      
md1 : active raid1 sdd2[1] sdb1[0]
      1952488312 blocks super 1.2 [2/2] [UU]
      
md0 : active raid1 sda3[0] sdc3[1]
      771447672 blocks super 1.2 [2/2] [UU]
      
unused devices: <none>

with out the change above, md2 is not built upon boot.

sdd and sdb are 2TB drives, sda and sdc are 1TB drives.
Comment 2 Doug Ledford 2011-08-25 15:44:07 EDT
I changed the udev rules file in a way that should solve this.
Comment 3 Fedora Update System 2011-08-25 15:53:25 EDT
mdadm-3.2.2-8.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mdadm-3.2.2-8.fc15
Comment 4 Thomas Davis 2011-08-26 12:58:42 EDT
Downloaded, installed and did a reboot..

All is well!

So the mdadm-3.2.2-8-fc15 update fixes this problem.
Comment 5 Fedora Update System 2011-08-26 14:58:45 EDT
Package mdadm-3.2.2-8.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mdadm-3.2.2-8.fc15'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/mdadm-3.2.2-8.fc15
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2011-09-02 01:24:22 EDT
Package mdadm-3.2.2-9.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mdadm-3.2.2-9.fc15'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/mdadm-3.2.2-9.fc15
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2011-09-10 19:58:55 EDT
mdadm-3.2.2-9.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.