Restoring a SnapVault Relationship in a DR Situation...

The title should really be: “Restoring a SnapVault Relationship in a DR Situation, where there was no relationship before.” That still probably doesn’t make much sense, so here are some diagrams.

Image 1: 4-Copy Data Protection
Image 2: 4-Copy Data Protection Reversed after a DR situation
Using the lab constructed in this series; to simulate losing site A, we break the SnapMirrors - 1 to 2 (from 2) and 3 to 4 (from 4) in the diagram above - and then create the SnapVault (from 3 to 4) and make sure it’s working as a vault, whilst acquiring an understanding of the Snapshots (on 2 and 4) that are in play.

Note 1: Highlighted in yellow are things I wanted to point out.
Note 2: Highlighted in green are the action commands that would be run in a DR situation.

Step 1: Break the SnapMirrors

NCB1::> snapshot show -vserver NCB1V1 -vol VOL5

Vserver  Volume  Snapshot
-------- ------- --------
NCB1V1   VOL5
60min.2014-10-14_1500
60min.2014-10-14_1600
60min.2014-10-14_1700
60min.2014-10-14_1800
snapmirror.0401c075-52ee-11e4-af9f-123478563412_2147484697.2014-10-14_184500
60min.2014-10-14_1900
snapmirror.0401c075-52ee-11e4-af9f-123478563412_2147484697.2014-10-14_190500

NCB1::> snapmirror break -destination-path  NCB1V1:VOL5

NCB2::> snapshot show  -vserver NCB2V1 -vol VOL5

Vserver  Volume  Snapshot
-------- ------- --------
NCB2V1   VOL5
60min.2014-10-14_1500
60min.2014-10-14_1600
60min.2014-10-14_1700
60min.2014-10-14_1800

NCB2::> snapmirror break -destination-path  NCB2V1:VOL5

Step 2: Apply Snapshot Policy to the new Primary Volume (NCB1V1’s VOL5)

NCB1::> volume show -vserver NCB1V1 -volume VOL5 -fields snapshot-policy

vserver volume snapshot-policy
------- ------ ---------------
NCB1V1  VOL5   none

NCB1::> volume modify -vserver NCB1V1 -volume VOL5 -snapshot-policy 10x10min_46x60min_2x24hrs

Warning: You are changing the Snapshot policy on volume VOL5 to 10x10min_46x60min_2x24hrs.  Any Snapshot copies on this volume from the previous policy will not be deleted by this new Snapshot policy. Do you want to continue? {y|n}: y

Note: Since the previous policy was none, and the original source had the 10x10min_46x60min_2x24hrs Snapshot Policy, I’m pretty sure (and think I’ve tested this already) that all the historical Snapshot get managed correctly, and you can ignore the warning.

Step 3: Create the SnapVault Relationship (after deleting the SnapMirror from NCA2V1:VOL5)

NCB2::> snapmirror create -source-path NCB1V1:VOL5 -destination-path NCB2V1:VOL5 -type XDP -schedule sv60min -policy 92x60min_16x24hrs

Error: command failed: Relationship with destination NCB2V1:VOL5 already exists.

NCB2::> snapmirror show -destination-path NCB2V1:VOL5

Source            Destination  Mirror
Path        Type  Path         State
----------- ---- ------------ -------
NCA2V1:VOL5 DP   NCB2V1:VOL5  Broken-off

NCB2::> snapmirror delete -destination-path NCB2V1:VOL5

NCB2::> snapmirror create -source-path NCB1V1:VOL5 -destination-path NCB2V1:VOL5 -type XDP -schedule sv60min -policy 92x60min_16x24hrs

NCB2::> snapmirror show -destination-path NCB2V1:VOL5

Source            Destination  Mirror
Path        Type  Path         State
----------- ---- ------------ -------
NCB1V1:VOL5 XDP  NCB2V1:VOL5  Broken-off

Step 4: Resync the SnapVault Relationship

NCB2::>  snapmirror resync -destination-path NCB2V1:VOL5

Warning: All data newer than Snapshot copy 60min.2014-10-14_1800 on volume NCB2V1:VOL5 will be deleted. Do you want to continue? {y|n}: y

NCB2::> snapmirror show -destination-path NCB2V1:VOL5

Source            Destination  Mirror
Path        Type  Path         State
----------- ---- ------------ -------
NCB1V1:VOL5 XDP  NCB2V1:VOL5  Snapmirrored

NCB2::> snapshot show

Vserver  Volume  Snapshot
-------- ------- --------
NCB2V1   VOL5
60min.2014-10-14_1500
60min.2014-10-14_1600
60min.2014-10-14_1700
60min.2014-10-14_1800
60min.2014-10-14_1900

Note: Since the _1900 snapshot has appeared we see the vault is already working!

Step 5: Create a SnapVault-labelled Snapshot on the Primary Volume and test if it is Vaulted

NCB1::> snapshot create -volume VOL5 -snapshot 60min.2014-10-14_1940 -snapmirror-label 60min -vserver NCB1V1

NCB2::> snapmirror update -destination-path NCB2V1:VOL5
NCB2::> snapshot show -volume VOL5 -vserver NCB2V1

Vserver  Volume  Snapshot                        State        Size Total% Used%
-------- ------- ------------------------------- -------- -------- ------ -----
NCB2V1   VOL5
60min.2014-10-14_1500
60min.2014-10-14_1600
60min.2014-10-14_1700
60min.2014-10-14_1800
60min.2014-10-14_1900
60min.2014-10-14_1940

It’s double definitely working!

THE END

Comments