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 1328077 - multipath reports successful resize of math on second attempt
Summary: multipath reports successful resize of math on second attempt
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: device-mapper-multipath
Version: 6.7
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Ben Marzinski
QA Contact: Lin Li
Milan Navratil
URL:
Whiteboard:
Depends On:
Blocks: 1269194 1324930 1333492
TreeView+ depends on / blocked
 
Reported: 2016-04-18 11:49 UTC by Lukas Herbolt
Modified: 2019-12-16 05:40 UTC (History)
13 users (show)

Fixed In Version: device-mapper-multipath-0.4.9-94.el6
Doc Type: Bug Fix
Doc Text:
*multipathd* no longer reports success after a failed device resizing If the *multipathd* service failed to resize a device, *multipathd* did not reset the size back to the original value internally. As a consequence, on future attempts to resize a device, *multipathd* reported a success even when *multipathd* did not resize the device. If resizing fails, *multipathd* now reverts the size of the device back to the original value internally. As a result, *multipathd* now only reports success if a device is resized successfully.
Clone Of:
: 1333492 (view as bug list)
Environment:
Last Closed: 2017-03-21 10:50:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0697 0 normal SHIPPED_LIVE device-mapper-multipath bug fix and enhancement update 2017-03-21 12:39:06 UTC

Description Lukas Herbolt 2016-04-18 11:49:39 UTC
Description of problem:
Multipath reports path as sucessfully resized after second attempt despite of the size in DM table remains.

Version-Release number of selected component (if applicable):
 - device-mapper-multipath-0.4.9-87.el6.x86_64
 - device-mapper-libs-1.02.95-2.el6.x86_64
 - device-mapper-1.02.95-2.el6.x86_64

How reproducible:
Resizing of multipath device which is on top of two devices with different 
size results with fail on first attempt but success on second one.

Steps to Reproduce:
Running on VM where I use two devices grouped to multipath over serial.
Devices has different size first 100M second 200M
(I know this is ugly hack, but it is quick way how to reproduce it.)

1.
Create two device with different size and set same serial number over
qemu or libvirt (it works on latest F23 as hypervizor)

2.
Configure mpath to group by serial

3.
Manually over dmsetup create multipath target. It's important to have the bigger device as first!
# dmsetup create mpathe --table "0 204800 multipath 0 0 2 1 round-robin 0 1 1 8:144 1 round-robin 0 1 1 8:64 1"

4.
# multipathd -d resize map /dev/mapper/mpathe
fail

You will get in messages:
Apr 18 12:13:44 rhel6-debug kernel: [ 4913.905877] device-mapper: table: 253:2: sde too small for target: start=0, len=409600, dev_size=204800

5.
On second attempt:
# multipathd -d resize map /dev/mapper/mpathe
ok

And in logs you will have message like. 
Apr 18 12:13:47 rhel6-debug multipathd: mpathe: map is still the same size (409600)
Apr 18 12:13:48 rhel6-debug multipathd: mpathe: resize map (operator)

but the actual size is still the same:

# dmsetup table mpathe
0 204800 multipath 0 0 2 1 round-robin 0 1 1 8:144 1 round-robin 0 1 1 8:64 1 


Actual results:
The mpath is reported as sucesfully resized but the size is still the same.

Expected results:
It should report fail on every attempt. 


Additional info:
[3:0:4:0]    disk    QEMU     QEMU HARDDISK    2.4.  /dev/sde [8:64]
[4:0:4:0]    disk    QEMU     QEMU HARDDISK    2.4.  /dev/sdj [8:144]

[root@rhel6-debug ~]# sg_readcap /dev/sde 
Read Capacity results:
   Last logical block address=204799 (0x31fff), Number of blocks=204800
   Logical block length=512 bytes
Hence:
   Device size: 104857600 bytes, 100.0 MiB, 0.10 GB
[root@rhel6-debug ~]# sg_readcap /dev/sdj
Read Capacity results:
   Last logical block address=409599 (0x63fff), Number of blocks=409600
   Logical block length=512 bytes
Hence:
   Device size: 209715200 bytes, 200.0 MiB, 0.21 GB


--
Lukas

Comment 6 Ben Marzinski 2016-10-15 21:44:53 UTC
Fixed this. Multipathd was updating the device size internally, even on failures. So on future attempts, it thought the device was already the new size. Now it keeps the original size, until the resize actually succeeds.

Comment 16 errata-xmlrpc 2017-03-21 10:50:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0697.html


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