How to swap (takeover/takeback) a replication

Ops Center Protector User Guide

Version
7.9.x
Audience
anonymous
Part Number
MK-99PRT002-10
ft:lastEdition
2024-12-11

It is assumed that you have implemented a simple file system path, active-passive (i.e. TC or UR) replication policy with production applications accessing the primary volume(s) of the replication pair. See How to replicate a file system with TrueCopy for an example of how to do this.

If you are swapping an active-active (GAD) replication then additional steps may be required, especially if using a cross-path setup (refer to About Hitachi block based replication swapping (takeover/takeback) and About Global-Active Device Cross Path).

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.
  1. Move production from the primary to the secondary site by performing a Swap as follows:
    1. Stop any applications that access the primary volumes to be taken over and unmount the filesystem from the OS.
    2. Locate the replication to be taken over by navigating to the Hitachi Block Replication Details (Storage) on the secondary device. See How to view the status of a Hitachi Block storage device.
      You will see that the replication's Type (displayed on the corresponding tile in the Hitachi Block Replications Inventory) is Active Full Copy and the Swapped state (displayed on the Hitachi Block Replication Details (Storage)) is No.
    3. From the Hitachi Block Replication Details (Storage) click the Swap button.
      The Hitachi Block Replication Swap Wizard will appear warning that swapping can cause data loss, however as long as access to the primary volumes has been stopped, it will be safe to proceed.
    4. Select a direction from the “Direction” dropdown. This is the intended final direction of the replication once the swap operation is complete.
    5. 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 Replication operation is in progress. Click on the Job Type in the table to open the Job Details which list the log messages relating to the swap operation.
    6. Return to the Hitachi Block Replication Details (Storage) and review the replication's status:
      • If the swap is successful then 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 (see Monitor Status Badges) will also appear above the replication's mover on the Monitor Details.
      • If the swap cannot be completed due to a P-VOL or data link fault then the Swapped state is set to No and Suspend for Swap state is set to Yes, indicating that the swap is not yet complete and is in SSWS status. Further action will be required on the primary block storage device or data link before the replication process can be re-established, but the secondary will be writeable.
      Note: The flow direction of a replication pair should ONLY be determined by referring to the Summary - Swapped field on the Hitachi Block Replication Details (Storage) for the secondary Block storage device. Primary and secondary volume information shown in the replications Session Log Details and associated Log Attachments Dialog should not be used to infer the flow direction following a swap.
    7. Start any applications that access the secondary volumes that have been taken over and resume production at the secondary site.
  2. Perform any maintenance and recovery tasks at the primary site, resolve any faults with the data link between sites, then go back to the Hitachi Block Replication Details (Storage) for the secondary to determine the status of the S-VOLs. Perform one of the following actions as appropriate:
    1. 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.
    2. 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.
    3. 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
  3. Move production back to the primary site when ready to resume normal operations by performing a Swap as follows:
    1. Stop any applications that access the secondary volumes to be taken back.
    2. Locate the replication to be taken back by navigating to the Hitachi Block Replication Details (Storage) on the secondary device. See How to view the status of a Hitachi Block storage device.
      You will see that the replication's Type (displayed on the corresponding tile in the Hitachi Block Replications Inventory) is Active Full Copy and the Swapped state (displayed on the Hitachi Block Replication Details (Storage)) is Yes.
    3. From the Hitachi Block Replication Details (Storage) click the Swap button.
      The Hitachi Block Replication Swap Wizard will appear warning that swapping can cause data loss, however as long as access to the secondary volumes has been stopped, it will be safe to proceed.
    4. 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 list the log messages relating to the swap operation.
    5. Return to the Hitachi Block Replication Details (Storage) and review the replication's status:
      When the swap (takeback) is completed the Swapped state will be 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 will disappear from above the replication's mover on the Monitor Details.
    6. Start any applications that access the primary volumes that have been taken back and resume production at the primary site.