Enabling Consistency Groups for CephFS Workloads - Developer preview OpenShift Data Foundation 4.17
Updated
- Enabling Consistency Groups per DRPlacementControl (DRPC)
When Disaster Recovery (DR) is enabled, each workload is one DRPC resource on the Hub cluster. To enable consistency groups for the workload, you must add an annotation to the DRPC resource to activate the consistency group feature. Add the following annotation to the DRPC resource.
drplacementcontrol.ramendr.openshift.io/is-cg-enabled: "true"
Example:
apiVersion: ramendr.openshift.io/v1alpha1
kind: DRPlacementControl
metadata:
annotations:
drplacementcontrol.ramendr.openshift.io/app-namespace: deployment-cephfs
drplacementcontrol.ramendr.openshift.io/is-cg-enabled: "true"
This annotation is then propagated to the VolumeGroupReplication (VRG) on the Primary ManagedCluster. The VRG on the ManagedCluster uses this annotation to enable or disable the consistency group functionality.
- ReplicationGroupSource
The ReplicationGroupSource is found on the Primary cluster for the workload and it functions similarly to volsync ReplicationSource, managing Volume Groups as a source. The following output displays two ReplicationGroupSources within the same namespace. For more details, refer to the design document: Content from github.com is not included.CephFS RDR Consistency Group.
oc get replicationgroupsource -A
NAMESPACE NAME LAST SYNC DURATION NEXT SYNC SOURCE LAST SYNC START
deployment-cephfs benamar-drpccg-for-lab1 2024-10-15T12:15:25Z 25.73188668s 2024-10-15T12:20:00Z {"matchLabels":{"ramendr.openshift.io/consistency-group":"cg-for-lab1"}}
deployment-cephfs benamar-drpccg-for-lab2 2024-10-15T11:41:05Z 1m5.592738976s 2024-10-15T11:45:00Z {"matchLabels":{"ramendr.openshift.io/consistency-group":"cg-for-lab2"}} 2024-10-15T11:45:03Z
Each ReplicationGroupSource manages the group's ReplicationSources.
oc get replicationsource -A
NAMESPACE NAME SOURCE
deployment-cephfs busybox-cg1-pvc1 cephfscg-busybox-cg1-pvc1
deployment-cephfs busybox-cg1-pvc2 cephfscg-busybox-cg1-pvc2
deployment-cephfs busybox-cg2-pvc1 cephfscg-busybox-cg2-pvc1
deployment-cephfs busybox-cg2-pvc2 cephfscg-busybox-cg2-pvc2
- ReplicationGroupDestination
The ReplicationGroupDestination is found on the Secondary cluster for the workload and it functions similarly to VolSync ReplicationDestination, managing Volume Groups as a destination. The following output displays two ReplicationGroupDestinations within the same namespace. For more details, refer to the design document: Content from github.com is not included.CephFS RDR Consistency Group.
oc get replicationgroupdestination -A
NAMESPACE NAME LAST SYNC DURATION LAST SYNC START
deployment-cephfs benamar-drpccg-for-lab1 2024-10-11T15:40:32Z 1m2.442756481s 2024-10-11T15:40:32Z
deployment-cephfs benamar-drpccg-for-lab2 2024-10-11T15:40:10Z 1m10.88662613s 2024-10-11T15:40:10Z
Each ReplicationGroupDestination manages the group's ReplicationDestinations.
oc get replicationdestination -A
NAMESPACE NAME LAST SYNC DURATION
deployment-cephfs busybox-cg1-pvc1 2024-10-11T15:40:29Z 59.095958069s
deployment-cephfs busybox-cg1-pvc2 2024-10-11T15:40:30Z 1m0.027646131s
deployment-cephfs busybox-cg2-pvc1 2024-10-11T15:40:09Z 1m8.00190091s
deployment-cephfs busybox-cg2-pvc2 2024-10-11T15:40:09Z 1m8.099932974s
In summary, this article provides guidance for enabling consistency groups in CephFS workloads through DRPlacementControl and VolumeGroupReplication. The outlined procedures ensure that consistency groups are effectively enabled to protect workloads across clusters.
Article Type