Bug 160236 - Assembling a multipath array results in an array with only one path
Assembling a multipath array results in an array with only one path
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Doug Ledford
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-13 14:59 EDT by Dinesh Nagpure
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-06-29 14:06:44 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 Dinesh Nagpure 2005-06-13 14:59:06 EDT
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",
                        b);
                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;
        else
               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):
kernel-2.6.9-5.Elsmp

How reproducible:
Always

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 16:27:13 EDT
I just upgraded my system to RHEL4 U1 and found that this bug has been fixed there.

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