RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 883736 - [anaconda regression] kpartx failed to create the partitions based on mpath disk
Summary: [anaconda regression] kpartx failed to create the partitions based on mpath disk
Keywords:
Status: CLOSED DUPLICATE of bug 880263
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: anaconda
Version: 7.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: beta
: 7.0
Assignee: Anaconda Maintenance Team
QA Contact: Release Test Team
URL:
Whiteboard: test blocker
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-05 07:51 UTC by Xiaowei Li
Modified: 2015-01-27 00:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-10 15:33:35 UTC
Target Upstream Version:
Embargoed:


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

Description Xiaowei Li 2012-12-05 07:51:04 UTC
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 08:03:10 UTC
Created attachment 658045 [details]
program.log

Comment 2 Xiaowei Li 2012-12-05 08:16:48 UTC
The workaround is to wipe out the partition table using fdisk or dd.

Comment 3 David Lehman 2012-12-05 18:06:58 UTC
This is the same as bug 880263. Good job identifying the kpartx -p change as the trigger.

Comment 4 David Cantrell 2012-12-05 19:44:43 UTC

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

Comment 5 Xiaowei Li 2012-12-10 04:30:46 UTC
(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 15:33:35 UTC
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.