Enabling Cross-Region Replication When Updating an Existing Block Volume

Learn how to enable cross-region replication for an existing block volume

  • Use the steps described in this procedure to enable replication on an existing volume. You can also enable replication when you create a volume, see Creating a Block Volume.

    1. On the Block Volumes list page, select the volume you want enable cross-region replication for. If you need help finding the list page, see Listing Volumes.
    2. On the details page, select Edit.
    3. In the Cross/ad region replication section, move the Enable cross ad/region replication slider to the right to enable cross-region replication.
    4. Select the target region for the replica.
    5. Select the availability domain for the replica.
    6. Enter a name for the replica.
    7. Select Confirm to acknowledge the cost warning.
    8. Optionally, encrypt the volume replica in the destination region by using your own Vault encryption key. In the Cross ad/region replica encryption section, select Encrypt using customer-managed keys , and then specify the OCID for a valid encryption key in the region you selected to replicate the volume to. For more information, see Customer-Managed Encryption Keys for Cross-Region Operations.

    9. Select Save changes.

  • Use the oci bv volume update command and specify the --volume-id, "displayName", "availabilityDomain" and "xrrKmsKeyId"parameters to enable cross-region replication when updating an existing block volume:

    oci bv volume update --volume-id <volume_ID> --block-volume-replicas '[{"displayName":"<display_name>","availabilityDomain":"<availability-domain_ID>","xrrKmsKeyId" : "<kms_key_ID>"}]' 

    For example:

    oci bv volume update --volume-id ocid1.volume.oc1.phx.<unique_ID> --block-volume-replicas '[{"displayName":"Sample_Replica","availabilityDomain":"pjBI:US-ASHBURN-AD-1","xrrKmsKeyId" : "ocid1.key.oc1.iad-ad-1.<unique_ID>"}]'

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the UpdateVolume operation and specify the blockVolumeReplicas attribute in the UpdateVolumeDetails resource to enable cross-region replication for an existing block volume.