Implement OCI Block Volumes Replication
This implementation uses the OCI Block Volumes cross-region replication feature to replicate the block volumes.
The following are advantages of implementing OCI Block Volumes replication:
- There is no need to create and run scripts periodically, as in other replication cases. Once you set up the replication, it is performed automatically by Oracle Cloud Infrastructure.
- It is a general-purpose solution applicable to any block volume of any compute instance (except for the boot volumes). If you have multiple systems, then you can use the same approach in all of them.
- The information on the replicated block volumes is an exact copy of the primary block volumes; all the files in the block volume are replicated.
Consider the following before using OCI Block Volumes replication:
- It requires steps to mount the replicated block volumes in the secondary system. You can’t directly mount the replica of the block volumes; you first have to activate them to create cloned block volumes, which can be mounted. This is not complex in systems with few nodes, but the complexity increases when there are many nodes. And especially in systems that don’t have the same node distribution in the availability domains of the primary and standby.
However, you can overcome this complexity using the Oracle Cloud Infrastructure Full Stack Disaster Recovery service to automate these steps in the switchover, failover, and validation operations.
- This technology may not be enough for many systems. If the system has more types of storage (for example, shared OCI File Storage file systems), then you'll need to use a different replica technology for them.
Set Up Replication for OCI Block Volumes
To implement OCI Block Volumes replication, the following steps are required:
- Use the OCI Console to define the Volume Groups in the primary region, grouping the block volumes that you need to replicate.
A volume group can contain only block volumes that are in the same availability domain (AD), and all the block volumes in the group are replicated to one destination AD only. If your block volumes are located in more than one AD, then create a Block Volume Group for each combination of source and destination ADs.
- Enable the replica in the Volume Groups to the appropriate ADs of the secondary region.
- Connect to the mid-tier hosts in the secondary system and unmount the block volumes that will be replicated from primary.
- Use the OCI Console to detach and discard all the block volumes that will be replicated from the primary system. They will no longer be used.
- Implement a way to manage the site-specific information that resides in the block volumes by updating it with the appropriate information after the replica.
This implementation applies to any block volume except boot volumes. Boot volume replication has other implications and is out of the scope of this implementation.
Example 1: Use OCI Block Volumes replication to replicate the mid-tier configuration block volume
Note:
This example applies to any mid-tier system. As a reference, it explains how to replicate the block volumes that contain the Oracle WebLogic configuration of a Oracle WebLogic Server for OCI stack. But you can follow the same steps to replicate other block volumes in a mid-tier system, except for the boot volumes.The following image is an example of an Oracle WebLogic Server system with OCI Block Volumes cross-region replica.
wls-bv-cross-replica-oracle.zip
To set up the cross-region replica for the block volumes, follow these steps:
Validate Replication for OCI Block Volumes
In a switchover or failover operation, the replicated information must be available and usable in the standby site before the processes are started. This is also required when you validate the secondary system (by opening the standby database in snapshot mode).
The image shows how activation creates attachable OCI Block Volumes from the replicas.
activation-create-bv-oracle.zip
Perform the following to make the replicated volumes available and usable in the standby system:
Perform Ongoing Replication for OCI Block Volumes
Follow these recommendations for the ongoing replication when using this implementation:
- OCI automatically performs OCI Block Volumes replication in the background. The only thing you need to do during the lifecycle of the system is ensure that the Volume Groups of the system with the primary role have the cross-region replica enabled.
- Consider using OCI Full Stack Disaster Recovery to automate the switchover and failover tasks. It provides the ability to run a switchover or failover plan with just one click using the OCI Console. It is very useful to simplify the execution of all the tasks related to Block Volume replica.
- The replication feature is complementary to the backup feature, not a replacement. Make sure you enable a backup policy for the block volumes that you replicate. This will provide data protection in addition to the cross-region replica, allowing you to restore to a point-in-time.
- Maintain the information that is specific to each site and keep it up-to-date. For example, if the file system contains a folder with the artifacts to connect to an Oracle Autonomous Database, maintain a backup copy of this folder. Ensure that you update the backup of the folder when you perform an update in the wallet. This way, it will be correctly restored in subsequent switchover and failovers.
- After a switchover or a failover operation, change the replica direction. For this:
- Enable the replica in the OCI Block Volumes groups of the new primary to the new standby site.
- Disable the previous replication from the original primary and delete the unused block volumes.

