Subscribe
Accepted Solution

Using Remove-NaSnapmirror, no release-able destinations

Has anyone managed to get the remove-nasnapmirror cmdlet to work? According to the help:

This convenience cmdlet completely deletes a SnapMirror relationship.  After a series of sanity checks, this cmdlet
releases the mirror on the source, breaks the mirror on the destination, deletes any snapshots on the destination,
and deletes any sync or async SnapMirror schedule entries on the destination.

When I run it against a test snapmirror relationship I get "SnapMirror error: No release-able destination found that matches those parameters." but I'm not sure why.

Thanks

Re: Using Remove-NaSnapmirror, no release-able destinations

To completely remove a SnapMirror relationship, several steps are needed.

  1. Release the SnapMirror on the source controller
  2. Break the SnapMirror on the destination controller
  3. Delete the destination snapshot
  4. Delete async schedule, if any
  5. Delete sync schedule, if any

These may all be accomplished via the Toolkit as follows:

  1. Invoke-NaSnapmirrorRelease (source controller)
  2. Invoke-NaSnapmirrorBreak (destination controller)
  3. Remove-NaSnapshot (using BaseSnapshot field from Get-NaSnapmirror (destination controller))
  4. Remove-NaSnapmirrorSchedule (destination controller)
  5. Remove-NaSnapmirrorSyncSchedule (destination controller)

It sounds as if the first step isn't working in Remove-NaSnapmirror, so I suggest trying the steps individually to confirm.

Re: Using Remove-NaSnapmirror, no release-able destinations

Thanks - I was runing this whilst connected to the detsination filer hence that error, however I have now get another error of " destination is not in a snapmirrored state", I'm using the following while connected to the source controller

$filer2=connect-nacontroller -name filer2

remove-nasnapmirror -destination filer1:vol1 -source filer2:vol2 -sourcecontroller $filer2

if i connect to the destination and run get-nasnapmirror vol1 the volume is shown as being in a snapmirrored state.

Re: Using Remove-NaSnapmirror, no release-able destinations

You are correct to send Remove-NaSnapmirror to the destination controller.  However, this code you posted has a bug that isn't immediately obvious:

$filer2=connect-nacontroller -name filer2

remove-nasnapmirror -destination filer1:vol1 -source filer2:vol2 -sourcecontroller $filer2

In this snippet, I think you are trying to send Remove-NaSnapmirror to the destination controller.  However, the preceding line contains Connect-NaController, which will set the value of $global:CurrentNaController to filer2.  This will cause Remove-NaSnapmirror to be sent to filer2.

There are various ways to fix this, the simplest being to use the -Transient switch:


$filer2 = Connect-NaController -Name filer2 -Transient

Remove-NaSnapmirror -Destination filer1:vol1 -Source filer2:vol2 -SourceController $filer2

Re: Using Remove-NaSnapmirror, no release-able destinations

Thanks - that's now worked.