Description of problem: # use_devicesfile OFF [root@hayes-01 ~]# grep use_devices /etc/lvm/lvm.conf # Configuration option devices/use_devicesfile. use_devicesfile = 0 [root@hayes-01 ~]# modprobe scsi_debug lbpws=1 dev_size_mb=1000 num_parts=4 [root@hayes-01 ~]# lsblk -Dr | grep "512B" sdl 0 512B 32M 0 sdl1 0 512B 32M 0 sdl2 0 512B 32M 0 sdl3 0 512B 32M 0 sdl4 0 512B 32M 0 [root@hayes-01 ~]# vgcreate test /dev/sdl[1234] Physical volume "/dev/sdl1" successfully created. Physical volume "/dev/sdl2" successfully created. Physical volume "/dev/sdl3" successfully created. Physical volume "/dev/sdl4" successfully created. Volume group "test" successfully created # use_devicesfile ON [root@hayes-01 ~]# grep use_devices /etc/lvm/lvm.conf # Configuration option devices/use_devicesfile. use_devicesfile = 1 [root@hayes-01 ~]# pvscan No matching physical volumes found [root@hayes-01 ~]# cat /etc/lvm/devices/system.devices # LVM uses devices listed in this file. # Created by LVM command vgcreate pid 2869 at Thu Jun 17 16:13:08 2021 VERSION=1.1.2095 [root@hayes-01 ~]# modprobe scsi_debug lbpws=1 dev_size_mb=1000 num_parts=4 [root@hayes-01 ~]# lsblk -Dr | grep "512B" sdl 0 512B 32M 0 sdl1 0 512B 32M 0 sdl2 0 512B 32M 0 sdl3 0 512B 32M 0 sdl4 0 512B 32M 0 [root@hayes-01 ~]# vgcreate test /dev/sdl[1234] Physical volume "/dev/sdl1" successfully created. Partitions /dev/sdl2 /dev/sdl1 have same device_id t10.Linux scsi_debug 18000 Physical volume "/dev/sdl2" successfully created. Partitions /dev/sdl3 /dev/sdl1 have same device_id t10.Linux scsi_debug 18000 Physical volume "/dev/sdl3" successfully created. Partitions /dev/sdl4 /dev/sdl1 have same device_id t10.Linux scsi_debug 18000 Physical volume "/dev/sdl4" successfully created. Volume group "test" successfully created [root@hayes-01 ~]# pvscan Devices file sys_wwid t10.Linux PVID Pnj0I0ycMUbMxZq7W5QqO0iS0c86pcoT last seen on /dev/sdl1 not found. Devices file sys_wwid t10.Linux PVID colZYcfhmDqviHU5Bz6npoJ7cfJZ9fr3 last seen on /dev/sdl2 not found. Devices file sys_wwid t10.Linux PVID gpCJUNCrW09HGa49rMGHQFOkYMdCbK3P last seen on /dev/sdl3 not found. Devices file sys_wwid t10.Linux PVID RqS4O9ohFQnoKcGwKxI390eqbEucOacL last seen on /dev/sdl4 not found. No matching physical volumes found [root@hayes-01 ~]# vgs Devices file sys_wwid t10.Linux PVID Pnj0I0ycMUbMxZq7W5QqO0iS0c86pcoT last seen on /dev/sdl1 not found. Devices file sys_wwid t10.Linux PVID colZYcfhmDqviHU5Bz6npoJ7cfJZ9fr3 last seen on /dev/sdl2 not found. Devices file sys_wwid t10.Linux PVID gpCJUNCrW09HGa49rMGHQFOkYMdCbK3P last seen on /dev/sdl3 not found. Devices file sys_wwid t10.Linux PVID RqS4O9ohFQnoKcGwKxI390eqbEucOacL last seen on /dev/sdl4 not found. [root@hayes-01 ~]# cat /etc/lvm/devices/system.devices # LVM uses devices listed in this file. # Created by LVM command vgcreate pid 2897 at Tue Jun 22 13:11:38 2021 VERSION=1.1.2096 IDTYPE=sys_wwid IDNAME=t10.Linux scsi_debug 18000 DEVNAME=/dev/sdl1 PVID=Pnj0I0ycMUbMxZq7W5QqO0iS0c86pcoT PART=1 IDTYPE=sys_wwid IDNAME=t10.Linux scsi_debug 18000 DEVNAME=/dev/sdl2 PVID=colZYcfhmDqviHU5Bz6npoJ7cfJZ9fr3 PART=2 IDTYPE=sys_wwid IDNAME=t10.Linux scsi_debug 18000 DEVNAME=/dev/sdl3 PVID=gpCJUNCrW09HGa49rMGHQFOkYMdCbK3P PART=3 IDTYPE=sys_wwid IDNAME=t10.Linux scsi_debug 18000 DEVNAME=/dev/sdl4 PVID=RqS4O9ohFQnoKcGwKxI390eqbEucOacL PART=4 Version-Release number of selected component (if applicable): kernel-4.18.0-310.el8 BUILT: Thu May 27 14:24:00 CDT 2021 lvm2-2.03.12-4.el8 BUILT: Tue Jun 22 03:35:27 CDT 2021 lvm2-libs-2.03.12-4.el8 BUILT: Tue Jun 22 03:35:27 CDT 2021 How reproducible: Everytime
needs to recognize scsi_debug in the wwid and avoid using it, fixed in https://sourceware.org/git/?p=lvm2.git;a=commit;h=1139a05939f85bd86a756b451a8f194bc7a72a2c
Marking Verified:Tested in the latest rpms. # lvm2-2.03.12-4.el8 [root@hayes-03 ~]# pvs -o pv_uuid --reportformat json /dev/sdq1 { "report": [ Devices file sys_wwid t10.Linux PVID RaOHk2TdYxVbd6lHREsjWZvvl0VDhDbd last seen on /dev/sdq1 not found. Failed to find device "/dev/sdq1". { "pv": [ ] } ] } # lvm2-2.03.12-5.el8 SCENARIO - scsi_debug_uuid_devices Test devicesfile addition and deletion using odd wwid scsi_debug devices (bug 1974901) creating PV on hayes-01 using device /dev/sdl1 Physical volume "/dev/sdl1" successfully created. 1. Check for valid devicesfile entry for scsi_debug created iMNGeFHuN8Xt62kcU61kpX7d0F9B5XQp IDTYPE=devname IDNAME=/dev/sdl1 DEVNAME=/dev/sdl1 PVID=iMNGeFHuN8Xt62kcU61kpX7d0F9B5XQp PART=1 2. Remove device file entry based on PV name /dev/sdl1 removing entry from the devices file for /dev/sdl1 3. Add device file entry based on PVID iMNGeFHuN8Xt62kcU61kpX7d0F9B5XQp lvmdevices --addpvid iMNGeFHuN8Xt62kcU61kpX7d0F9B5XQp Found PVID iMNGeFHuN8Xt62kcU61kpX7d0F9B5XQp on /dev/sdl1. IDTYPE=devname IDNAME=/dev/sdl1 DEVNAME=/dev/sdl1 PVID=iMNGeFHuN8Xt62kcU61kpX7d0F9B5XQp PART=1 4. Add device file entry based on PV name adding entry to the devices file for /dev/sdl1 IDTYPE=devname IDNAME=/dev/sdl1 DEVNAME=/dev/sdl1 PVID=iMNGeFHuN8Xt62kcU61kpX7d0F9B5XQp PART=1 removing pv /dev/sdl1 on hayes-01 Labels on physical volume "/dev/sdl1" successfully wiped.
Marking Verified in the latest build. kernel-4.18.0-323.el8 BUILT: Wed Jul 14 12:12:22 CDT 2021 lvm2-2.03.12-6.el8 BUILT: Tue Aug 3 07:23:05 CDT 2021 lvm2-libs-2.03.12-6.el8 BUILT: Tue Aug 3 07:23:05 CDT 2021 SCENARIO - scsi_debug_uuid_devices Test devicesfile addition and deletion using odd wwid scsi_debug devices (bug 1974901) modprobe scsi_debug lbpws=1 dev_size_mb=1000 num_parts=1 creating PV on hayes-01 using device /dev/sdl1 Physical volume "/dev/sdl1" successfully created. WARNING: D-Bus notification failed: Connection timed out 1. Check for valid devicesfile entry for scsi_debug created Wwaf6Y1b5uATHjKMgYu60iHoRwv4vNpO WARNING: Heartbeat did not respond at start of command. Check btimed service on remote host IDTYPE=devname IDNAME=/dev/sdl1 DEVNAME=/dev/sdl1 PVID=Wwaf6Y1b5uATHjKMgYu60iHoRwv4vNpO PART=1 2. Remove device file entry based on PV name /dev/sdl1 removing entry from the devices file for /dev/sdl1 3. Add device file entry based on PVID Wwaf6Y1b5uATHjKMgYu60iHoRwv4vNpO Found PVID Wwaf6Y1b5uATHjKMgYu60iHoRwv4vNpO on /dev/sdl1. IDTYPE=devname IDNAME=/dev/sdl1 DEVNAME=/dev/sdl1 PVID=Wwaf6Y1b5uATHjKMgYu60iHoRwv4vNpO PART=1 4. Add device file entry based on PV name adding entry to the devices file for /dev/sdl1 IDTYPE=devname IDNAME=/dev/sdl1 DEVNAME=/dev/sdl1 PVID=Wwaf6Y1b5uATHjKMgYu60iHoRwv4vNpO PART=1 removing pv /dev/sdl1 on hayes-01 Labels on physical volume "/dev/sdl1" successfully wiped.
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