Bug 1173698 - partprobe fails in mpath/partition/pv/vg/lv setup
Summary: partprobe fails in mpath/partition/pv/vg/lv setup
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: parted
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Brian Lane
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks: 1002699 rhev35rcblocker 1173188
TreeView+ depends on / blocked
 
Reported: 2014-12-12 17:26 UTC by Fabian Deutsch
Modified: 2015-03-11 17:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-17 14:59:22 UTC
Target Upstream Version:


Attachments (Terms of Use)
Testcase script (673 bytes, text/plain)
2014-12-12 17:26 UTC, Fabian Deutsch
no flags Details

Description Fabian Deutsch 2014-12-12 17:26:45 UTC
Created attachment 967751 [details]
Testcase script

Description of problem:
This is a piece of the puzzle of bug #1167240 and very urgent for RHEV 3.5 GA.

parted does some weird things in a specific storage setup (described below).


Version-Release number of selected component (if applicable):
# rpm -q parted device-mapper-multipath lvm2 kernel redhat-release-server
parted-2.1-25.el6.x86_64
device-mapper-multipath-0.4.9-80.el6_6.1.x86_64
lvm2-2.02.111-2.el6.x86_64
kernel-2.6.32-504.el6.x86_64
kernel-2.6.32-504.1.3.el6.x86_64
redhat-release-server-6Server-6.6.0.2.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
0. Create a VM with two disks
   One is the installation destination
   Second is used for testing (attach over IDE bus!)
1. Install clean 6.6 onto the first disk
2. Configure:

yum install device-mapper-multipath parted lvm2
mpathconf --enable --find_multipaths y
service multipathd start

# Use the attached script and run:
# (sda should be the second disk)
bash stacktest.sh /dev/sda

3.

Actual results:
parted has problems with the mpath partitions:

…
+ lvcreate -L 3 -n TESTLV TESTVG
  Rounding up size to full physical extent 4.00 MiB
  Logical volume "TESTLV" created
+ partprobe
device-mapper: remove ioctl on mpathap3 failed: Device or resource busy
Warning: parted was unable to re-read the partition table on /dev/mapper/mpatha (Device or resource busy).  This means Linux won't know anything about the modifications you made. 
device-mapper: create ioctl on mpathap3 failed: Device or resource busy
device-mapper: remove ioctl on mpathap3 failed: Device or resource busy
Warning: WARNING: the kernel failed to re-read the partition table on /dev/vda (Device or resource busy).  As a result, it may not reflect all of your changes until after reboot.
+ lvremove -f TESTVG/TESTLV
  Logical volume "TESTLV" successfully removed
…

Expected results:
parted handles the partitions correctly:

…
+ lvcreate -L 3 -n TESTLV TESTVG
  Rounding up size to full physical extent 4.00 MiB
  Logical volume "TESTLV" created
+ partprobe
+ lvremove -f TESTVG/TESTLV
  Logical volume "TESTLV" successfully removed
…


Additional info:
According to my understanding there might be a few pacthes missing, see also
bug 1167240 comment 47.

It seems that the multipath device is necessary, if you comment out that part of the stack, then the test passes.

It seems that the test also passes when you comment out the LV creation (and usage).

Comment 1 Brian Lane 2014-12-12 18:28:15 UTC
I tried to reproduce with a 6.6 install on a VM using ide bus drives and wasn't able to get multipath to cooperate. I did, however, reproduce part of it without the multipath layer and it is actually working as expected.

See comment 49 on bug 1167240.

I'll wait until next week to close this, but it comes down to calling partprobe at the wrong time and not specifying the device (when you don't it tries all the devices whether or not they are busy).

Comment 2 Fabian Deutsch 2014-12-17 14:59:22 UTC
I don't have objections closing this, as it's documented in a kbase article and we were just using it wrong.


Note You need to log in before you can comment on or make changes to this bug.