A Difference in Clustered ONTAP v 7-Mode in Deleting SnapMirror Snapshots: Part II

Continuing from Part I

What if the snapshots exist on a broken SnapMirror relationship in Clustered ONTAP?

The great news is that Clustered ONTAP will not let you delete the SnapMirror reference snapshots on a broken SnapMirror relationship*.
*At least, that is without forcing it using the -ignore-owners true flag.

Image: More rejoicing …
Example: Trying to Delete Reference Snapshots in a Broken SnapMirror Relationship

We have a snapmirror relationship …

na81::*> snapmirror show
Source              Destination  Mirror       Relationship
Path          Type  Path         State        Status       Healthy
------------- ---- ------------ ------------ ------------- -------
na81://vs1/testshare
              DP   na81://vs2/testDR3
                                Snapmirrored Idle          true

… break the relationship …

na81::*> snapmirror break -destination-path na81://vs2/testDR3

… confirm the relationship is broken …
                                                                                                                               
na81::*> snapmirror show
Source              Destination  Mirror       Relationship
Path          Type  Path         State        Status       Healthy
------------- ---- ------------ ------------ ------------- -------
na81://vs1/testshare
              DP   na81://vs2/testDR3
                                Broken-off   Idle          -

… find the name of the reference snapmirror snapshot on the source …
                                                                                                                               
na81::*> snapshot show -volume testshare
Vserver  Volume  Snapshot         State        Size Total% Used%
-------- ------- ---------------- -------- -------- ------ -----
vs1      testshare
                 snapmirror.15991611-422d-11e3-8578-123478563412_9_2147484698.2013-12-03_214650
                                  valid        96KB     0%    7%

… this will also be the name of the reference snapmirror snapshot on the destination …
                                                                                                                                 
na81::*> snapshot show -volume testDR3
Vserver  Volume  Snapshot         State        Size Total% Used%
-------- ------- ---------------- -------- -------- ------ -----
vs2      testDR3
                 snapmirror.15991611-422d-11e3-8578-123478563412_9_2147484698.2013-12-03_214650
                                  valid       260KB     0%   16%

… try deleting the reference snapmirror snapshot on the source …
                                                                                                                                  
na81::*> snapshot delete -volume testDR3 -vserver vs2 -snapshot snapmirror.15991611-422d-11e3-8578-123478563412_9_2147484698.2013-12-03_214650

… and it errors (which is good news) …

Error: command failed: This Snapshot copy is currently used as a reference Snapshot copy by one or more SnapMirror relationships. Deleting the Snapshot copy can cause future SnapMirror operations to fail.

… try deleting the reference snapmirror snapshot on the destination …

na81::*> snapshot delete -volume testshare -vserver vs1 -snapshot snapmirror.15991611-422d-11e3-8578-123478563412_9_2147484698.2013-12-03_214650

… and - again - it errors (which is good news) …

Error: command failed: This Snapshot copy is currently used as a reference Snapshot copy by one or more SnapMirror relationships. Deleting the Snapshot copy can cause future SnapMirror operations to fail.

And the same goes for load sharing mirrors (you cannot break a load sharing SnapMirror relationship though.)

To be continued in a Part III ...

Comments