Subscribe
Accepted Solution

Breaking a Snapmirror relationship

I am currently writing a bunch of scripts to handle the various resources that are not known about by VMware SRM but still need to be part of the recovery plan as they are used by various VMs.

So far I have been working on the 'test' phase of the recovery plans.  I can clone the various volumes, re-establish appropriate CIFS and NFS shares and mounts and undo it all at the end of the test.

I have started working on the real thing and have a question that I can not answer as I am not allowed to try it on a real production volume and my test volume doesn't have enough data or deltas in it to catch it when the relationship is not 'idle'.

Can one break-off a snapmirror that is not idle or do I need to do something like ?

Pseudo-code:

while ( GetNaSnapmirror filer:volume ).Status -ne 'idle' { Wait-a-bit }

Invoke-NaSnapMirrorBreak filer:volume

or maybe

while ( GetNaSnapmirror filer:volume ).State -ne 'broken-off' {

   Invoke-NaSnapMirrorBreak filer:volume

   Wait-a-bit

}

Any suggestions would be helpful.

Re: Breaking a Snapmirror relationship

If you are using Volume SnapMirror, I believe you can break the relationship at any time.  However if you are using QTree SnapMirror, you definitely should call Invoke-NaSnapmirrorQuiesce on the destination before calling break. 

If you want to make sure that your data is as up-to-date as possible and your source controller is online, you could Invoke-NaSnapMirrorUpdate before you start and use some code like your first example to wait for it to finish:

Invoke-NaSnapMirrorUpdate filer:volume

while ( GetNaSnapmirror filer:volume ).Status -eq 'transferring' {sleep 5}

#Invoke-NaSnapMirrorQuiesce filer:volume/qtree #if you are using QTree SnapMirror

Invoke-NaSnapMirrorBreak filer:volume

Re: Breaking a Snapmirror relationship

As per TR 3326 (http://media.netapp.com/documents/tr-3326.pdf) the correct procedure is Update, Quiesce, Break as noted in the script above.

Alex

Re: Breaking a Snapmirror relationship

The Appendices in the TR are exactly what I had been looking for.  Thanks.