Note:
- This tutorial requires access to Oracle Cloud. To sign up for a free account, see Get started with Oracle Cloud Infrastructure Free Tier.
- It uses example values for Oracle Cloud Infrastructure credentials, tenancy, and compartments. When completing your lab, substitute these values with ones specific to your cloud environment.
Use OCI Full Stack DR to Attach or Detach a Non-Moving Compute Block Volumes with DR Drill Plans
Introduction
Oracle Cloud Infrastructure Full Stack Disaster Recovery (OCI Full Stack DR) provides a fully automated and comprehensive disaster recovery orchestration solution for all the layers of a full-stack cloud application, including infrastructure, database, and the application middle tier. Using Full Stack DR, you can recover your full stack applications across Oracle Cloud Infrastructure (OCI) regions or availability domains within the same region.
OCI Full Stack Disaster Recovery offers exceptional flexibility. It allows you to utilize user-defined groups within the Disaster Recovery (DR) plan, enabling the management of customized steps as part of the overall DR plan. Once OCI Full Stack Disaster Recovery establishes the initial DR plan with built-in plan groups and steps, you can incorporate additional user-defined plan groups and steps. You can invoke scripts and OCI Functions with an user-defined plan group.
For warm standby or active-passive topology, earlier administrators could use user-defined plan groups and scripts to handle cross region replicated block volumes in the DR region and unmount/mount as well as detach/attach the block volumes to the compute instances. With the new enhancement in OCI Full stack DR, users can specify block volumes that need to be detached or attached while adding the non-moving instances in the DR protection group. OCI Full Stack DR will then automatically generate plan groups and steps during the DR plan creation.
OCI Full Stack DR’s, two DR drill plan types gives users the flexibility to validate recovery for an entire application stack and power to perform a complete dry run of your failover plan at the click of a button.
In this tutorial, we will discuss how to use OCI Full Stack DR non-moving compute block volume enhancements with DR drill plans.
DR Drill Plan: A type of DR plan that creates a replica of the production application stack in the standby region without disrupting their production stack. There are two types of DR drill plans:
Start DR Drill Plan: Generates a plan similar to a failover since the steps performed during a drill are only executed in the standby region.
Stop DR Drill Plan: Generates a plan that tears down whatever the start DR plan created at the standby region.
Deployment Architecture
Note:
In this tutorial, primary region is Frankfurt and standby region is London.
You can use administrator or equivalent privileges to perform OCI Full Stack DR operations.
Objectives
- Attach and detach a block volume for a non-moving instance between two OCI regions and invoke DR drill plans.
The following tasks will be covered in the tutorial:
- Create volume groups with cross region replication for the block volume in primary region
- Create and associate DR Protection Groups in primary and standby regions
- Add and update members in primary DR Protection Group
- Add and update members in standby DR Protection Group
- Create Start drill plan in standby region
- Execute prechecks and run Start drill plan
- Create Stop drill plan in standby region
- Execute prechecks and run Stop drill plan
Prerequisites
-
Administrator privileges or configure the required Oracle Cloud Infrastructure Identity and Access Management (OCI IAM) policies for OCI Full Stack DR. For more information, see Configuring Identity and Access Management (IAM) policies to use OCI Full Stack Disaster Recovery and Policies for OCI Full Stack Disaster Recovery.
-
You need to enable Compute Instance Run Command plugin in both primary and standby as OCI Full Stack DR will execute
sudo
commands to mount and unmount commands during switchover. For more information about run commands on OCI Compute instance, see Running Commands on OCI Compute instance. -
Use run command with OCI Full Stack DR. For more information, see Invoke custom scripts using the run command with Oracle Cloud Infrastructure Full Stack Disaster Recovery.
-
Update
/etc/fstab
with the block volume details for the non-moving compute instances in both the primary and standby regions. For more information, see fstab Options for Block Volumes Using Consistent Device Paths. -
Create OCI Object Storage buckets in the primary region and standby region to store DR operation logs. For more information, see Object Storage
Implementation
For this tutorial, we have already created the following resources.
Resources | Primary Region - Frankfurt |
---|---|
Object Storage Bucket | FSDR_storage_primary |
Compartment | vasudeva.manikandan |
Compute VM | vasu-pub-inst |
Block Volume | vasu-inst-blkvolume |
Mount point | /u01 |
Resources | Standby Region - London |
---|---|
Object Storage Bucket | FSDR_storage_secondary |
Compartment | vasudeva.manikandan |
Compute VM | vasu-volgrp-poc |
Task 1: Create Volume Groups with Cross Region Replication for the Block Volume in Primary Region
-
Log in to the OCI Console using the OCI Full Stack DR administrator user or user with required privileges.
-
In the primary region (Frankfurt), click the Hamburger menu and go to Storage, Disaster Recovery, Volume Groups, and then click Create volume group.
-
Add block volume of the compute
vasu-pub-inst
. -
Enable cross region replication from Frankfurt to London.
-
Leave Backup policy as None, click Next and review the summary.
Task 2: Create and Associate DR Protection Groups in Primary and Standby Regions
-
Go to the OCI Console, in the primary region (Frankfurt) from the Hamburger menu and navigate to Migration & Disaster Recovery, Disaster Recovery, Disaster Recovery Protection Groups, and then click Create Disaster Recovery Protection Group.
-
In the standby region (London) from the Hamburger menu, go to Migration & Disaster Recovery, Disaster Recovery, Disaster Recovery Protection Groups and click Create Disaster Recovery Protection Group.
-
In the primary region (Frankfurt), enter the following information and click Associate.
- Name of the DR Protection Group (DRPG):
fsdr-volgrp-poc-ff
. - Role:
Primary
. - Peer Region:
London
. - Peer Disaster Recovery Protection Group:
fsdr-volgrp-poc-uk
.
- Name of the DR Protection Group (DRPG):
Note: Verify the role of the
fsdr-volgrp-poc-ff
as primary andfsdr-volgrp-poc-uk
as standby.
Task 3: Add and Update members in Primary DR Protection Group
-
In primary region (Frankfurt), select the
fsdr-volgrp-poc-ff
DRPG and click Members and Add Members to add volume group and non-moving virtual machine (VM).Note: Ensure you choose compute instance type as non-moving instance while adding VM as a member.
-
Under Members, click the ellipsis icon for the compute instances and click Edit.
-
Click Show advanced options, select Block volumes, enter the following information, and then click Save changes.
- Source block volume:
vasu-inst-blkvolume
. - Volume attachment reference instance: Volume attachment reference as block volume group that created in Task 1. In this tutorial, it is
vasu-volgrp-poc
. - Mount point: Mount point that you have created and attached to the source VM in primary. In this tutorial, it is
/u01
.
Note: If you do not mention the mount point, during drill or switchover, OCI Full Stack DR will attach the block volume to the target standby VM in OCI Console. You need to manually run the mount commands in the VM to make it available.
- Source block volume:
-
Login to the primary region VM vasu-pub-inst and ensure
/etc/fstab
entries are updated with block volume and mount point details as shown in the following image.
Task 4: Add and Update members in Standby DR Protection Group
-
In standby region (London), select the
fsdr-volgrp-poc-uk
DRPG and click Members and Add Members to add non-moving VM.Note: Ensure you choose compute instance type as non-moving instance while adding VM as a member.
-
Under Members, click ellipsis icon of compute instance
vasu-volgrp-poc
and click Edit. -
Click Show Advanced Options, select Block Volume and enter the following information, and then click Save changes.
- Block volume: Select source block volume that you need to attach it to target VM. In this tutorial, it is
vasu-inst-blkvolume
. - Volume attachment reference instance: Volume attachment reference is the source VM in primary which is
vasu-pub-inst
. - Mount point: Mount point as created in source VM. In this tutorial, it is
/u01
.
- Block volume: Select source block volume that you need to attach it to target VM. In this tutorial, it is
-
Login to the standby region VM vasu-volgrp-poc and ensure
/etc/fstab
entries are updated with block volume and mount point details as shown in the following image.
Task 5: Create Start DR Drill Plan in Standby Region
Create DR plan in standby DR Protection Group fsdr-volgrp-poc-uk
.
-
Click Plans, Create plan and enter the following information, and then click Create.
- Name:
Start Drill - Trail 2
. - Plan Type:
Start Drill
.
Note: Make sure to create the DR drill plan from the standby DR Protection Group (London).
- Name:
-
Click the plan and ensure built-in plans have been generated as shown in the following image.
Task 6: Execute Prechecks and Run Start Drill Plan
The Run prechecks option performs a quick validation of all steps in a DR plan.
-
Select Start Drill - Trail 2 plan, click Run prechecks to launch the run prechecks dialog and verify for the successful completion.
-
Select Start Drill - Trail 2 plan, click Execute Disaster Recovery Plan to execute the plan.
Check the status of the plan and ensure all the steps in the plan succeed.
-
After the successful DR plan execution, log in to the instance in London and verify the mount points have been attached.
-
Once you start the drill, DR Protection Group on both primary and standby region will turn to
Inactive
state (Drill in Progress). During this stage, changes to the DR Protection Group on both primary and standby are restricted. When the primary and standby DR Protection Group states are DrillInProgress, you can execute only the Stop drill plans.
Task 7: Create Stop Drill Plan in Standby Region
Create DR plan in standby DR Protection Group fsdr-volgrp-poc-uk
.
-
Click Plans, Create plan and enter the following information, and then click Create.
- Name:
Stop Drill - Trail 2
. - Plan Type:
Stop Drill
.
Note: Note that Start DR drill plan will be in active state since we can only run Stop drill plan from the standby DR Protection Group (London).
- Name:
-
Click the plan and ensure built-in plans have been generated as shown in the following image.
Task 8: Execute Prechecks and Run Stop Drill Plan
The Run prechecks option performs a quick validation of all steps in a DR plan.
-
Select Stop Drill - Trail 2 plan, click Run prechecks to launch the run prechecks dialog and verify for the successful completion.
-
From the DR drill plan Stop Drill - Trail 2, click Execute Disaster Recovery Plan to execute the plan.
Check the status of the plan and ensure all steps in the plan succeed.
-
After the successful DR plan execution, log in to the instance in London and verify if the mount points have been detached.
Next Steps
You have seen how to use DR drill plans and how to attach or detach a block volume to non-movable instances with OCI Full Stack Disaster Recovery.
Performing DR drills is an essential DR service capability that allows users to exercise and validate their business continuity configuration and plans without disrupting their production stack. The best part of DR drills is that the dry run of failover has no impact on your production application stack.
You can also further customize your DR plan by adding user defined groups as per application requirements.
Related Links
-
OCI Full Stack Disaster Recovery Non-moving Compute Enhancements
-
Move a virtual machine between OCI regions using Full Stack Disaster Recovery
-
Automate DR switchover and failover operations for Oracle WLS with OCI Full Stack DR
-
OCI Full Stack Disaster Recovery - User defined group scripts
Acknowledgments
-
Author - Vasudeva Manikandan (Implementation Tech Lead - Oracle Lift Services)
-
Contributor - Suraj Ramesh (Full Stack Disaster Recovery Product Manager)
More Learning Resources
Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.
For product documentation, visit Oracle Help Center.
Use OCI Full Stack DR to Attach or Detach a Non-Moving Compute Block Volumes with DR Drill Plans
F92516-01
February 2024
Copyright © 2024, Oracle and/or its affiliates.