Hypervisor LVM Configuration
Overview
Hypervisor hosts that have LVM installed must keep LVM from scanning the volumes attached to their VMs. When LVM scans those volumes, the host can hang or slow down (see Symptoms When Not Configured). How you prevent this depends on the host operating system:
Platform9 OS: no configuration is needed. Platform9 OS uses the LVM devices file, so LVM uses only the devices listed in that file. Do not add
filterorglobal_filtersettings to/etc/lvm/lvm.conf. See Platform9 OS Hosts.Ubuntu: configure LVM filters in
/etc/lvm/lvm.confby following the steps on this page, starting with Check if LVM Package is Installed.
In this guide, you will configure LVM filters on an Ubuntu hypervisor host.
Platform9 OS Hosts
Platform9 OS hosts use the LVM devices file (/etc/lvm/devices/system.devices), which lists the devices LVM is allowed to use. The installer creates this file. Volumes attached to the host's VMs are not listed in it, so LVM never scans them.
While the devices file is in use, LVM ignores the filter and global_filter settings in /etc/lvm/lvm.conf. The LVM filter steps on this page do not apply to Platform9 OS hosts.
To review the LVM configuration of a Platform9 OS host, open the Host Management Console and navigate to Storage. The LVM Devices section shows whether the devices file is in use, lists the devices LVM is allowed to use, and reports the result of lvmdevices --check.
You can also list the entries in the devices file from a shell on the host:
lvmdevicesRemove LVM Filters from Platform9 OS Hosts
If you added filter or global_filter lines to /etc/lvm/lvm.conf on a Platform9 OS host, LVM ignores them and prints the following warnings every time you run pvs, vgs, or lvs:
Please remove the lvm.conf global_filter, it is ignored with the devices file.
Please remove the lvm.conf filter, it is ignored with the devices file.The LVM Devices section of the Storage page in the Host Management Console also reports that a filter is still defined in /etc/lvm/lvm.conf.
To clear the warnings, remove the filter and global_filter lines from the devices section of /etc/lvm/lvm.conf.
Check if LVM Package is Installed
Run the following command to check if LVM package is installed on your system.
If LVM is installed, you will see output similar to above. In that case, follow the steps below to set LVM filters.
Identify Physical Disk Devices On Your System
Run the command below to identify all the block devices mounted on this host. NOTE however that this command will also list any VM disks as well.
Identify from the output above the subset of entries that are the physical disks for your hypervisor host.
In this example, you would only pick sda and sdb. The other four devices are volumes attached to VMs running on this host.
Add Or Enable LVM Filters For All Disks
Edit /etc/lvm/lvm.conf and locate the devices section.
Then edit the filter and global_filter values and add the entries for the physical disks for your hypervisor host that you identified above.
Note that this is a regular expression, where 'a' stands for accepting the path and 'r' stands for rejecting the path in the syntax below.
This example
Validate that the LVM Filters are Active
Symptoms When Not Configured
If LVM is installed on your hypervisor but the LVM filters are not configured properly, here are some of the side effects and symptoms that you may observe on your Private Cloud Director hosts:
QEMU processes stuck in uninterruptible sleep (D state)
VM operations hang or timeout
Slow system responsiveness on the host
High I/O wait times during LVM operations
VMs fail to start or become unresponsive
Related Pages
Pre-requisites: hypervisor host requirements, including supported operating systems
Host Management Console: the local console on Platform9 OS hosts, including the Storage page
NetApp Storage Configurations: multipath and LVM filter steps for NetApp iSCSI and Fibre Channel backends
Last updated
Was this helpful?
