Bug 830738

Summary: Chunk size migration from 128k to 4k doesn't finish correctly
Product: [Fedora] Fedora Reporter: Lukasz Dorau <lukasz.dorau>
Component: mdadmAssignee: Jes Sorensen <Jes.Sorensen>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 17CC: agk, dledford, Jes.Sorensen, maciej.patelczyk
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-12 16:13:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukasz Dorau 2012-06-11 10:19:58 UTC
Description of problem:
Chunk size migration from 128k to 4k doesn't finish correctly. After this migration should be RAID0 with 4k chunk size, but there is RAID4 with 4k chunk size in degraded state. 

Version-Release number of selected component (if applicable):
mdadm-3.2.3-6.fc17.x86_64

How reproducible:
Always

Steps to reproduce:
# mdadm -Ss
# mdadm --zero-superblock /dev/sd[a-b]
# mdadm -C /dev/md/imsm0 -amd -e imsm -n 2 /dev/sda /dev/sdb -R
# mdadm -C /dev/md/vol0 -amd -l0 --chunk 128 --size 524288 -n 2 /dev/sda /dev/sdb -R
# export MDADM_EXPERIMENTAL=1
# mdadm -G /dev/md/vol0 --chunk 4

Actual results:
There is RAID4 with 4k chunk size in degraded state.
# cat /proc/mdstat
Personalities : [raid0] [raid6] [raid5] [raid4] 
md126 : active raid4 sdb[1] sda[0]
      1048576 blocks super external:/md127/0 level 4, 4k chunk, algorithm 0 [3/2] [UU_]
md127 : inactive sdb[1](S) sda[0](S)
     2210 blocks super external:imsm
unused devices: <none>

Expected results:
After chunk size migration should be RAID0 with 4k chunk size.

Comment 1 Lukasz Dorau 2012-06-11 10:22:34 UTC
The defect is fixed by patch in Neil's repo:
http://neil.brown.name/git?p=mdadm;a=commit;h=e1742195ff3dba97929f81af6b7633481a23397a

Comment 2 Jes Sorensen 2012-06-12 16:13:57 UTC
This is already addressed by the mdadm-3.2.5 update in updates-testing.

Please test and report feedback in koji.