Can I enable lvmetad under lvm.conf file when the system is a part of RHEL High Availability Cluster setup?
Environment
- Red Hat Enterprise Linux 6, 7
- High Availability and/or Resilient Storage Add-On
Issue
- Can I keep lvmetad enabled when system is part of RHEL HA Cluster environment?
Resolution
In a RHEL cluster setup, the lvmetad service should be stopped/disabled and use_lvmetad be set to 0 under /etc/lvm/lvm.conf file. Cluster will also prompt for a warning message to disable this parameter:
From our support policies document (Section: lvm2-lvmetad), it details the same to keep lvmetad disabled across the cluster nodes so as to avoid inconsistent metadata caching.
In order to disable the service please refer to KCS article: What is lvmetad and how do I disable it?.
Root Cause
The lvmetad is used to cache metadata and reduce disk scanning. When enabled (and running), lvmetad provides LVM commands with VG metadata and PV state. LVM commands then avoid reading this information from disks which can be slow. When disabled (or not running), LVM commands fall back to scanning disks to obtain VG metadata.
When lvmetad is kept enabled, the metadata is not read from the underlying device. It can lead to issue where the updates being made from one cluster node will not be visible on the other cluster members until a manual pvscan --cache is run. Hence this must be kept disabled in a RHEL High Availability Cluster setup.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.