The steps below describe how to swap the direction of a Hitachi block GAD replication using Ops Center Protector. In the case of primary site maintenance, application failure, primary volume failure or disaster recovery, it may be necessary to move production to the secondary site, resolve the issue at the primary site and then move production back to the primary site.
When a replication is swapped, the S-VOL takes over the role of the primary volume and the P-VOL takes over the role of the secondary volume. A swapped replication can be swapped back to its normal state with the P-VOL as the primary and S-VOL as the secondary.
When a GAD replication is swapped, the original P-VOL is marked as reserved. If the replication is torn-down while in the swapped state, the reserved flag on the original P-VOL will prevent it from being used and the reserved flag must be manually reset.
If you are swapping an active-active (GAD) replication, additional
steps may be required especially if using a cross-path setup.
- Move production from the primary to the secondary site by performing a Swap as follows:
- Stop any applications that access the primary volumes to be taken over.
- Locate the replication to be taken over by navigating to the Block Storage Replication Details (Storage) on the secondary device.
You will see the replication's Type (displayed in the Block Replications Inventory) is Active Full Copy and the Swapped state (displayed in the Block Replication Details (Storage) ) is No.
- From the Block Replication Details (Storage) click the Swap button.
The Block Replication Swap Wizard displays a warning that swapping can cause data loss. It is safe to proceed as long as access to the primary volumes has been stopped.
- Type the word 'SWAP' into the Confirm Swap field and click OK.
The Jobs Inventory is displayed and a new job appears indicating that a Swap VSP Replication operation is in progress. Click on the Job Type in the table to open the Job Details which shows the log messages relating to the swap operation.
- Return to the Block Replication Details (Storage) and review the replication's status.
- If the swap is successful the Swapped state is set to Yes, indicating that the replication is now reversed (S-VOL to P-VOL) and is back in PAIR status. A Swapped status badge appears above the replication's mover on the Monitor Details.
- If the swap cannot be completed due to a P-VOL or data link fault the Swapped state is set to No and the Suspend for Swap state is set to Yes, indicating the swap is not yet complete and is in SSWS status. Further action is required on the primary block storage device or data link before the replication process can be re-established, but the secondary is writeable.
Note: The flow direction of a replication pair should ONLY be determined by referring to the Summary - Swapped field on the Block Replications Details (Storage) for the secondary Block storage device. Primary and secondary volume information shown in the replications Session Log Details should not be used to infer the flow direction following a swap.
- Start any applications that access the secondary volumes that have been taken over and resume production at the secondary site.
- Perform any maintenance and recovery tasks at the primary site, resolve any faults with the data link between sites, then go back to the Block Replication Details (Storage) for the secondary to determine the status of the S-VOLs. Perform one of the following actions as appropriate:
- If the replication is Swapped (S-VOL status = PAIR) then proceed with moving production back to the primary site when ready, as detailed in step 3 below.
- If the replication is Suspended for Swap (S-VOL status = SSWS) then click the Unsuspend button. The swap operation will be completed as described above. Production at the secondary site can now continue with replication to the primary site in operation.
- If the S-VOL status is some value other than PAIR or SSWS then you will need to run the following CCI command sequence from outside Protector to recover the replication pairing: pairsplit -R, pairsplit -S, paircreate
- Move production back to the primary site when ready to resume normal operations by performing a Swap as follows:
- Stop any applications that access the secondary volumes to be taken back.
- Locate the replication to be taken back by navigating to the Block Replication Details (Storage) on the secondary device.
You will see that the replication's Type (displayed on the corresponding tile in the Block Replication Inventory) is Active Full Copy and the Swapped state (displayed on the Block Replication Details (Storage)) is Yes.
- From the Block Replication Details (Storage) click the Swap button.
The Block Replication Swap Wizard displays a warning that swapping can cause data loss. It is safe to proceed as long as access to the secondary volumes has been stopped.
- Type the word 'SWAP' into the Confirm Swap field and click OK.
The Jobs Inventory is displayed and a new job will appear indicating that a Swap VSP Replication operation is in progress. Click on the Job Type in the table to open the Job Details which lists the log messages relating to the swap operation.
- Return to the Block Replication Details (Storage) and review the replication's status.
When the swap (takeback) is completed the Swapped state is set to No, indicating that the replication is now normal (P-VOL to S-VOL) and is back in PAIR status. The Swapped status badge disappears from above the replication's mover on the Monitor Details.
- Start any applications that access the primary volumes that have been taken back and resume production at the primary site.