Bug 1269968 - Partition on multipath device should not be a holder of that device.
Partition on multipath device should not be a holder of that device.
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: device-mapper-multipath (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Ben Marzinski
Storage QE
Depends On:
  Show dependency treegraph
Reported: 2015-10-08 12:09 EDT by mulhern
Modified: 2015-10-08 12:23 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-10-08 12:23:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description mulhern 2015-10-08 12:09:48 EDT
Description of problem:

holders/slaves relationship between multipath device and the partitions on that device is a very bad reflection of reality.

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

Installed Packages
Name        : device-mapper-multipath
Arch        : x86_64
Version     : 0.4.9
Release     : 85.el7
Size        : 178 k
Repo        : installed
From repo   : RHEL-7-RTT

How reproducible:


Steps to Reproduce:
1. Multipath a bunch of device paths. Say paths are /dev/sda and /dev/sdb. mpath device is mpatha.
2. Create a partition on the device. This results in /dev/sda1 and /dev/sdb1 partitions, as well a a multipath partition, say mpatha1.
3. In sysfs, observe that mpatha1 is in holders of mpatha and that mpatha is a slave of mpatha1.

Actual results:

mpatha1 occurs in holders directory of mpatha, mpatha occurs in slaves directory of mpatha1.

Expected results:

Same as actual, but...

Additional info:

This seems like a bad representation of reality. Better to have mpatha1 be a subdirectory of mpatha's devicepath, just like sda1 is a subdirectory of sda's device path. A much more reasonable holder/slave relationship would be between mpatha1 and the partitions that it corresponds to, i.e., sda1 and sdb1.
Comment 1 Ben Marzinski 2015-10-08 12:23:53 EDT
This isn't an arbitrary decision. The current holder/slave relationship IS the reality here.

mpatha1 is not in reality a partition of mpatha. mpatha1 is a seperate device-mapper linear device that maps over the same part of mpatha as sda1 does over sda.  Multipath does some additional fancy work to make mpatha1 seem more like a partition. For instance, if you try to remove mpatha through multipath, it will automatically first remove mpatha1.  But multipath doesn't get to choose the holder/slave relationship.  That depends on how devices are actually set up in the system. Any program that wants to work with these stacked devices correctly, would need to know how they are actually related. For instance, if some other program wanted to disassemble a stack of devices including a multipath device and it's kpartx partition device, it would need to remove the partition device first, before it could remove the multipath device, because the partition device mpatha1 really is a holder of mpatha.

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