Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionCorey Marthaler
2021-05-04 21:54:03 UTC
Description of problem:
This rfe is solely for users who did not read the LVMDEVICES(8) man page which clearly states:
"With no devices file, lvm will use any device on the system, and applies the filter to limit the full set of system devices. With a devices file, the regex filter is not used, and the filter settings in lvm.conf or the command line are ignored."
LVMDEVICES(8)
With no devices file, lvm will use any device on the system, and applies the filter to limit the full set of system devices. With a devices file, the regex filter is not used, and the filter settings in lvm.conf or the command line are ignored. The vgimportdevices command is one exception which does apply the regex filter when looking for a VG to import.
# using a filter *without* a devices file
[root@hayes-01 ~]# pvcreate /dev/sd[bcd]1
Physical volume "/dev/sdb1" successfully created.
Physical volume "/dev/sdc1" successfully created.
Physical volume "/dev/sdd1" successfully created.
[root@hayes-01 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdb1 lvm2 --- <1.82t <1.82t
/dev/sdc1 lvm2 --- <1.82t <1.82t
/dev/sdd1 lvm2 --- <1.82t <1.82t
# filter
[root@hayes-01 ~]# pvs --config "devices {filter = [ \"r|/dev/sdb1|\" ]"}
PV VG Fmt Attr PSize PFree
/dev/sdc1 lvm2 --- <1.82t <1.82t
/dev/sdd1 lvm2 --- <1.82t <1.82t
# using a filter *with* a devices file
[root@hayes-02 ~]# pvcreate /dev/sd[bcd]1
Physical volume "/dev/sdb1" successfully created.
Physical volume "/dev/sdc1" successfully created.
Physical volume "/dev/sdd1" successfully created.
[root@hayes-02 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdb1 lvm2 --- <1.82t <1.82t
/dev/sdc1 lvm2 --- <1.82t <1.82t
/dev/sdd1 lvm2 --- <1.82t <1.82t
# filter does nothing
[root@hayes-02 ~]# pvs --config "devices {filter = [ \"r|/dev/sdb1|\" ]"}
PV VG Fmt Attr PSize PFree
/dev/sdb1 lvm2 --- <1.82t <1.82t
/dev/sdc1 lvm2 --- <1.82t <1.82t
/dev/sdd1 lvm2 --- <1.82t <1.82t
# add filter to lvm.conf
[root@hayes-02 ~]# grep filter /etc/lvm/lvm.conf
filter = [ "r|/dev/sdb1|" ]
# filter does nothing
[root@hayes-02 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdb1 lvm2 --- <1.82t <1.82t
/dev/sdc1 lvm2 --- <1.82t <1.82t
/dev/sdd1 lvm2 --- <1.82t <1.82t
Version-Release number of selected component (if applicable):
lvm2-2.03.12-0.1.20210426git4dc5d4a.el8 BUILT: Mon Apr 26 08:23:33 CDT 2021
lvm2-libs-2.03.12-0.1.20210426git4dc5d4a.el8 BUILT: Mon Apr 26 08:23:33 CDT 2021
Comment 3Richard W.M. Jones
2021-06-01 10:01:26 UTC
Would appreciate more than no notice at all of these kinds of changes.
This one breaks libguestfs:
https://bugzilla.redhat.com/show_bug.cgi?id=1965941
Also why was this change made in RHEL 9 first and is still not present in Fedora?
(In reply to Richard W.M. Jones from comment #3)
> Would appreciate more than no notice at all of these kinds of changes.
> This one breaks libguestfs:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1965941
Sorry about that, we should probably find a way to search for other packages that use lvm and might be affected, to avoid notification-by-breakage. (We had some meetings with other groups last summer about this change but it was more about reviewing the planned design and features.)
> Also why was this change made in RHEL 9 first and is still not present in
> Fedora?
That would have been better, it will hopefully be enabled by default in fedora soon.
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 (lvm2 bug fix and enhancement update), 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-2021:4431
Description of problem: This rfe is solely for users who did not read the LVMDEVICES(8) man page which clearly states: "With no devices file, lvm will use any device on the system, and applies the filter to limit the full set of system devices. With a devices file, the regex filter is not used, and the filter settings in lvm.conf or the command line are ignored." LVMDEVICES(8) With no devices file, lvm will use any device on the system, and applies the filter to limit the full set of system devices. With a devices file, the regex filter is not used, and the filter settings in lvm.conf or the command line are ignored. The vgimportdevices command is one exception which does apply the regex filter when looking for a VG to import. # using a filter *without* a devices file [root@hayes-01 ~]# pvcreate /dev/sd[bcd]1 Physical volume "/dev/sdb1" successfully created. Physical volume "/dev/sdc1" successfully created. Physical volume "/dev/sdd1" successfully created. [root@hayes-01 ~]# pvs PV VG Fmt Attr PSize PFree /dev/sdb1 lvm2 --- <1.82t <1.82t /dev/sdc1 lvm2 --- <1.82t <1.82t /dev/sdd1 lvm2 --- <1.82t <1.82t # filter [root@hayes-01 ~]# pvs --config "devices {filter = [ \"r|/dev/sdb1|\" ]"} PV VG Fmt Attr PSize PFree /dev/sdc1 lvm2 --- <1.82t <1.82t /dev/sdd1 lvm2 --- <1.82t <1.82t # using a filter *with* a devices file [root@hayes-02 ~]# pvcreate /dev/sd[bcd]1 Physical volume "/dev/sdb1" successfully created. Physical volume "/dev/sdc1" successfully created. Physical volume "/dev/sdd1" successfully created. [root@hayes-02 ~]# pvs PV VG Fmt Attr PSize PFree /dev/sdb1 lvm2 --- <1.82t <1.82t /dev/sdc1 lvm2 --- <1.82t <1.82t /dev/sdd1 lvm2 --- <1.82t <1.82t # filter does nothing [root@hayes-02 ~]# pvs --config "devices {filter = [ \"r|/dev/sdb1|\" ]"} PV VG Fmt Attr PSize PFree /dev/sdb1 lvm2 --- <1.82t <1.82t /dev/sdc1 lvm2 --- <1.82t <1.82t /dev/sdd1 lvm2 --- <1.82t <1.82t # add filter to lvm.conf [root@hayes-02 ~]# grep filter /etc/lvm/lvm.conf filter = [ "r|/dev/sdb1|" ] # filter does nothing [root@hayes-02 ~]# pvs PV VG Fmt Attr PSize PFree /dev/sdb1 lvm2 --- <1.82t <1.82t /dev/sdc1 lvm2 --- <1.82t <1.82t /dev/sdd1 lvm2 --- <1.82t <1.82t Version-Release number of selected component (if applicable): lvm2-2.03.12-0.1.20210426git4dc5d4a.el8 BUILT: Mon Apr 26 08:23:33 CDT 2021 lvm2-libs-2.03.12-0.1.20210426git4dc5d4a.el8 BUILT: Mon Apr 26 08:23:33 CDT 2021