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 1437611 - activation and major/minor num change in one cmd is no longer possible
Summary: activation and major/minor num change in one cmd is no longer possible
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Heinz Mauelshagen
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-30 16:22 UTC by Corey Marthaler
Modified: 2021-09-03 12:37 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.02.170-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 21:52:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2222 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2017-08-01 18:42:41 UTC

Description Corey Marthaler 2017-03-30 16:22:33 UTC
Description of problem:
This is the issue listed in https://bugzilla.redhat.com/show_bug.cgi?id=1434027#c12 and it worked in rhel7.3.

[root@host-076 ~]# lvcreate -n foo -L 100M snapper_thinp 
  Logical volume "foo" created.
[root@host-076 ~]# lvchange -ay -f -My --major 255 --minor 164 /dev/snapper_thinp/foo
  Invalid option for command: --activate.


Version-Release number of selected component (if applicable):
3.10.0-635.el7.x86_64

lvm2-2.02.169-3.el7    BUILT: Wed Mar 29 09:17:46 CDT 2017
lvm2-libs-2.02.169-3.el7    BUILT: Wed Mar 29 09:17:46 CDT 2017
lvm2-cluster-2.02.169-3.el7    BUILT: Wed Mar 29 09:17:46 CDT 2017

Comment 2 Heinz Mauelshagen 2017-03-31 11:55:15 UTC
Upstream commit d6ddacf6a1543ba690fc349fad4c0c05cad1183b

Comment 3 Alasdair Kergon 2017-03-31 12:17:54 UTC
We should check all the other valid arg combinations in lvchange too, in particular everything else that this combination of -a and -M can be mixed with.

Comment 4 David Teigland 2017-03-31 14:48:49 UTC
(In reply to Heinz Mauelshagen from comment #2)
> Upstream commit d6ddacf6a1543ba690fc349fad4c0c05cad1183b

This incorrectly makes the activate option required; it needs to be optional, like this:

 lvchange --persistent y --minor Number LV
-OO: --major Number, OO_LVCHANGE
+OO: --major Number, --activate Active, OO_LVCHANGE
 ID: lvchange_persistent
 DESC: Make the minor device number persistent for an LV.
 RULE: all not LV_thinpool LV_cachepool

(also the commit mistakenly changed major to minor in OO:)

The addition of the new cmd def for persistent n is unnecessary because that's already included in OO_LVCHANGE_META.

So, the diff above should be all that is needed to handle the original description.

Comment 5 Heinz Mauelshagen 2017-03-31 15:01:07 UTC
Dave,

as is the combinations w/ and w/o -a all work.

I'll try your proposal to make sure...

Comment 6 Heinz Mauelshagen 2017-03-31 15:10:47 UTC
Dave,

tested and your proposal is good.
The major change didn't cause any issues, because --major is dealt with earlier.

Pushing your change.

Comment 8 Corey Marthaler 2017-05-10 22:30:35 UTC
Fix verified in the latest rpms.

3.10.0-663.el7.x86_64
lvm2-2.02.171-1.el7    BUILT: Wed May  3 07:05:13 CDT 2017
lvm2-libs-2.02.171-1.el7    BUILT: Wed May  3 07:05:13 CDT 2017
lvm2-cluster-2.02.171-1.el7    BUILT: Wed May  3 07:05:13 CDT 2017
device-mapper-1.02.140-1.el7    BUILT: Wed May  3 07:05:13 CDT 2017
device-mapper-libs-1.02.140-1.el7    BUILT: Wed May  3 07:05:13 CDT 2017
device-mapper-event-1.02.140-1.el7    BUILT: Wed May  3 07:05:13 CDT 2017
device-mapper-event-libs-1.02.140-1.el7    BUILT: Wed May  3 07:05:13 CDT 2017
device-mapper-persistent-data-0.7.0-0.1.rc6.el7    BUILT: Mon Mar 27 10:15:46 CDT 2017



[root@host-073 ~]# dmsetup ls
VG-foo  (253:2)

[root@host-073 ~]# lvchange -ay -f -My --major 255 --minor 164 /dev/VG/foo
  WARNING: Ignoring supplied major number 255 - kernel assigns major numbers dynamically. Using major number 253 instead.
  WARNING: Combining activation change with other commands is not advised.

[root@host-073 ~]# dmsetup ls
VG-foo  (253:164)

Comment 9 errata-xmlrpc 2017-08-01 21:52:19 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://access.redhat.com/errata/RHBA-2017:2222


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