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 1384418 - Move blkdeactivate script and blk-availability.service from lvm2 to device-mapper package
Summary: Move blkdeactivate script and blk-availability.service from lvm2 to device-ma...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.9
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 1209855
Blocks: 1201030 1344381
TreeView+ depends on / blocked
 
Reported: 2016-10-13 09:17 UTC by Peter Rajnoha
Modified: 2017-03-21 12:03 UTC (History)
12 users (show)

Fixed In Version: lvm2-2.02.143-9.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1209855
Environment:
Last Closed: 2017-03-21 12:03:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0798 0 normal SHIPPED_LIVE lvm2 bug fix update 2017-03-21 12:51:51 UTC

Description Peter Rajnoha 2016-10-13 09:17:58 UTC
Do the same move in RHEL6 as we did in RHEL7 so others can use this script as a dependency on device-mapper instead of lvm2 package (e.g. multipath, see also bug #1209855).

+++ This bug was initially created as a clone of Bug #1209855 +++

The blkdeactivate should be moved to device-mapper package from lvm2 package as blkdeactivate handles also deactivation of other device-mapper based devices, not just LVM ones (e.g. multipath and cryptsetup).

The blkdeactivate script should be patched so that it checks in runtime for presence of tools needed to do the proper deactivation and it should handle specific device-mapper subsystem only if there's higher level subsystem tool present as well to do the action properly (for example, handle LVM devices only if "lvm" binary is present and skip them otherwise).

We need this move because other device-mapper based subsystems may require blkdeactivate to handle subsystem's devices properly. See also bug #1201030 for an example where this script would help multipath to do shutdown properly - mutlipath does not need LVM for it to work properly, but it surely requires libdevmapper and it needs blkdeactivate to shut down this subsystem's devices at least.

For now, this is just a quick workaround, until we have bug #1201737 properly resolved ("Add better separation of various blkdeactivate parts handling various device types - make it pluggable").

--- Additional comment from Peter Rajnoha on 2015-04-14 13:44:35 CEST ---

I've added a runtime check for lvm binary - if it's not present, no LVM handling is done with blkdeactivate script. This removes the static dependency on lvm and so we can move it to libdevmapper/device-mapper package so other DM subsystems can still make use of the general routine to deactivate DM devices.

But as stated in comment #0 above, the aim for the future is for DM subsystems (and others maybe) to provides plugins for blkdeactivate script instead of hardcoding the functionality into blkdeactivate directly - this will remove the deps altogether and such runtime checks won't be necessary anymore...

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=7a4e27eee51e89a550bc55f78daea6d943293202

!!!
Don't forget to move the blkdeactivate script from lvm2 to device-mapper package!!!
!!!

Comment 1 Peter Rajnoha 2016-10-13 09:19:07 UTC
This is a change in spec file only.

Comment 5 Roman Bednář 2016-11-15 14:01:30 UTC
Marking verified. 'blkdeactivate' binary and 'blk-availability' init script has been moved to device-mapper package.

Before patch:

# yum provides /etc/init.d/blk-availability
...
lvm2-2.02.143-7.el6_8.1.x86_64 : Userland logical volume management tools
Repo        : installed
Matched from:
Other       : Provides-match: /etc/init.d/blk-availability


# rpm -qf /sbin/blkdeactivate
lvm2-2.02.143-7.el6_8.1.x86_64



After patch:

# yum provides /etc/init.d/blk-availability
...
device-mapper-1.02.117-9.el6.x86_64 : Device mapper utility
Repo        : installed
Matched from:
Other       : Provides-match: /etc/init.d/blk-availability

# rpm -qf /sbin/blkdeactivate
device-mapper-1.02.117-9.el6.x86_64

Comment 7 errata-xmlrpc 2017-03-21 12:03:49 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-0798.html


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