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 1323806 - kpartx creates linear devices corresponding to partitions which have no device file
Summary: kpartx creates linear devices corresponding to partitions which have no devic...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: device-mapper-multipath
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: Lin Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-04 18:39 UTC by mulhern
Modified: 2021-09-03 12:11 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-08 02:56:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1319853 0 unspecified CLOSED -c option exits with 'requires a path to check' error, but path is there 2021-09-03 11:57:52 UTC

Internal Links: 1319853

Description mulhern 2016-04-04 18:39:05 UTC
Description of problem:

The initial situation is weird. There are partitions on certain drives, but, for some reason, corresponding partition devices are not created. However, on reboot, kpartx creates multipath devices corresponding to those partitions. So, the multipath devices exist, but none of the underlying devices that multipath must depend on.

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

Installed Packages
Name        : kpartx
Arch        : x86_64
Version     : 0.4.9
Release     : 85.el7
Size        : 37 k
Repo        : installed
From repo   : RHEL-7.2

How reproducible:

Seems consistent.

Steps to Reproduce:
1. First, get a situation where partitions are not being given their devices.
2. Make sure that these partitions are on multipathed devices.
3. Do a reboot and notice that the partitions do have their corresponding multipath devices even though there are no partition devices.

Actual results:

Multipath devices for partitions exist even though the device corresponding to the path on each partition does not exist.

Expected results:

I think multipath needs to be more cautious. I do not know much about the internals of multipath, but I feel like it must make use of the device nodes and so forth of the paths that correspond to the partitions.

Additional info:

None.

Comment 1 mulhern 2016-04-04 18:47:58 UTC
For example (output of multipath -ll):

WDC_WD10EFRX-68PJCN0_WD-WCC4JLHVDELY dm-11 ATA     ,WDC WD10EFRX-68P
size=932G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
  |- 0:0:37:0 sdap 66:144 active ready running
  `- 0:0:42:0 sdat 66:208 active ready running

sdap and sdat are multipathed paths to some device, have corresponding device nodes, and so forth.

dm-11 has a holder dm device:

ls /sys/devices/virtual/block/dm-11/holders/
dm-26

which corresponds to the partition on the drive that both sdap and sdat refer to.

But neither sdap nor sdat have partition devices:

[root@megadeth mulhern-journal]# ls /sys/devices/virtual/block/dm-11/slaves/sdat
alignment_offset  discard_alignment  holders   removable  subsystem
bdi               events             inflight  ro         trace
capability        events_async       power     size       uevent
dev               events_poll_msecs  queue     slaves
device            ext_range          range     stat
[root@megadeth mulhern-journal]# ls /sys/devices/virtual/block/dm-11/slaves/sdap
alignment_offset  discard_alignment  holders   removable  subsystem
bdi               events             inflight  ro         trace
capability        events_async       power     size       uevent
dev               events_poll_msecs  queue     slaves
device            ext_range          range     stat

even though the partition is definitely on the drive:

[root@megadeth mulhern-journal]# parted /dev/dm-11
GNU Parted 3.1
Using /dev/dm-11
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print free                                                       
Model: Linux device-mapper (multipath) (dm)
Disk /dev/dm-11: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
        17.4kB  1049kB  1031kB  Free Space
 1      1049kB  999MB   998MB
        999MB   1000GB  999GB   Free Space

Comment 3 Ben Marzinski 2016-04-05 17:59:51 UTC
The multipath udev rules intentionally remove the partition device nodes from the path devices.

From /lib/udev/rules.d/62-multipath.rules:

ENV{DM_MULTIPATH_DEVICE_PATH}=="1", ENV{DM_MULTIPATH_WIPE_PARTS}="1", \
        RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}"


ENV{DM_MULTIPATH_WIPE_PARTS} is used to make sure that these rules only wipe the partitions once.  If a user recreates the partition devices (for instance, by using "blockdev --rereadpt") they will not get removed a second time, until you reboot.

So, if I'm understanding this bugzilla correctly, this can be closed as NOTABUG, correct?

Comment 4 mulhern 2016-04-05 19:31:39 UTC
Yes, please go ahead.


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