Microsoft Virtualization Discussions
Microsoft Virtualization Discussions
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
Solved! See The Solution
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
To completely remove a SnapMirror relationship, several steps are needed.
These may all be accomplished via the Toolkit as follows:
It sounds as if the first step isn't working in Remove-NaSnapmirror, so I suggest trying the steps individually to confirm.
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.
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
Thanks - that's now worked.