Bug 481561 - incremental assembly of partitioned array using mdadm.conf file broken
incremental assembly of partitioned array using mdadm.conf file broken
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mdadm (Show other bugs)
10
All Linux
low Severity medium
: ---
: ---
Assigned To: Doug Ledford
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-26 06:49 EST by Radek Vykydal
Modified: 2009-07-22 18:05 EDT (History)
3 users (show)

See Also:
Fixed In Version: 2.6.9-1.fc10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 490959 (view as bug list)
Environment:
Last Closed: 2009-07-22 18:05:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
patch with fix (113 bytes, patch)
2009-01-26 06:49 EST, Radek Vykydal
no flags Details | Diff
reproducer session without and with patch from description (4.56 KB, text/plain)
2009-01-26 06:54 EST, Radek Vykydal
no flags Details

  None (edit)
Description Radek Vykydal 2009-01-26 06:49:15 EST
Created attachment 329975 [details]
patch with fix

Description of problem:

Having /dev/md_d0 in /etc/mdadm.conf, incremental assembly
with mdadm -I --auto=yes fails.
This is specific for components with super-minor 0.
The bug affects array assembly by udev after boot, in which
case device numbers 9, 0 are assigned in place of correct
254, 0.

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

mdadm-2.6.7-1.fc10

How reproducible:

always

Steps to Reproduce:

1. create linux array with partitions having minor
   number 0 (e.g. use /dev/md_d0 name)
2. craete mdadm.conf record for the array with
   name /dev/md_d0 indicating partitionable array
3. reboot 
  
Actual results:

Array assembled by udev has major number 9, minor
number 0, device file /dev/md0 -> not partionable 

Expected results:

Array is assembled with file /dev/md_d0, maj.
number 254, min. number 0.

Additional info:

I am adding patch which should fix it.
Comment 1 Radek Vykydal 2009-01-26 06:54:47 EST
Created attachment 329976 [details]
reproducer session without and with patch from description
Comment 2 Jarod Wilson 2009-02-24 11:42:12 EST
Hm... Wondering if this is related to something I'm seeing too... F10 install originally, upgraded to rawhide, now gets this on boot initially for its md devices:

# cat /proc/mdstat 
Personalities : [raid1] [raid0] 
md126 : active raid1 sda3[0]
      22531072 blocks [2/1] [U_]
      
md127 : inactive sda7[0]
      25366528 blocks
       
md0 : active raid1 sda2[0] sdb1[1]
      200704 blocks [2/2] [UU]
      
md3 : inactive sdb6[1](S)
      25366528 blocks
       
md2 : inactive sdb2[1](S)
      22531072 blocks
       
md1 : active raid1 sda5[0] sdb3[1]
      22531008 blocks [2/2] [UU]
      
unused devices: <none>



The expected layout is:

# cat /proc/mdstat 
Personalities : [raid1] [raid0] 
md0 : active raid1 sda2[0] sdb1[1]
      200704 blocks [2/2] [UU]
      
md3 : inactive sda7[0] sdb6[1]
      50733056 blocks
       
md2 : active raid1 sda3[0] sdb2[1]
      22531072 blocks [2/2] [UU]
      
md1 : active raid1 sda5[0] sdb3[1]
      22531008 blocks [2/2] [UU]
      
unused devices: <none>


Sometimes md0 gets screwed up too. All the arrays are properly defined in /etc/mdadm.conf, so far as I can tell. Seems perhaps the arrays are being started in the initrd before all the components have actually been found, then the rest get found by udev or something (I get spew about this just after 'starting udev').
Comment 3 Doug Ledford 2009-03-18 13:13:10 EDT
Jared, your issue is different.  Your issue is a duplicate of bug 488038.
Comment 4 Doug Ledford 2009-03-18 13:16:52 EDT
Rydek, this bug is specific to mdadm-2.6.7-1, which is no longer in rawhide.  Instead, mdadm-3.0 is in rawhide, and this no longer applies to that version of mdadm (mdadm 3.0 doesn't even make partitionable arrays any more, instead it uses the kernel's built in support for dealing with partitions on generic block devices to get partitionable arrays instead, so all arrays with mdadm 3.0 are now normal arrays).

However, this problem does still exist in F10/F9, and I can't upgrade those to mdadm-3.0, so I'm moving it to F10 and cloning for F9.
Comment 5 Doug Ledford 2009-06-29 16:07:27 EDT
I'm updating mdadm to 2.6.9 in F10, and this patch no longer applies, I'm pretty sure the upstream update will resolve the issue as the logic in this section of code has changed and no longer even has the possibility of an off by one like you posted the patch for.
Comment 6 Fedora Update System 2009-06-29 16:21:31 EDT
mdadm-2.6.9-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/mdadm-2.6.9-1.fc10
Comment 7 Fedora Update System 2009-07-02 01:52:08 EDT
mdadm-2.6.9-1.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mdadm'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-7263
Comment 8 Fedora Update System 2009-07-22 18:04:42 EDT
mdadm-2.6.9-1.fc10 has been pushed to the Fedora 10 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.