I have on ubuntu created an encrypted luks partition containing a LVM2 pv which again contain only one volume group "virtual-guests" which I then used with KVM for all the guest os'es. Everything has always worked as expected, however, I wanted to try Centos with SELinux enabled and got it all installed on the same device.

Afterwards, I managed to reconnect the encrypted partition just as under Ubuntu, and running the command blkid show the partition: /dev/mapper/virt-guest: UUID="..." TYPE="LVM2_Member"

However - pvscan does not recognize the disk as being a pv on this system.

I am quite sure I am missing something very simple - what is the correct method for getting the new host OS to recognize the partition as a pv under CentOS?

  • Which version of CentOS and LVM (lvm version)? Dec 13, 2021 at 18:16
  • Centos Stream 9 with LVM2. The previous system was Ubuntu 20.04 also with the LVM2 that came with the distribution.
    – Kenneth
    Dec 13, 2021 at 19:57
  • lvm2.x86_64 : Userland logical volume management tools Repo : @System Matched from: Provide : lvm2 = 9:2.03.14-2.el9
    – Kenneth
    Dec 13, 2021 at 20:00
  • I mean, if you can see /dev/mapper/${volume-name}, then obviously the PV was found, the VG was complete, the volume was found. Dec 13, 2021 at 20:20
  • The currently found PVs can be queried using pvs; you can force a complete re-scan and debug information using pvscan -vv --cache -aay. Dec 13, 2021 at 20:20

1 Answer 1


LVM 2.03.14 added a new feature/config file called LVM devices, check lvmdevices man page for details. Short version: All PVs you want to use must now be whitelisted in /etc/lvm/devices/system.devices, PVs (block devices) not listed there will be completely ignored by LVM (to the point that pvs won't list them and any VGs/LVs on them won't be autoactivated). Because your disk wasn't present during installation it was not added to the file (the Anaconda installer adds all devices present during the installation to it).

You have three options:

  • Add the PV to the file using lvmdevices --adddev <device path>.
  • Disable the new feature by setting use_lvmdevices to 0 in /etc/lvm/lvm.conf.
  • Remove /etc/lvm/devices/system.devices to disable the feature (no device file means all devices will be used by LVM).
  • That fixed it! Thanks!
    – Kenneth
    Dec 13, 2021 at 20:33
  • 1
    Just one change - it was lvmdevices --adddev <device path> so 3 d's in a row...
    – Kenneth
    Dec 13, 2021 at 20:35
  • Thanks, fixed. We need bash completion for the editor here :-) Dec 13, 2021 at 20:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .