# lvmconfig | grep sysfs device_id_sysfs_dir="/test/sys/" Set a wwid for the PV. # cat /test/sys/dev/block/8\:80/device/wwid naa.123 Set a product_uuid for the machine. # cat /test/sys/devices/virtual/dmi/id/product_uuid 111-222-333 Add the PV to a new devices file. # lvmdevices --adddev /dev/sdf1 # cat /etc/lvm/devices/system.devices # LVM uses devices listed in this file. # Created by LVM command lvmdevices pid 2469882 at Mon Oct 2 11:03:21 2023 PRODUCT_UUID=111-222-333 VERSION=1.1.1 IDTYPE=sys_wwid IDNAME=naa.123 DEVNAME=/dev/sdf1 PVID=02HT8A2Vitz0wROk3ODc0zpLHTt18sAi PART=1 Change the wwid of the device, simulating the PV moving to a new device. # echo "naa.456" > /test/sys/dev/block/8\:80/device/wwid PV is not found on the new device. # pvs Devices file sys_wwid naa.123 PVID 02HT8A2Vitz0wROk3ODc0zpLHTt18sAi last seen on /dev/sdf1 not found. Change the product_uuid of the machine, simulating the PV moving to a new machine. # echo "444-555-666" > /test/sys/devices/virtual/dmi/id/product_uuid The PV is found on the new device. # pvs Devices file sys_wwid naa.123 PVID 02HT8A2Vitz0wROk3ODc0zpLHTt18sAi last seen on /dev/sdf1 not found. Devices file PVID 02HT8A2Vitz0wROk3ODc0zpLHTt18sAi found on /dev/sdf1. Devices file PVID 02HT8A2Vitz0wROk3ODc0zpLHTt18sAi has new device ID sys_wwid naa.456 from /dev/sdf1. PV VG Fmt Attr PSize PFree /dev/sdf1 ff lvm2 a-- <32.00g <32.00g The device ID is updated. # cat /etc/lvm/devices/system.devices # LVM uses devices listed in this file. # Created by LVM command pvs pid 2469918 at Mon Oct 2 11:06:43 2023 PRODUCT_UUID=444-555-666 VERSION=1.1.2 IDTYPE=sys_wwid IDNAME=naa.456 DEVNAME=/dev/sdf1 PVID=02HT8A2Vitz0wROk3ODc0zpLHTt18sAi PART=1