Protect consistency groups
Consistency groups offer easily managed local and remote protection for SAN, NAS, and NVMe applications that span multiple volumes.
Creating a consistency group does not automatically enable protection. Protection policies can be set at the time of creation or after creating your consistency group. You can protect consistency groups using:
-
Local Snapshot copies
-
SnapMirror active sync (referred to as SnapMirror Business Continuity in versions of ONTAP before 9.15.1)
-
SnapMirror asynchronous (beginning 9.13.1)
-
Asynchronous SVM disaster recovery (beginning 9.14.1)
If you are utilizing nested consistency groups, you can set different protection policies for the parent and child consistency groups.
Beginning with ONTAP 9.11.1, consistency groups offer two-phase consistency group Snapshot creation. The two-phase Snapshot operation executes a pre-check, ensuring the Snapshot copy is captured successfully.
Recovery can occur for an entire consistency group, a single consistency group in a hierarchical configuration, or for individual volumes within the consistency group. Recovery can be achieved by selecting the consistency group you want to recover from, selecting the Snapshot copy type, and then identifying the Snapshot copy to base the restoration on. For more information about this process, see Restore a volume from an earlier Snapshot copy.
Configure a local Snapshot policy
Setting a local snapshot protection policy allows you to create a policy spanning all volumes in a consistency group.
The minimum supported Snapshot copy schedule for consistency groups is 30 minutes. This is based on testing for FlexGroups, which share the same Snapshot infrastructure as consistency groups.
-
Select Storage > Consistency groups.
-
Select the consistency group you have created from the Consistency group menu.
-
At the top right of the overview page for the consistency group, select Edit.
-
Check the box next to Schedule Snapshot copies (local).
-
Select a Snapshot policy. To configure a new, custom policy, refer to Create a custom data protection policy.
-
Select Save.
-
Return to the consistency group overview menu. In the left column under Snapshot Copies (Local), the status will say protected next to .
Beginning with ONTAP 9.14.1, you can modify the protection policy of a consistency group using the CLI.
-
You must be at the admin privilege level to perform this task.
-
In ONTAP 9.14.1, you must be a cluster or SVM administrator to perform this task. Beginning with ONTAP 9.15.1, any user at the admin privilege level can perform this task.
-
Issue the following command to set or modify the protection policy:
If you are modifying the protection policy of a child consistency, you must identify the parent consistency group using the
-parent-consistency-group parent_consistency_group_name
parameter.consistency-group modify -vserver svm_name -consistency-group consistency_group_name -snapshot-policy policy_name
Create an on-demand Snapshot copy
If you need to create a Snapshot copy of your consistency group outside of a normally scheduled policy, you can create one on-demand.
-
Navigate to Storage > Consistency groups.
-
Select the consistency group for which you want to create an on-demand Snapshot copy.
-
Switch to the Snapshot copies tab then select +Add.
-
Provide a Name and a SnapMirror Label. In the dropdown menu for Consistency, select Application consistent or Crash consistent.
-
Select Save.
Beginning with ONTAP 9.14.1, you can create an on-demand Snapshot copy of a consistency group using the CLI.
-
You must be at the admin privilege level to perform this task.
-
In ONTAP 9.14.1, you must be a cluster or SVM administrator to perform this task. Beginning with ONTAP 9.15.1, any user at the admin privilege level can perform this task.
-
Create the Snapshot copy:
By default, the Snapshot type is crash-consistent. You can modify the Snapshot type with the optional
-type
parameter.consistency-group snapshot create -vserver svm_name -consistency-group consistency_group_name -snapshot snapshot_name
Create two-phase consistency group Snapshots
Beginning with ONTAP 9.11.1, consistency groups support two-phase commits for consistency group (CG) Snapshot creation, which execute a precheck before committing the Snapshot copy. This feature is only available with the ONTAP REST API.
Two-phase CG Snapshot creation is only available for Snapshot creation, not provisioning consistency groups or restoring consistency groups.
A two-phase CG Snapshot breaks the Snapshot creation process into two phases:
-
In the first phase, the API executes prechecks and triggers Snapshot creation. The first phase includes includes a timeout parameter, designating the amount of time for the Snapshot copy to commit successfully.
-
If the request in phase one completes successfully, you can invoke the second phase within the designated interval from the first phase, committing the Snapshot copy to the appropriate endpoint.
-
To use two-phase CG Snapshot creation, all nodes in the cluster must be running ONTAP 9.11.1 or later.
-
Only one active invocation of a consistency group Snapshot operation is supported on a consistency group instance at a time, whether it be a one-phase or two-phase. Attempting to invoke a Snapshot operation while another one is in progress results in a failure.
-
When you invoke the Snapshot creation, you can set an optional timeout value of between 5 and 120 seconds. If no timeout value is provided, the operation times out at the default of 7 seconds. In the API, set the timeout value with the
action_timeout
parameter. In the CLI, use the-timeout
flag.
You can complete a two-phase Snapshot with the REST API or, beginning with ONTAP 9.14.1, the ONTAP CLI. This operation is not supported in System Manager.
If you invoke the Snapshot creation with the API, you must commit the Snapshot copy with the API. If you invoke the Snapshot creation with the CLI, you must commit the Snapshot copy with the CLI. Mixing methods is not supported. |
Beginning with ONTAP 9.14.1, you can create a two-phase Snapshot copy using the CLI.
-
You must be at the admin privilege level to perform this task.
-
In ONTAP 9.14.1, you must be a cluster or SVM administrator to perform this task. Beginning with ONTAP 9.15.1, any user at the admin privilege level can perform this task.
-
Initiate the Snapshot:
consistency-group snapshot start -vserver svm_name -consistency-group consistency_group_name -snapshot snapshot_name [-timeout time_in_seconds -write-fence {true|false}]
-
Verify the Snapshot was taken:
consistency-group snapshot show
-
Commit the Snapshot:
consistency-group snapshot commit svm_name -consistency-group consistency_group_name -snapshot snapshot_name
-
Invoke the Snapshot creation. Send a POST request to the consistency group endpoint using the
action=start
parameter.curl -k -X POST 'https://<IP_address>/application/consistency-groups/<cg-uuid>/snapshots?action=start&action_timeout=7' -H "accept: application/hal+json" -H "content-type: application/json" -d ' { "name": "<snapshot_name>", "consistency_type": "crash", "comment": "<comment>", "snapmirror_label": "<SnapMirror_label>" }'
-
If the POST request succeeds, the output includes a Snapshot uuid. Using that uuid, submit a PATCH request to commit the Snapshot copy.
curl -k -X PATCH 'https://<IP_address>/application/consistency-groups/<cg_uuid>/snapshots/<snapshot_id>?action=commit' -H "accept: application/hal+json" -H "content-type: application/json" For more information about the ONTAP REST API, see link:https://docs.netapp.com/us-en/ontap-automation/reference/api_reference.html[API reference^] or the link:https://devnet.netapp.com/restapi.php[ONTAP REST API page^] at the NetApp Developer Network for a complete list of API endpoints.
Set remote protection for a consistency group
Consistency groups offer remote protection through SnapMirror active sync and, beginning with ONTAP 9.13.1, SnapMirror asynchronous.
Configure protection with SnapMirror active sync
You can utilize SnapMirror active sync to ensure Snapshot copies of consistency groups created on your consistency group are copied to the destination. To learn more about SnapMirror active sync or how to configure SnapMirror active sync using the CLI, see Configure protection for business continuity.
-
SnapMirror active sync relationships cannot be established on volumes mounted for NAS access.
-
The policy labels in the source and destination cluster must match.
-
SnapMirror active sync will not replicate Snapshot copies by default unless a rule with a SnapMirror label is added to the predefined
AutomatedFailOver
policy and the Snapshot copies are created with that label.To learn more about this process, refer to Protect with SnapMirror active sync.
-
Cascade deployments are not supported with SnapMirror active sync.
-
Beginning with ONTAP 9.13.1, you can non-disruptively add volumes to a consistency group with an active SnapMirror active sync relationship. Any other changes to a consistency group require you to break the SnapMirror active sync relationship, modify the consistency group, then reestablish and resynchronize the relationship.
To configure SnapMirror active sync with the CLI, see Protect with SnapMirror active sync. |
-
Ensure you have met the prerequisites for using SnapMirror active sync.
-
Select Storage > Consistency groups.
-
Select the consistency group you have created from the Consistency group menu.
-
At the top right of the overview page, select More then Protect.
-
System Manager auto-fills source-side information. Select the appropriate cluster and storage VM for the destination. Select a protection policy. Ensure that Initialize relationship is checked.
-
Select Save.
-
The consistency group needs to initialize and synchronize. Confirm synchronization has completed successfully by returning to the Consistency group menu. The SnapMirror (Remote) status displays
Protected
next to .
Configure SnapMirror asynchronous
Beginning with ONTAP 9.13.1, you can configure SnapMirror asynchronous protection for a single consistency group. Beginning with ONTAP 9.14.1, you can use SnapMirror asynchronous to replicate volume-granular Snapshot copies to the destination cluster using the consistency group relationship.
To replicate volume-granular Snapshot copies, you must be running ONTAP 9.14.1 or later. For MirrorAndVault and Vault policies, the volume-granular Snapshot policy's SnapMirror label must match the consistency group's SnapMirror policy rule. Volume-granular Snapshots abide by the keep value of the consistency group's SnapMirror policy, which is calculated independently of the consistency group Snapshots. For example, if you have a policy to keep two Snapshot copies on the destination, you can have two volume-granular Snapshot copies and two consistency group Snapshot copies.
When resynchronizing the SnapMirror relationship with volume-granular Snapshot copies, you can preserve volume-granular Snapshot copies with the -preserve
flag. Volume-granular Snapshot copies newer than consistency group Snapshot copies are preserved. If there is not a consistency group Snapshot copy, no volume-granular Snapshot copies can be transferred in the resync operation.
-
SnapMirror asynchronous protection is only available for a single consistency group. It is not supported for hierarchical consistency groups. To convert a hierarchical consistency group into a single consistency group, see modify consistency group architecture.
-
The policy labels in the source and destination cluster must match.
-
You can non-disruptively add volumes to a consistency group with an active SnapMirror asynchronous relationship. Any other changes to a consistency group require you to break the SnapMirror relationship, modify the consistency group, then reestablish and resynchronize the relationship.
-
Consistency groups enabled for protection with SnapMirror asynchronous have different limits. For more information, see Consistency group limits.
-
If you have configured an SnapMirror asynchronous protection relationship for multiple individual volumes, you can convert those volumes into a consistency group while retaining the existing Snapshot copies. To convert volumes successfully:
-
There must be a common Snapshot copy of the volumes.
-
You must break the existing SnapMirror relationship, add the volumes to a single consistency group, then resynchronize the relationship using the following workflow.
-
-
From the destination cluster, select Storage > Consistency groups.
-
Select the consistency group you have created from the Consistency group menu.
-
At the top right of the overview page, select More then Protect.
-
System Manager auto-fills source-side information. Select the appropriate cluster and storage VM for the destination. Select a protection policy. Ensure that Initialize relationship is checked.
When selecting an asynchronous policy, you have the option to Override Transfer Schedule.
The minimum supported schedule (recovery point objective, or RPO) for consistency groups with SnapMirror asynchronous is 30 minutes. -
Select Save.
-
The consistency group needs to initialize and synchronize. Confirm synchronization has completed successfully by returning to the Consistency group menu. The SnapMirror (Remote) status displays
Protected
next to .
Configure SVM disaster recovery
Beginning in ONTAP 9.14.1, SVM disaster recovery supports consistency groups, enabling you to mirror consistency group information from the source to the destination cluster.
If you are enabling SVM disaster recovery on an SVM that already contains a consistency group, following the SVM configuration workflows for System Manager or the ONTAP CLI.
If you are adding a consistency group to an SVM that is in an active and healthy SVM disaster recovery relationship, you must update the SVM disaster recovery relationship from the destination cluster. For more information, see Update a replication relationship manually. You must update the relationship any time you expand the consistency group.
-
SVM disaster recovery does not support hierarchical consistency groups.
-
SVM disaster recovery does not support consistency groups protected with SnapMirror asynchronous. You must break the SnapMirror relationship before configuring SVM disaster recovery.
-
Both clusters must be running ONTAP 9.14.1 or later.
-
Fan-out relationships are not supported for SVM disaster recovery configurations that contain consistency groups.
-
For other limits, see consistency group limits.
Visualize relationships
System Manager visualizes LUN maps under the Protection > Relationships menu. When you select a source relationship, System Manager displays a visualization of the source relationships. By selecting a volume, you can delve deeper into these relationships to see a list of the contained LUNs and the initiator group relationships. This information can be downloaded as an Excel workbook from the individual volume view; the download operation runs in the background.