Can cmirror be used for mirroring shared logical volumes on RHEL 8?

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux Server 8 (with the High Availability Add On and Resilient Storage Add Ons)

Issue

  • Can cmirror be used for mirroring shared logical volumes on RHEL 8?

Resolution

On RHEL 8 cmirrord is non-functional and deprecated for RHEL 8.x and will be removed in a subsequent RHEL version. In the RHEL 8.2 release notes it states that LVM mirroring is deprecated: 8.2 Release Notes Red Hat Enterprise Linux 8 | 5.1.8. File systems and storage

This cmirrord daemon was previously used by pvmove for clustered volume groups. To use pvmove on a shared volume group the volume group has to be activated exclusively on only one cluster node and deactivated on all other cluster nodes. For more information using pvmove on RHEL 8 then see the following procedure: How to pvmove a volume that utilizes lvmlockd shared activation.

In addition, the option with_cmirrord in the resource-agent lvmlockd should not be enabled and will not enable cmirror functionality.

Root Cause

The cluster mirror (cmirrord) capability is not functional in RHEL 8 because it depended on clvmd which is not supported or shipped in RHEL 8. On RHEL 8 LVM uses shared volume groups managed by lvmlockd instead of clustered volume groups managed by clvmd. There does not exist the functionality in cmirrord to use lvmlockd (instead of clvmd) with LVM mirroring on shared volume groups.

For more information on this then see the following: This content is not included.1691095 – remove cluster mirror capability | RHEL 8

The man page for lvmlockd on RHEL 8 states shared volume groups using lvmlockd cannot be mirrored:

   [....]
   LV activation
       In a shared VG, LV activation involves locking through lvmlockd, 
       and the following values are possible with 
       lvchange/vgchange -a:
       [....]
       sy     The command activates the LV in shared mode, allowing multiple hosts to activate
                 the LV concurrently.  Before activating the LV, the command uses lvmlockd to 
                  acquire a shared lock on the LV.  If the lock cannot be acquired, the LV is not 
                  activated and an  error  is  reported.   This would happen if the LV is active 
                  exclusively on another host.  If the LV type prohibits shared access, such as 
                  a snapshot, the command will report an error and fail.  The shared mode is 
                  intended for a multi-host/cluster application or file system.  LV types that cannot
                  be used concurrently from multiple hosts include thin, cache, raid, MIRROR, and
                 snapshot.
       [....]
Components
Category

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.