Using volume replication to protect your data

The volume replication feature provides data protection through cross-region volume replication for volumes created by Cloud Volumes Service. You can asynchronously replicate data from a cloud volume (source) in one region to another cloud volume (destination) in another region. This capability enables you to use the other cloud volume for critical application activity in case of a region-wide outage or disaster.

Service level objectives for volume replication

Volume replication is currently offered as a beta feature. Therefore, you must not use this feature in conjunction with production workloads. During beta availability, NetApp and Google are committed to help you to explore the feature and get your feedback. Issues that arise during the use of the feature will be handled with a service level objective of two business days from the time it is reported to Google or NetApp.

Requirements and considerations for volume replication

Before using this beta feature, you must be aware of the following requirements and considerations:

  • You must have an active Google Cloud account in good standing.
  • Volume replication is only supported between specifically paired regions. These region pairs are currently supported:
    • europe-west3 and europe-west2
    • europe-west3 and europe-west4
    • us-east4 and us-central1
    • us-east4 and us-west2
    • us-west2 and us-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.
  • Volume replication does not support cascading and fan in/out topologies.
  • Configuring volume replication for source volumes created from a snapshot is not supported.

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 enables you to 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 set the desired settings when creating the destination volume.

  1. In the Cloud Console, go to the Volumes page.

    Go to the Volumes page

  2. Click Create.

  3. On the Create File System page, complete the following fields:

    1. Name: Enter a display name for the volume.

      To help you to identify the volume quickly, use a name that indicates that this is a destination volume for a volume replication relationship.

    2. Service Type: Select CVS-Performance. Volume replication is only supported for volumes of the CVS-Performance service type.

    3. Storage: Select Secondary. This specifies that the volume is only for use with volume replication as a destination volume.

    4. Region: Select a Google Cloud region for your volume. The region must be paired to the region where the source volume is located.

    5. Volume Path: This value must be unique across all of your cloud volumes in a project. The system automatically generates a recommended volume path.

    6. 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.

    7. 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.

    8. Protocol Type: Select the NFS protocol to use: NVSv3, NFSv4.1, or both (NFSv3/NFSv4.1). Only NFS is supported at this time. The protocol type for the destination volume must match the protocol type of the source volume.

    9. Shared VPC configuration: Leave this checkbox unselected.

    10. Authorized Network: Select the VPC network name from which the volume will be accessible in the event of an outage of the source region.

      Optionally, you can specify your custom CIDR range by selecting Use Custom Address Range and entering a CIDR range in the Reserved Address Range in CIDR Format field.

  4. To manage export policy rules for the destination volume, expand the Show Export Policy section and do the following:

    1. Click Add Rule to define the allowed clients and their access type.
    2. In the Allowed clients field, enter the IP address or range of addresses that are allowed to connect to the cloud volume.
    3. To select the type of access these IP addresses have to the cloud volume, select either Read & Write or Read Only.
    4. 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.

  5. 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.

  1. In the Cloud Console, go to the Volume Replication page.

  2. Click Create.

  3. On the Create Volume Replication page, complete the following fields:

    1. Replication Name: Enter a display name for the volume replication relationship. The name must be unique across volume relationships in your project.

    2. Source Region: Select the region where the source volume is located.

    3. Source Volume: Enter the name of the source volume to use in the volume replication relationship.

    4. Destination Region: This field updates to reflect applicable regions, based on the region pair associated with the source region.

    5. Destination Volume: Enter the name of the destination volume.

    6. 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 monthly 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
      Weekly :15 after midnight each Sunday
      Monthly :20 after midnight each 1st day of a month

      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.

  4. 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.

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. 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:

  1. In the Cloud Console, go to the Volume Replication page.

  2. Select the volume replication relationship to edit.

  3. Click Show More , and select Edit.

  4. On the Edit Volume Replication page, edit the volume replication relationship name or schedule.

  5. 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 allows you to mount the destination volume as a read/write volume.

To break a volume replication relationship, do the following:

  1. In the Cloud Console, go to the Volume Replication page.

  2. Select the volume replication relationship to break.

  3. 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.
  4. Click Show More , 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.

  5. In the Break Volume Replication dialog, confirm the break operation by entering the volume replication name in the field.

  6. 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.

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.

  1. In the Cloud Console, go to the Volume Replication page.

  2. Select the volume replication relationship to resync.

  3. Check the following fields:

    • Ensure that Mirror State shows Broken. Do not attempt to resync a volume replication if Mirror State shows Uninitialized or Mirrored.
    • Ensure that Relationship Status shows Idle. Do not attempt to resync a volume replication if Relationship Status shows Transferring.
  4. Click Show More , and select Resync.

  5. In the Resync Volume Replication dialog, confirm the resync action by entering the volume replication name in the field.

  6. 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.

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.

  1. In the Cloud Console, go to the Volume Replication page.
  2. Select the volume replication relationship to reverse sync.
  3. Ensure that Mirror State is Broken. Do not attempt to reverse sync a volume replication if Mirror State is Uninitialized or Mirrored.
  4. Ensure that Relationship Status is Idle. Do not attempt to reverse sync a volume replication if Relationship Status is Transferring.
  5. Click Show More and select Reverse Sync.
  6. In the Reverse Sync Volume Replication dialog, enter the volume replication relationship name to confirm the reverse sync action.
  7. 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:

  1. In the Cloud Console, go to the Volume Replication page.
  2. Review the state of the reverse replication relationship:
    • Ensure that Mirror State is Mirrored.
    • Ensure that Relationship Status is Idle.
  3. Click Show More for the reverse replication relationship, and select Break.
  4. Enter the volume replication relationship name to confirm the break action.

    The Mirror State changes to Broken.

  5. Click Show More for the original replication relationship, and select Resync.

  6. 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.

  1. In the Cloud Console, go to the Volume Replication page.

  2. Select the volume replication relationship to delete.

  3. Check the following fields:

    • Ensure that Mirror State shows Broken. Do not attempt to delete a volume replication relationship if Mirror State shows Uninitialized or Mirrored.
    • Ensure that Relationship Status shows Idle. Do not attempt to delete a volume replication if Relationship Status shows Transferring.
  4. Click Delete.

  5. In the Delete Volume Replication dialog, confirm the deletion by entering the volume replication name in the field.

  6. Click Confirm to initiate the deletion.

When the deletion has completed, the source and destination volumes are independent read/write volumes.