"The specified vg_access_mode doesn't match the lock_type on VG metadata!" observed after creating `LVM-activate` cluster resources using `vg_access_mode=lvmlockd`
Environment
- Red Hat Enterprise Linux 8, 9
- High Availability Pacemaker Cluster
Issue
-
When configuring
LVM-Activatewith the optionsactivation_mode=sharedandvg_access_mode=lvmlockdwe see:* cluster_lvm_start_0 on rhel8-node-1.clust 'invalid parameter' (2): call=61, status='complete', exitreason='The specified vg_access_mode doesn't match the lock_type on VG metadata!', last-rc-change='2021-01-26 11:41:58 -05:00', queued=0ms, exec=132ms
Resolution
The lock-type for the shared LVM volume group needs to be to dlm in order for the volume group to by managed by lvmlockd.
-
On one node:
# vgchange --lock-type dlm <vg name> -
On all nodes:
# vgchange --lock-start <vg name> -
On one node:
# pcs resource cleanup
Additional Information and Related issues:
-
Note: If this issue is observed on an
LVM-Activateresource with the optionvg_access_mode=system_idthen, refer to the following article: -
Note: If you have recently performed an update from RHEL 7 to RHEL 8, then this issue may be observed as a result of left over locking still attached to the VG's metadata from previous
clvmdlocking implementation. If you observe this error following such a major upgrade, please use the solution in below official documentation, and this includes an additional step to remove the older no longer supportedclvmdlocking:
Root Cause
The LVM volume group managed by pacemaker was not created with the --shared option and did not have the lock-type set to dlm.
Diagnostic Steps
Verify that the volume group is shared and has lock_type set to dlm.
# vgs -o+lock_type,systemid --foreign --shared
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.