Bug 956053 - mdadm: first stop command cannot stop container during volume's reshape
Summary: mdadm: first stop command cannot stop container during volume's reshape
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mdadm
Version: 18
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Jes Sorensen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-24 08:50 UTC by Lukasz Dorau
Modified: 2013-09-06 05:21 UTC (History)
5 users (show)

Fixed In Version: mdadm-3.2.6-21.fc18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-06 05:21:39 UTC
Type: Bug


Attachments (Terms of Use)

Description Lukasz Dorau 2013-04-24 08:50:31 UTC
Description of problem:
First stop command (mdadm -Ss) cannot stop container during volume's reshape.
Stopping for the second time works.

How reproducible:
Always

Steps to Reproduce:
1. Create container and volume:
# mdadm -CR /dev/md/imsm -e imsm -n3 /dev/sda /dev/sdc /dev/sdd
# mdadm -CR /dev/md/vol -l0 -n2 /dev/sda /dev/sdc

2. Run OLCE:
# export MDADM_EXPERIMENTAL=1
# mdadm -G /dev/md127 -n3

3. Stop all RAID devices
# mdadm -Ss
  
Actual results:
Volume is stopped, but container not. 
Output:
# mdadm -Ss
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?

After next stop command container is stopped correctly:
mdadm -Ss
mdadm: stopped /dev/md126
mdadm: stopped /dev/md127


Expected results:
Volume and container are stopped:
mdadm: stopped /dev/md126
mdadm: stopped /dev/md127


Additional info:
This bug is fixed by the following upstream patch:

commit 2fdf559d74a48806900b63f1b4504a18dec048a9
Manage_runstop: call flush_mdmon if O_EXCL fails on stopping mdmon array.
http://git.neil.brown.name/git?p=mdadm.git;a=commit;h=2fdf559d74a48806900b63f1b4504a18dec048a9

Comment 1 Lukasz Dorau 2013-04-25 15:06:10 UTC
After having done more tests it's turned out that the patch doesn't work well and should be corrected. I will let you know when the correct patch will be ready.

Comment 2 Fedora Update System 2013-08-14 11:00:15 UTC
mdadm-3.2.6-21.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/mdadm-3.2.6-21.fc18

Comment 3 Fedora Update System 2013-08-15 02:34:11 UTC
Package mdadm-3.2.6-21.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.6-21.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-14695/mdadm-3.2.6-21.fc18
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-09-06 05:21:39 UTC
mdadm-3.2.6-21.fc18 has been pushed to the Fedora 18 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.