Bug 230207

Summary: Incorrect metadata version returned by "mdadm --examine --scan"
Product: [Fedora] Fedora Reporter: josip
Component: mdadmAssignee: Doug Ledford <dledford>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 2.6.2-4.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-07-20 19:35:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description josip 2007-02-27 14:46:32 UTC
Description of problem:
"mdadm --examine --scan" incorrectly returns metadata=1 for raid arrays created
with "--metadata=1.2", breaking assembly based on this incorrect information.


Version-Release number of selected component (if applicable):
mdadm-2.5.4-2.fc6

How reproducible:
Always

Steps to Reproduce:
1. mdadm --create ... --metadata=1.2 ... [note 1.2 style superblock]
2. mdadm --examine --scan
3. observe results
  
Actual results:
ARRAY /dev/md/home level=raid10 metadata=1 num-devices=6 UUID=... name=home

Expected results:
ARRAY /dev/md/home level=raid10 metadata=1.2 num-devices=6 UUID=... name=home

Additional info:
Note that metadata=1 (if entered into /etc/mdadm.conf) breaks array assembly
since it indicates incorrect position of the superblock.  "mdadm --examine
--scan" should return the correct "metadata=1.2" information because most people
use this command to populate /etc/mdadm.conf.

Comment 1 Doug Ledford 2007-07-02 21:06:49 UTC
There are actually two issues here.  First, when using mdadm -E, mdadm never
specified the exact superblock type.  If superblock type is anything other than
1.0, it's not listed correctly.  The second issue is that when you specify a
superblock version in the config file, it takes that as a strict requirement. 
So, the fact that it didn't output strictly correct output, but required strict
input in the config file was the total problem.  I've created a patch that
solves the issue.  It outputs strict output when examining devices, but also
modifies the input side of things so that an input of metadata=1 or
metadata=default/large will scan for different locations.  It is only strict on
input now if the input specifies the exact superblock location by using one of
1.0/1.1/1.2.  These changes will appear in the mdadm-2.6.2-2 package.

Comment 2 Fedora Update System 2007-07-05 19:11:59 UTC
mdadm-2.6.2-2.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 3 Fedora Update System 2007-07-09 15:47:40 UTC
mdadm-2.6.2-3.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 4 Fedora Update System 2007-07-10 06:42:13 UTC
mdadm-2.6.2-4.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2007-07-20 19:35:13 UTC
mdadm-2.6.2-4.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.