Configuration of LVM partition on the Linux server
-
Filter configuration
When you create the images of RHEL 8.x or RHEL 9.x for booting a virtual machine from a volume, and the image contains an LVM partition, the IBM Cloud Infrastructure Center requires LVM to use the multipath device (e.g., mpathX) to scan the LVM physical volumes. To prevent LVM from using the underlying devices (e.g., sda, sdb) of the multipath device, add the following option to the devices section of /etc/lvm/lvm.conf.
devices { filter = [ "r|/dev/sd.*|" ] <--- add this line -
Explicitly disable the use of a device file on RHEL9.x
When you create the images of RHEL 9.x, a change in LVM2 can cause servers deployed from these images to enter emergency mode. To prevent this, uncomment the use_devicesfile = 0 line in /etc/lvm/lvm.conf.
# Configuration option devices/use_devicesfile. # Enable or disable the use of a devices file. # When enabled, lvm will only use devices that # are lised in the devices file. A devices file will # be used, regardless of this setting, when the --devicesfile # option is set to a specific file name. # This configuration option has an automatic default value. use_devicesfile = 0 <--- umcomment this line