Bug 2021703

Summary: use_devicesfile should be enabled by default in rhel9.0
Product: Red Hat Enterprise Linux 9 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Marian Csontos <mcsontos>
lvm2 sub component: Devices, Filtering and Stacking QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: urgent CC: agk, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, teigland, vtrefny, zkabelac
Version: 9.0Keywords: Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.03.14-2.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 15:56:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1983705    

Description Corey Marthaler 2021-11-10 01:42:10 UTC
Description of problem:
Fresh reimage to rhel9.0...

kernel-5.14.0-10.el9    BUILT: Tue Oct 26 07:00:13 PM CDT 2021
lvm2-2.03.14-1.el9    BUILT: Wed Oct 20 11:22:27 AM CDT 2021
lvm2-libs-2.03.14-1.el9    BUILT: Wed Oct 20 11:22:27 AM CDT 2021

[root@hayes-03 ~]# pvcreate /dev/sdb1
  Physical volume "/dev/sdb1" successfully created.
[root@hayes-03 ~]#  cat /etc/lvm/devices/system.devices 
cat: /etc/lvm/devices/system.devices: No such file or directory

[root@hayes-03 ~]# grep use_devices /etc/lvm/lvm.conf 
        # Configuration option devices/use_devicesfile.
        # use_devicesfile = 0

Comment 4 Corey Marthaler 2021-12-01 20:04:44 UTC
Marking Verfied:Tested in the latest rpms. 

kernel-5.14.0-21.el9    BUILT: Thu Nov 25 08:34:34 PM CST 2021
lvm2-2.03.14-2.el9    BUILT: Thu Nov 18 11:39:23 AM CST 2021
lvm2-libs-2.03.14-2.el9    BUILT: Thu Nov 18 11:39:23 AM CST 2021


The setting is still listed as commented out and 0, but this feature is now on by default in the latest build.

[root@hayes-03 ~]#  grep use_devicesfile /etc/lvm/lvm.conf 
        # Configuration option devices/use_devicesfile.
        # use_devicesfile = 0

[root@hayes-03 ~]# pvcreate /dev/sdb1
  Physical volume "/dev/sdb1" successfully created.
  Creating devices file /etc/lvm/devices/system.devices

[root@hayes-03 ~]# cat /etc/lvm/devices/system.devices 
# LVM uses devices listed in this file.
# Created by LVM command pvcreate pid 2089 at Wed Dec  1 13:59:07 2021
VERSION=1.1.1
IDTYPE=sys_wwid IDNAME=naa.6d09466083d8e100233c17f0209a73b5 DEVNAME=/dev/sdb1 PVID=l5qa1evfSa1mJ5xEA4kyydpdk8AgHlkK PART=1

Comment 5 David Teigland 2021-12-01 20:16:38 UTC
lvm.conf needs to be fixed, perhaps it's a result of trying to change the default value using a configuration option?  Using configure for this really seems unnecessarily complicated.  Just put DEFAULT_USE_DEVICES_FILE back in defaults.h and use patch to change 0 or 1.

Comment 9 Corey Marthaler 2021-12-10 04:08:25 UTC
Marking VERIFIED in latest lvm2/kernel.

kernel-5.14.0-25.el9.x86_64
lvm2-2.03.14-2.el9.x86_64


[root@hayes-02 ~]# grep use_devicesfile /etc/lvm/lvm.conf 
        # Configuration option devices/use_devicesfile.
        # use_devicesfile = 0


[root@hayes-02 ~]# pvcreate /dev/sdc1
  Physical volume "/dev/sdc1" successfully created.
[root@hayes-02 ~]# cat /etc/lvm/devices/system.devices
# LVM uses devices listed in this file.
# Created by LVM command pvcreate pid 2011 at Thu Dec  9 22:06:43 2021
VERSION=1.1.6
IDTYPE=sys_wwid IDNAME=naa.6d094660650d1e0022bd29ee1e0945a8 DEVNAME=/dev/sdc1 PVID=ShfXHlwOeNShmhRwipMGFlJKCh9LLVnG PART=1

Comment 11 errata-xmlrpc 2022-05-17 15:56:27 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 (new packages: lvm2), 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-2022:3972