3.5. The Metadata Daemon (lvmetad)
lvmetad) and a
udevrule. The metadata daemon has two main purposes: it improves performance of LVM commands and it allows
udevto automatically activate logical volumes or entire volume groups as they become available to the system.
global/use_lvmetadvariable is set to 1 in the
lvm.confconfiguration file. This is the default value. For information on the
lvm.confconfiguration file, see Appendix B, The LVM Configuration Files.
lvmetaddaemon is not currently supported across the nodes of a cluster, and requires that the locking type be local file-based locking. When you use the
lvmconf --enable-cluster/--disable-clustercommand, the
lvm.conffile is configured appropriately, including the
use_lvmetadsetting (which should be 0 for
locking_type=3). Note, however, that in a Pacemaker cluster, the
ocf:heartbeat:clvmresource agent itself sets these parameters as part of the start procedure.
use_lvmetadfrom 1 to 0, you must reboot or stop the
lvmetadservice manually with the following command.
systemctl stop lvm2-lvmetad.service
lvmetaddaemon scans each device only once, when it becomes available, using
udevrules. This can save a significant amount of I/O and reduce the time required to complete LVM operations, particularly on systems with many disks.
lvmetaddaemon is enabled, the
activation/auto_activation_volume_listoption in the
lvm.confconfiguration file can be used to configure a list of volume groups or logical volumes (or both) that should be automatically activated. Without the
lvmetaddaemon, a manual activation is necessary.
lvmetaddaemon is running, the
filter =setting in the
/etc/lvm/lvm.conffile does not apply when you execute the
pvscan --cache devicecommand. To filter devices, you need to use the
global_filter =setting. Devices that fail the global filter are not opened by LVM and are never scanned. You may need to use a global filter, for example, when you use LVM devices in VMs and you do not want the contents of the devices in the VMs to be scanned by the physical host.