Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 160236

Summary: Assembling a multipath array results in an array with only one path
Product: Red Hat Enterprise Linux 4 Reporter: Dinesh Nagpure <dinesh.nagpure>
Component: kernelAssignee: Doug Ledford <dledford>
Status: CLOSED WORKSFORME QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: chas.horvath, kimball.murray
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-06-29 18:06:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dinesh Nagpure 2005-06-13 18:59:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
There is a bug is the function super_90_load() in md.c
Let me paste the required code change first and then explain what is happening,

@@ -582,22 +582,24 @@ static int super_90_load(mdk_rdev_t *rde
        if (calc_sb_csum(sb) != sb->sb_csum &&
                calc_sb_csum_common(sb) != sb->sb_csum) {
                printk(KERN_WARNING "md: invalid superblock checksum on %s\n",
                goto abort;

        rdev->preferred_minor = sb->md_minor;
        rdev->data_offset = 0;
-       if (sb->level == MULTIPATH)
+       if (sb->level == LEVEL_MULTIPATH)
               rdev->desc_nr = -1;
               rdev->desc_nr = sb->this_disk.number;

As you see it is checking for MULTIPATH instead of LEVEL_MULTIPATH, rdev->desc_nr will be set to sb->this_disk.number which will be the same for each path (this should actually be set to -1). Eventually bind_rdev_to_array will fail to bind any but the first path into the array. 

This bug has been fixed in 2.6.12-rc2.

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

How reproducible:

Steps to Reproduce:
1.Create a multipath array
2.Stop the array
3.Assemble the array back into service. I use mdadm for the purpose but I guess raidtools would too expose the bug.

Additional info:

Comment 2 Dinesh Nagpure 2005-06-22 20:27:13 UTC
I just upgraded my system to RHEL4 U1 and found that this bug has been fixed there.