Fail over to the secondary disk when the primary disk fails, then reverse-replicate data back after repair.
Limitations
If a replication pair belongs to a replication pair-consistent group, you cannot fail over or reverse-replicate that pair individually. Manage all pairs in the group together. See Use replication pair-consistent groups to implement disaster recovery.
Prerequisites
Before you begin, ensure that:
-
(For reverse replication) The primary disk is detached and in the Unattached state, or the attached ECS instance is in the Stopped state.
-
(Recommended) Snapshots are created for all relevant disks to back up data.
Snapshots are billed. See Snapshot billing.
(Optional) Step 1: Run a disaster recovery drill
After you activate a replication pair, async replication continuously copies data from the primary disk to the secondary disk. A disaster recovery drill clones data at the latest recovery point on the secondary disk to a new pay-as-you-go disk (drill disk), allowing you to verify application integrity at the secondary site.
Key behaviors of a drill:
-
Does not affect async replication.
-
A primary site failure does not affect the drill.
-
A secondary site failure may cause a drill exception.
Create a drill
-
Log on to the Elastic Block Storage (EBS) console.
-
In the left-side navigation pane, choose Enterprise-level Features > Async Replication.
-
In the top navigation bar, select the region and resource group of the replication pair.

-
Click the replication pair ID.
-
In the Walkthrough section, click Create walkthroughs.
-
In the dialog box, confirm the region, zone, category, and size of the drill disk, and click OK.
A pay-as-you-go disk of the same category and size as the secondary disk is created in the secondary disk's zone, containing data at the latest recovery point.
Create multiple drills to capture data at different recovery points as needed.
Clean up after the drill
After verification:
-
Record observations about the drill results.
-
In the Walkthrough section, delete the drill.
-
Release the drill disk to avoid unnecessary charges.
Step 2: Perform a failover
Failover suspends async replication. To prevent data loss, perform a failover only when the primary disk fails.
-
In the top navigation bar, select the region where the secondary disk resides.
-
Find the replication pair with the failed primary disk. In the Actions column, choose
> Perform Failover. -
Read the notes in the dialog box and click OK.
The replication pair status changes to Failed Over.
-
Attach the secondary disk to a temporary ECS instance to resume operations. See Create an instance by using the wizard and Attach a data disk.
Step 3: Perform a reverse replication
After you repair the primary disk, reverse-replicate data from the secondary disk back to the primary disk.
Reverse replication overwrites all data on the primary disk with data from the secondary disk. Create a snapshot of the primary disk before proceeding to prevent data loss. If you already created a snapshot after repair, skip the snapshot step in the dialog box.
-
In the top navigation bar, select the region where the secondary disk resides.
-
Find the replication pair on which you performed the failover. In the Actions column, choose
> Perform Reverse Replication. -
In the Perform Reverse Replication dialog box, read the notes and click Create Snapshot to snapshot the primary disk.
-
Click OK to start replicating data from the secondary disk to the primary disk.
The replication pair status changes to Stopped. The primary and secondary roles are swapped — the original secondary disk becomes the new primary disk and vice versa. View the primary disk in the Primary Disk/Region/Zone column and the secondary disk in the Secondary Disk/Region/Zone column. For example:
-
Before reverse replication: Disk A in China (Beijing) is the primary disk; Disk B in China (Shanghai) is the secondary disk.
-
After reverse replication: Disk B in China (Shanghai) is the primary disk; Disk A in China (Beijing) is the secondary disk.
-
In the Actions column, click Activate, and click OK to resume async replication from the original secondary disk to the original primary disk.
When the replication pair status changes to Normal, all data has been replicated to the original primary disk.
(Optional) Restore original primary and secondary roles
Reverse replication swaps the primary and secondary roles. To restore the original roles:
-
In the Secondary Disk/Region/Zone column, note the secondary disk's region. Select that region in the top navigation bar.
-
Find the replication pair. In the Actions column, choose Perform Failover.
-
In the Actions column, choose Perform Reverse Replication.
-
After reverse replication completes, click Activate in the Actions column to resume replication.
-
Verify the disks in the Primary Disk/Region/Zone and Secondary Disk/Region/Zone columns.