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 1107315 - RFE: Use DM_DEFERRED_REMOVE when removing pathless multipath devices
Summary: RFE: Use DM_DEFERRED_REMOVE when removing pathless multipath devices
Keywords:
Status: CLOSED DUPLICATE of bug 1109431
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: device-mapper-multipath
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Ben Marzinski
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On: 1109431 1130168
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-09 21:33 UTC by Ben Marzinski
Modified: 2015-10-14 18:54 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
: 1109431 (view as bug list)
Environment:
Last Closed: 2015-10-14 18:54:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Log of unmounting a multipath device with no paths, set for deferred remove (6.92 KB, text/plain)
2014-06-13 15:34 UTC, Ben Marzinski
no flags Details

Description Ben Marzinski 2014-06-09 21:33:57 UTC
Description of problem:
When a multipath device losses all of its paths, multipathd tries to remove it. However, if it is in-use, this is impossible.  In this case, multipathd will never clean it up, even when the last user closes the device. Using the DM_DEFERRED_REMOVE flag, multipathd can schedule a removal for when the last user closes the device.  If a path comes back online before then, multipathd can cancel the deferred remove.

Comment 1 Ben Marzinski 2014-06-12 21:49:03 UTC
I tried to do this manually with the latest rhel-6.6 kernel, and the dmsetup patches, and it things got hung up pretty badly.  It's possible that there needs to be some kernel work to make this work correctly on multipath targets.  I'm pushing this out the 6.7 and I'll take a deeper look into it in a little bit.

Comment 3 Ben Marzinski 2014-06-13 15:34:10 UTC
Created attachment 908622 [details]
Log of unmounting a multipath device with no paths, set for deferred remove

This is a log from the serial console, when I finally unmount a multipath device set to deferred remove.  I'm did this over the serial console, because once this is finished.  all the ssh logins to the node hang.  Eventually the serial console login did to.

You should note that I ran this test with a multipath device that has no paths.  The reason for this is because I want to use deferred removes for exactly this case.  When the last path of a multipath device is removed, multipathd will try to delete it.  However, if it is open, the device can't be deleted.  Unfortunately, this means that the device just sits around, even once the last opener finally closes it.  I was planning on dealing with this cleanup in multipathd, but when Mikulas posted the deferred remove code, it seemed like an ideal way to do it.  I was just verifying that I could do this manually through dmsetup before adding the code to multipathd, when I hit this issue.

I'm going to verify that I don't see the same issue with a linear device or a multipath device with active paths, but I assume that it's specific to the way I want to use it for auto-removing devices with no paths and no users.

Comment 4 Ben Marzinski 2014-06-13 17:41:25 UTC
Trying this with a linear device worked fine.  Trying this with a multipath device that still had valid paths failed in the same way as a multipath device with no paths.

Comment 5 Alasdair Kergon 2014-06-21 00:32:12 UTC
kernel patch available on bug 1109431 fixes this problem

Comment 6 Ben Marzinski 2015-10-14 18:54:16 UTC

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


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