Bug 601842 - Device mapper-multipath resizing problems.
Summary: Device mapper-multipath resizing problems.
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: device-mapper-multipath
Version: 5.5
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Ben Marzinski
QA Contact: Red Hat Kernel QE team
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-08 18:22 UTC by Ben Marzinski
Modified: 2018-12-01 16:17 UTC (History)
13 users (show)

Clone Of:
Last Closed: 2013-10-15 19:24:53 UTC

Attachments (Terms of Use)

Description Ben Marzinski 2010-06-08 18:22:32 UTC
Description of problem:
multipathd failed to resize a multipath device with:

Jun  7 23:01:49 cornucopia multipathd: mpath4: resize map (operator)
Jun  7 23:01:49 cornucopia multipathd: mpath4: failed to resize map : Invalid argument

Why it failed to resize is unknown.  Also, failing to resize the device caused other problems.  After a failed resize, multipathd did not resync its state with the kernel, so it though that the device was the new size.  This meant that future resize operations were ignored because it though that the user was simply trying to resize the device to its current size.

Trying to correct this by reconfiguring multipathd, caused multipathd to remove the device completely.  Rerunning multipath picked the device back up, with
the correct size.

Comment 1 Ben Marzinski 2010-06-15 20:17:18 UTC
I've seen this on a machine now, and run a systemtap script to capture the information when it failed. Here is what I see.

1276632312: multipathd[1985] entered dev_suspend for 14f504e46494c450045636534686e2d695575522d49524568 with flags 1540
1276632312: multipathd[1985] entered dm_swap_table with flags 3, suspended_bdev 0 and capacity 61472768
1276632312: multipathd[1985] exitted dm_table_get_size with 409600000
1276632312: multipathd[1985] exitted dm_swap_table with -22
1276632312: multipathd[1985] exitted dev_suspend with -22

Comment 2 Ben Marzinski 2010-06-15 20:44:21 UTC
I'm not sure if this initially failed for the same reason as the initial comment.  In this case, the initial failure happened because the device was already suspended when I tried the initial
multipathd -k"resize map <mapname>" command

However it was suspended with noflush set, so multipath couldn't change the size.
It turns out that this is easy to cause. If you simply run

# multipath

instead of 

# multipathd -k"resize map <mapname>"

multipath will try to reload the device with noflush set, causing this problem if you don't first resume the device before trying to resize it.  That is getting fixed in 584742.

I'm leaving this open for making multipathd resync it's state with the kernel after a failed operation.

Comment 6 Andrius Benokraitis 2013-10-15 19:24:53 UTC
No additional minor releases are planned for Production Phase 2 in Red Hat Enterprise Linux 5, and therefore Red Hat is closing this bugzilla as it does not meet the inclusion criteria as stated in:

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