Bug 160236 - Assembling a multipath array results in an array with only one path
Summary: Assembling a multipath array results in an array with only one path
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Doug Ledford
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-06-13 18:59 UTC by Dinesh Nagpure
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-06-29 18:06:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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",
                        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 20:27:13 UTC
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.