Bug 830177

Summary: Reshape of RAID volume is broken after trying to stop all MD devices
Product: [Fedora] Fedora Reporter: Lukasz Dorau <lukasz.dorau>
Component: mdadmAssignee: Jes Sorensen <Jes.Sorensen>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 17CC: agk, dledford, ed.ciechanowski, 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-07-11 23:53:25 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-08 13:09:18 UTC
Description of problem:
Reshape of a RAID volume is broken after trying to stop all MD devices.

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

How reproducible:
Always

Steps to Reproduce:
1. Create an IMSM container and a volume with a spare:
# mdadm -CR /dev/md/imsm -e imsm -n 4 /dev/sda /dev/sdb /dev/sdc /dev/sdd
# mdadm -CR /dev/md/vol0 -l0 --size 2G -n3 /dev/sda /dev/sdb /dev/sdc

2. Run OLCE (or migration):
# export MDADM_EXPERIMENTAL=1
# mdadm -G /dev/md127 --raid-devices=4

3. Wait until reshape starts.
4. Try to stop all MD devices:
# mdadm -Ss

Actual results:
MD devices are not stopped. Reshape seems to be finished (metadata is in normal/clean state) but it is not finished, it is broken. Data are corrupted.

 mdadm: stopped /dev/md126
 mdadm: Cannot get exclusive access to /dev/md127:Perhaps a running process, mounted filesystem or active volume group?
 mdadm: Cannot get exclusive access to /dev/md127:Perhaps a running process, mounted filesystem or active volume group?
 mdadm: Cannot get exclusive access to /dev/md127:Perhaps a running process, mounted filesystem or active volume group?
 mdadm: /dev/md/vol0: could not set level to raid0

# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [raid0]
md126 : active raid0 sda[3] sdb[2] sdc[1] sdd[0]
        8388608 blocks super external:/md127/0 128k chunks
md127 : inactive sda[3](S) sdb[2](S) sdc[1](S) sdd[0](S)
        4420 blocks super external:imsm
unused devices: <none>

Expected results:
Reshape should be stopped correctly on actual checkpoint.

Comment 1 Lukasz Dorau 2012-06-08 13:12:36 UTC
The patch for this bug is already upstream:
http://neil.brown.name/git?p=mdadm;a=commitdiff;h=e1993023991a6fa6539cc604b4b3d6718833250d

Comment 2 Fedora Update System 2012-06-26 07:15:18 UTC
mdadm-3.2.5-3.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/mdadm-3.2.5-3.fc17

Comment 3 Fedora Update System 2012-06-26 07:22:17 UTC
mdadm-3.2.5-3.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mdadm-3.2.5-3.fc16

Comment 4 Fedora Update System 2012-06-26 21:27:25 UTC
Package mdadm-3.2.5-3.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mdadm-3.2.5-3.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-9931/mdadm-3.2.5-3.fc16
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2012-07-11 23:53:25 UTC
mdadm-3.2.5-3.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2012-07-11 23:57:05 UTC
mdadm-3.2.5-3.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.