Manage your external replications

This page describes how to manage your external replications.

View external replication details

To monitor the replication status of an external replication, look up the NetApp Volumes replication resource and the SnapMirror status on ONTAP.

A replication's current phase is indicated by its mirrorState:

  • Preparing: the baseline transfer is in progress.

  • Transferring: an incremental transfer is in progress.

  • Mirrored: the replication is idle, waiting for the next hourly incremental transfer to start.

  • Stopped: the user stopped the replication.

  • Externally managed: indicates the destination volume is on the ONTAP side.

When the destination volume is on the ONTAP side, the Externally managed status is applied. Therefore, ONTAP is responsible for managing the replication and NetApp Volumes doesn't have information on whether the replication is Stopped or Mirrored. To determine the actual status, you must check ONTAP directly using the snapmirror show command.

Use the following instructions to view details of an external replication using the Google Cloud CLI or ONTAP CLI:

gcloud

To view details of an external replication on NetApp Volumes:

gcloud netapp volumes replications list --volume=NETAPP_VOLUMES_VOLUME --location=REGION

ONTAP CLI

To view details of an external replication on ONTAP:

ONTAP> snapmirror show -destination-path SVM_NAME:ONTAP_VOLUME_NAME

Stop or pause an external replication

When you stop an external replication, the destination volume becomes read-writable and can be modified. No incremental transfers occur when the replication is stopped, but a stopped replication can be resumed again.

To stop an active data transfer during baseline replication or if an ongoing incremental transfer is blocked, you must perform a forced stop. A forced stop instructs the replication to save a checkpoint. This checkpoint can be used later by the resume operation to continue where it left off.

Use the following instructions to stop or pause an external replication using the Google Cloud CLI:

gcloud

To stop or pause an external replication:

gcloud netapp volumes replications stop REPLICATION_NAME \
 --volume=DESTINATION_VOLUME --location=REGION

If the command returns an error due to baseline or incremental transfer that is in progress, you can add the --force flag to the command to force a stop and create a checkpoint for a later resume operation.

If the destination volume resides on NetApp Volumes, the replication will stop automatically. However, if the destination volume is on ONTAP, you must run a snapmirror break command on the ONTAP system. To determine the correct command for ONTAP, use the following:

gcloud netapp volumes replications list --volume=NETAPP_VOLUMES_VOLUME --location=REGION

Look for the hybridReplicationUserCommands output. After running these ONTAP commands, the replication will be stopped. You can check the status on ONTAP by running:

ONTAP> snapmirror show -destination-path SVM_NAME:ONTAP_VOLUME_NAME

NetApp Volumes can't detect if the command has been run. It will assume the replication is now externally managed, which is indicated by mirrorState as Externally managed.

Resume an external replication

When you resume a stopped external replication, the destination volume reverts to the latest common checkpoint or snapshot with the source volume. Incremental transfers then start from this point. This action undoes any changes made to the destination volume's content, so make sure this is your required outcome. Destination volume settings such as size, protocol settings, and policies won't be synchronized with the source volume.

Use the following instructions to resume an external replication using the Google Cloud CLI:

gcloud

To resume an external replication:

gcloud netapp volumes replications resume REPLICATION_NAME \
 --volume=DESTINATION_VOLUME --location=REGION

If the destination volume is hosted on NetApp Volumes, the replication will resume automatically. However, if the destination is on ONTAP, you must run a snapmirror resync command on the ONTAP system:

ONTAP> snapmirror resync -destination-path SVM_NAME:ONTAP_VOLUME_NAME

Check the status of the mirror on ONTAP:

ONTAP> snapmirror show -destination-path SVM_NAME:ONTAP_VOLUME_NAME

Reverse and resume an external replication

The direction of the external replication can be reversed, making the current destination volume the new source volume and the other way around. The new destination volume will revert to its most recent common checkpoint or snapshot, and incremental transfers will start from that point. Make sure that this action will undo all changes made to the content on the new destination volume. The destination volume settings such as size, protocol configurations, and policies won't be synchronized with the new source volume.

Before reversing a replication, it must be stopped.

The direction reversal must be initiated on the NetApp Volumes volume.

Use the following instructions to reverse an external replication using the Google Cloud CLI:

gcloud

To reverse an external replication:

gcloud netapp volumes replications reverse REPLICATION_NAME \
 --volume=NETAPP_VOLUMES_VOLUME --location=REGION

If NetApp Volumes becomes the new destination, the replication reverses automatically. However, if ONTAP is the new destination, you must run a snapmirror resync command on the ONTAP system. You can determine the correct command for ONTAP by using:

gcloud netapp volumes replications list --volume=NETAPP_VOLUMES_VOLUME --location=REGION

Look for the hybridReplicationUserCommands section in the output. If you don't run the ONTAP commands within 120 minutes, the replication will revert to its previous state.

Example commands you might expect:

job schedule cron create -name replication-yyy -hour all -minute 0
snapmirror resync -destination-path svm_src:sourcevol -source-path svm_dst:vol_dst
snapmirror modify -destination-path svm_src:sourcevol -source-path svm_dst:vol_dst -schedule replication-yyy

Sync an external replication

The sync operation lets you run a manual, unscheduled, and incremental transfer on a replication that is in a mirrored transfer state. This operation lets you send the latest changes from the source to the destination before stopping a replication and moving clients to the destination volume.

The service lets you run up to a maximum of five sync operations per volume per day.

Use the following instructions to sync an external replication using the Google Cloud CLI:

gcloud

To sync an external replication:

gcloud netapp volumes replications sync REPLICATION_NAME \
 --volume=DESTINATION_VOLUME --location=REGION

Delete an external replication

The external replication deletion includes the following steps:

  1. Make sure the replication status is Stopped.

  2. Delete the replication.

  3. Consider deleting the cluster peering to NetApp Volumes on your external ONTAP cluster using the cluster peer delete command, but only if this was the last replication from the external ONTAP cluster.

  4. If any additional networking was configured for the replication, you can remove it once the replication is complete.

Use the following instructions to delete an external replication using the Google Cloud CLI:

gcloud

To delete an external replication, first check if an outdated SnapMirror connection is configured on the ONTAP side:

ONTAP> snapmirror show -destination-path SVM_NAME:ONTAP_VOLUME_NAME

You should either see no SnapMirror connection or one with mirrorState as Broken-off. If a connection is in the Broken-off state, proceed to delete it:

ONTAP> snapmirror delete -destination-path SVM_NAME:ONTAP_VOLUME_NAME

Next, delete the replication within NetApp Volumes:

gcloud netapp volumes replications delete REPLICATION_NAME \
 --volume=DESTINATION_VOLUME --location=REGION

What's next

Change volume settings during external replication.