The volume replication feature provides data protection through cross-region volume replication for volumes created by Cloud Volumes Service. You can asynchronously replicate a cloud volume, or source, in one region to another cloud volume, or destination, in another region. This capability lets you use the other cloud volume for critical application activity in case of a region-wide outage or disaster.
During volume replication, all source volume content is replicated to the destination volume using a process called baseline transfer. The baseline transfer takes a snapshot on the source system and transfers its contents to the destination. After the baseline transfer completes, the replication mirror status changes to mirrored. As a result, the destination volume becomes read-only and reflects the contents of the source volume's snapshot.
After the baseline transfer is complete, the scheduled replication interval proceeds incrementally. First, a new snapshot is created on the source. Then, the data that has changed between the new and the previous snapshots is calculated. Finally, these changes are transferred to the destination volume. During this process, the replication status appears as transferring in the user interface. After all the changes are transferred, the destination volume's content transitions from the old snapshot to the new snapshot and the replication status appears as Idle.
A replication relationship between source and destination volume can break in some cases, such as a disaster in the source region, making the destination volume read-write. After a replication relationship breaks, both volumes continue to share the latest replication snapshot as a new baseline for later resynchronization.
A broken replication relationship can be resynced again. Resyncing a replication relationship reverts the destination volume back to the latest baseline replication snapshot, at which point, the volume replication starts over.
After initializing a replication relationship and breaking the relationship, you can swap source and destination volume roles to reverse the direction of the replication.
You can only delete replication relationships with a broken status. When you delete replication relationships, the baseline replication snapshots are removed. Setting up a new replication relationship between the same volumes requires a new baseline transfer.
Requirements and considerations for volume replication
Before you use this feature, be aware of the following requirements and considerations:
Volume replication is only supported between specifically paired regions. These region pairs are supported:
europe-west3
andeurope-west2
europe-west3
andeurope-west4
europe-west2
andeurope-west4
europe-southwest1
andeurope-west3
us-east4
andus-central1
us-east4
andus-west2
us-west2
andus-central1
us-west3
andus-central1
us-west4
andus-central1
us-west4
andus-west2
us-west4
andus-west3
northamerica-northeast1
andnorthamerica-northeast2
northamerica-northeast1
andus-central1
Volume replication is only supported for volumes of the CVS-Performance service type. Volume replication is not supported for volumes of the CVS service type.
Volume replication is supported for NFSv3, NFSv4.1, and SMB volumes.
Volume replication supports up to 5 replication relationships per project in both the source and destination regions. If you want to increase your number of replication relationships, contact Cloud Customer Care. For more information, see Obtaining support for NetApp Cloud Volumes Service.
Volume replication does not support cascading and fan in and out topologies.
Configuring volume replication for source volumes created from a snapshot is not supported.
Both the source volume and the destination volume must be managed by the same project.
Volume replication automatically adjusts the size of the destination volume to the size of the source volume while the replication relationship exists.
Source and destination volumes can use different service levels.
Volume replication creates a mirror of the source volume. All user data and snapshots are mirrored to the destination volume.
Deploy volume replication relationships
You set up volume replication by creating a volume replication relationship between a source volume and a destination volume. The volume replication relationship establishes a peering that lets you asynchronously replicate data from a cloud volume (source) to another cloud volume (destination). The source volume and the destination volume must be deployed in separate regions according to the region pairs specified in Requirements and considerations.
Permissions for volume replication
To configure volume replication, you must have project user access with the
netappcloudvolumes.admin
role. For more information, see
Permissions for Cloud Volumes Service.
Configure the destination volume
Before creating a volume replication relationship, you must create a destination volume (a secondary volume). The destination volume must be in a region that's paired with the region where the source volume resides.
After you create the destination volume, you can't edit it to adjust settings such as export policy or service tier. Be sure to correctly enable settings when creating the destination volume.
In the Google Cloud console, go to the Volumes page.
Click Create.
On the Create File System page, complete the following fields:
Service Type: Select CVS-Performance. Volume replication is only supported for volumes of the CVS-Performance service type.
Volume Replication: Select Secondary. This specifies that the volume is only for use with volume replication as a destination volume.
Region: Select a Google Cloud region for your volume. The region must be paired to the region where the source volume is located.
Service Level: Select the level of performance for the volume. The service level for the destination volume doesn't need to be the same as the service level for your source volume.
Snapshot to create Volume from: Leave empty.
Name: Enter a display name for the volume. To help identify the volume quickly, use a name that indicates that this is a destination volume for a volume replication relationship.
Volume Path: This value must be unique across all cloud volumes in your project's region. The system automatically generates a recommended volume path. For failover purposes, we recommend using the same volume path as the source volume.
Allocated Capacity: Set the cloud volume size. The volume size for the destination volume must be at least as great as the allocated capacity of the source volume. After the replication is established, the size of the destination volume is set to and synchronized with the size of the source volume.
Protocol Type: Select the protocol to use. The protocol type for the destination volume must match the protocol type of the source volume.
Configuration for selected Protocol type: Select from the available configuration options. The configuration options depend on the protocol type you select.
Billing Label: Optional. You can add labels to your volumes for billing reports and queries.
Shared VPC configuration: Select if you are running a Shared VPC network.
VPC Network Name: Select the VPC network name from which the volume will be accessible in the event of an outage of the source region.
To manage export policy rules for the destination volume, expand the Show Export Policy section and do the following:
- Click Add Rule to define the allowed clients and their access type.
- In the Allowed clients field, enter a comma-separated list of IPv4 CIDR ranges or IPv4 host addresses that are allowed to connect to the volume. The maximum length of the list of IPv4 CIDR ranges or IPv4 host addresses is 4,096 characters.
- To select the type of access these IP addresses have to the cloud volume, select either Read & Write or Read Only.
Select the NFS version for which you want to give access. You can add more rules as needed.
The protocol type allowed for the export must match the protocol type of the volume. A warning appears if the protocol type that you select to allow for export doesn't match the protocol type selected for the volume.
Click Save to create the volume.
The new volume appears in the Volumes list.
Create volume replication relationships
You can use the Volume Replication page to create and manage volume replication relationships for your cloud volumes.
In the Google Cloud console, go to the Volume Replication page.
Click Create.
On the Create Volume Replication page, complete the following fields:
Replication Name: Enter a display name for the volume replication relationship. The name must be unique across volume relationships in your project.
Source Region: Select the region where the source volume is located.
Source Volume: Enter the name of the source volume to use in the volume replication relationship.
Destination Region: This field updates to reflect applicable regions, based on the region pair associated with the source region.
Destination Volume: Enter the name of the destination volume.
Replication Schedule: Select the replication frequency that you want to use for the volume replication. Replication can be configured to run from every 10 minutes up to a daily frequency. Times are in the UTC time zone. The schedule runs based on the following times for each schedule type:
Replication Schedule Frequency Time of scheduled operation Every 10 Minutes :00, :10, :20, :30, :40, :50 Hourly :05 after the top of each hour Daily :10 after midnight each day The replication schedule attempts to run the replication at the designated interval. If a previous replication is still in progress, the replication for the current cycle is skipped and checked again at the next interval. This behavior is most common during the initial replication, which transfers the baseline volume blocks and takes the longest time to replicate.
Click Create to establish the replication schedule and perform the initial replication.
The initial replication can take several hours, depending on the size of the volume being replicated. After the initial replication is complete, only changed blocks are replicated to the destination volume in subsequent replications.
After this process is complete, the destination volume is in a replicated state and can be mounted for read-only operations.
Changing the size of the source volume automatically sets the destination volume to the same size. Changing the destination volume size is disabled while the volumes are in the mirrored state.
Display health status of replication relationships
You can view replication status on the Volume Replication page. The source and destination regions and the associated volumes in the volume replication relationship are shown in the table.
The Health field represents whether the volume replication relationship is correctly configured and is properly operating. If the volume replication relationship becomes unhealthy, this field updates to indicate unhealthy status.
The status of the volume replication relationship is shown in the Mirror State and Replication Status fields:
Mirror State | Replication Status | Overall State |
---|---|---|
Uninitialized | Idle | The volume replication relationship has been created, and the initial replication operation has not yet begun. |
Uninitialized | Transferring | The volume replication relationship has been created, and the initial replication operation is in progress. |
Mirrored | Idle | The volume replication relationship was created, and the volume replication operation has completed. |
Mirrored | Transferring | The volume replication relationship was created, and an incremental replication operation is in progress. |
Broken | Idle | The volume replication relationship has been severed (such as for a disaster of the source region), allowing the destination volume to become read/write. The size of the destination volume can be set independently of the source volume. This state is also required if you want to permanently delete a volume replication relationship. |
Edit volume replication relationships
You can edit the volume replication relationship name and the replication schedule.
To edit a volume replication relationship, do the following:
In the Google Cloud console, go to the Volume Replication page.
Select the volume replication relationship to edit.
Click Show More more_vert, and select Edit.
On the Edit Volume Replication page, edit the volume replication relationship name or schedule.
Click Save.
Break volume replication relationships
When you need to activate the destination volume (for example, when you want to transfer activity to the destination region or use the destination volume for read and write testing of a workload), you need to break the volume replication, which lets you mount the destination volume as a read and write volume.
To break a volume replication relationship, do the following:
In the Google Cloud console, go to the Volume Replication page.
Select the volume replication relationship to break.
Check the following fields:
- Ensure that Mirror State shows Mirrored. Do not attempt to break the volume replication relationship if Mirror State shows Uninitialized.
- Ensure that Relationship Status shows Idle. Do not attempt to break the volume replication relationship if Relationship Status shows Transferring.
Click Show More more_vert, and select Break.
If the relationship is currently transferring data and you need to break it immediately, select the Force Break action from the Show More menu. This stops data transfer and breaks the volume replication relationship. The destination volume reflects the state as of the last successful replication.
In the Break Volume Replication dialog, confirm the break operation by entering the volume replication name in the field.
Click Confirm to initiate the break operation. The volume relationship mirror state updates to reflect the broken status.
The destination volume becomes read/write and is transitioned to a primary volume. Mount the destination volume by following the steps in Mounting NFS exports to Compute Engine instances. When the volume replication relationship is broken, the size of the destination can change independently from the size of the source volume.
Resync volume replication relationships
In certain non-disaster use cases, such as for development and testing purposes of a workload in the destination region, you may want to restore the volume replication relationship with the original source volume. This scenario can occur when the source and destination volumes are healthy, and the volume relationship Mirror State value is Broken. You can use a resync operation to revert any changes that you have made to the destination volume and re-establish the volume replication relationship of the source volume to the destination volume.
In the Google Cloud console, go to the Volume Replication page.
Select the volume replication relationship to resync.
Check the following fields:
- Ensure that Mirror State shows Broken. Don't attempt to resync a volume replication if Mirror State shows Uninitialized or Mirrored.
- Ensure that Relationship Status shows Idle. Don't attempt to resync a volume replication if Relationship Status shows Transferring.
Click Show More more_vert, and select Resync.
In the Resync Volume Replication dialog, confirm the resync action by entering the volume replication name in the field.
Click Confirm to initiate the resync operation. Upon completion, the volume replication Mirror State returns to Mirrored.
The destination volume reverts back to the prior replication state, and is no longer a read/write volume. The size of the destination volume is automatically synchronized with the size of the source volume.
Reverse sync volume replication relationships
After you break a replication relationship and make changes to the destination volume, you can replicate those changes back to the source volume. This process is common in a disaster recovery scenario in which you operate on the secondary (disaster recovery) volume for a while and then resume operation on the primary (production) volume. A reverse sync replicates the data from the current destination volume to the source volume, overwriting existing data. Replication is enabled using the previously configured schedule. The current destination volume becomes the source volume, and the current source volume becomes the destination volume.
- In the Google Cloud console, go to the Volume Replication page.
- Select the volume replication relationship to reverse sync.
- Ensure that Mirror State is Broken. Don't attempt to reverse sync a volume replication if Mirror State is Uninitialized or Mirrored.
- Ensure that Relationship Status is Idle. Don't attempt to reverse sync a volume replication if Relationship Status is Transferring.
- Click Show More and select Reverse Sync.
- In the Reverse Sync Volume Replication dialog, enter the volume replication relationship name to confirm the reverse sync action.
- To initiate the reverse sync operation, click Confirm.
When the reverse sync volume replication is complete, a new volume replication relationship is listed in addition to the original relationship, and you have an active replication relationship in the reverse direction.
Perform a full recovery to the original replication direction
If you want to perform a full recovery to the original replication direction, you can break the reverse sync replication relationship and resync the original replication relationship:
- In the Google Cloud console, go to the Volume Replication page.
- Review the state of the reverse replication relationship:
- Ensure that Mirror State is Mirrored.
- Ensure that Relationship Status is Idle.
- Click Show More for the reverse replication relationship, and select Break.
Enter the volume replication relationship name to confirm the break action.
The Mirror State changes to Broken.
Click Show More
for the original replication relationship, and select Resync.Enter the volume replication relationship name in the field to confirm the resync action.
When the resync operation is complete, the original replication relationship is actively mirrored. You can delete the reverse replication relationship if you no longer need it.
Volume replication uses the existing volume data to efficiently establish these relationships by sending only changed data, avoiding the need for a full volume replication in most cases.
Delete volume replication relationships
You can end the volume replication relationship between the source and destination volumes by deleting the volume replication relationship. The deletion doesn't remove the source or the destination volume. Each volume becomes an independent read/write volume at the end of the operation. Use this operation if you no longer need to have a replication copy of the source volume in the destination region. It isn't possible to resync the replication relationship after it has been deleted.
In the Google Cloud console, go to the Volume Replication page.
Select the volume replication relationship to delete.
Check the following fields:
- Ensure that Mirror State shows Broken. Don't attempt to delete a volume replication relationship if Mirror State shows Uninitialized or Mirrored.
- Ensure that Relationship Status shows Idle. Don't attempt to delete a volume replication if Relationship Status shows Transferring.
Click Delete.
In the Delete Volume Replication dialog, confirm the deletion by entering the volume replication name in the field.
Click Confirm to initiate the deletion.
When the deletion has completed, the source and destination volumes are independent read/write volumes.