This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 883736 - [anaconda regression] kpartx failed to create the partitions based on mpath disk
[anaconda regression] kpartx failed to create the partitions based on mpath disk
Status: CLOSED DUPLICATE of bug 880263
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: anaconda (Show other bugs)
7.0
Unspecified Unspecified
urgent Severity urgent
: beta
: 7.0
Assigned To: Anaconda Maintenance Team
Release Test Team
test blocker
: TestBlocker
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-05 02:51 EST by Xiaowei Li
Modified: 2015-01-26 19:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-10 10:33:35 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
program.log (15.17 KB, text/plain)
2012-12-05 03:03 EST, Xiaowei Li
no flags Details

  None (edit)
Description Xiaowei Li 2012-12-05 02:51:04 EST
Description of problem:
It's a regression issues. anaconda uses 'kpartx -a -s' to create the partitions. If the disk is multipathed and the partitions are created by 'multipath' this command will fail.

I have checked the anaconda git, found this check-in. 
http://git.fedorahosted.org/cgit/anaconda.git/commit/?id=3f0a1f9668f42dabe5ec728a76347e25cdc551d7

I tested both 'kpartx -a -s' and the previous invoke 'kpartx -a -p p'. 
If the partitions are created, the 'kpartx -a -s' will try to create mpatha1 and fail. But the previous invoke will exit gracefully.

So at least for the mpath disk, we should still use 'kpartx -a -p p -s' to create the partitions. 

[anaconda root@localhost ~]# multipath -ll
mpatha (360a98000572d574a4e6f63706772594b) dm-1 NETAPP  ,LUN             
size=30G features='3 pg_init_retries 50 retain_attached_hw_handler' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=25 status=active
| |- 0:0:1:0 sdc 8:32 active ready running

| `- 4:0:1:0 sdd 8:48 active ready running
`-+- policy='service-time 0' prio=5 status=enabled
  |- 0:0:0:0 sda 8:0  active ready running
  `- 4:0:0:0 sdb 8:16 active ready running
[anaconda root@localhost ~]# ls /dev/mapper/
control  live-rw  mpatha  mpathap1  mpathap2
[anaconda root@localhost ~]# kpartx -a -s /dev/mapper/mpatha
device-mapper: create ioctl on mpatha1 failed: Device or resource busy
create/reload failed on mpatha1
device-mapper: create ioctl on mpatha2 failed: Device or resource busy
create/reload failed on mpatha2
[anaconda root@localhost ~]# kpartx -a -s -p p /dev/mapper/mpatha
[anaconda root@localhost ~]# echo $?
0


please have a quick look. It's blocking our san boot testing.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.
  
Actual results:
02:16:32,477 INFO program: Running... udevadm settle --timeout=300
02:16:32,495 INFO program: Running... multipath mpatha
02:16:32,605 INFO program: create: mpatha (360a98000572d574a4e6f63706772594b) undef NETAPP  ,LUN             
02:16:32,606 INFO program: size=30G features='2 pg_init_retries 50' hwhandler='0' wp=undef
02:16:32,606 INFO program: |-+- policy='service-time 0' prio=25 status=undef
02:16:32,606 INFO program: | |- 0:0:1:0 sdc 8:32 undef ready running
02:16:32,606 INFO program: | `- 4:0:1:0 sdd 8:48 undef ready running
02:16:32,607 INFO program: `-+- policy='service-time 0' prio=5 status=undef
02:16:32,607 INFO program:   |- 0:0:0:0 sda 8:0  undef ready running
02:16:32,607 INFO program:   `- 4:0:0:0 sdb 8:16 undef ready running
02:16:32,627 INFO program: Running... udevadm settle --timeout=300
02:16:32,730 INFO program: Running... kpartx -a -s /dev/mapper/mpatha
02:16:32,745 ERR program: device-mapper: create ioctl on mpatha1 failed: Device or resource busy
02:16:32,746 ERR program: create/reload failed on mpatha1
02:16:32,747 ERR program: device-mapper: create ioctl on mpatha2 failed: Device or resource busy
02:16:32,748 ERR program: create/reload failed on mpatha2


Expected results:


Additional info:
Comment 1 Xiaowei Li 2012-12-05 03:03:10 EST
Created attachment 658045 [details]
program.log
Comment 2 Xiaowei Li 2012-12-05 03:16:48 EST
The workaround is to wipe out the partition table using fdisk or dd.
Comment 3 David Lehman 2012-12-05 13:06:58 EST
This is the same as bug 880263. Good job identifying the kpartx -p change as the trigger.
Comment 4 David Cantrell 2012-12-05 14:44:43 EST

*** This bug has been marked as a duplicate of bug 880263 ***
Comment 5 Xiaowei Li 2012-12-09 23:30:46 EST
(In reply to comment #4)
> 
> *** This bug has been marked as a duplicate of bug 880263 ***

I still saw this issue with the tree RHEL-7.0-20121206.n.1

Could you tell me which tree or anaconda version will include this fix?

I re-open it to track this issue from Storage-QE side since it's blocking our SAN boot testing.
Comment 6 Chris Lumens 2012-12-10 10:33:35 EST
You need a tree constructed with lorax-18.23-1.  We don't know what tree that is, because we're not rel-eng.  Please don't undupe bugs unless you are adding information indicating the two bugs are not related.  It just makes a mess of things.

*** This bug has been marked as a duplicate of bug 880263 ***

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