Bug 1173698

Summary: partprobe fails in mpath/partition/pv/vg/lv setup
Product: Red Hat Enterprise Linux 6 Reporter: Fabian Deutsch <fdeutsch>
Component: partedAssignee: Brian Lane <bcl>
Status: CLOSED WONTFIX QA Contact: Release Test Team <release-test-team-automation>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.6CC: bmcclain
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-17 14:59:22 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:
Bug Depends On:    
Bug Blocks: 1002699, 1164308, 1173188    
Attachments:
Description Flags
Testcase script none

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.