Search code examples
powershellsshstoragenetappontap

Why is Remove-NcSnapmirror removing SnapMirror relationship on BOTH source and destination? (NETAPP ONTAP PowerShell Toolkit)


TLDR: SSH command snapmirror delete works fine, PowerShell command Remove-NcSnapmirror misbehaves for SnapMirror relationship removal.

PowerShell cmdlet: The Remove-NcSnapMirror cmdlet is supposed to delete the SnapMirror relationship only on the destination cluster.

But for some reason, using this command removes the relationship on the source as well because of which SnapMirror resync cannot be used.

SSH cmd: The snapmirror delete command works perfectly fine, which deletes the SnapMirror relationship ONLY on the destination cluster. After this step, I am able to run snapmirror resync to resync the SnapMirror relationship.


Solution

  • Ended up going for Invoke-NcSsh as atleast it can call the SSH commands in a PowerShell script so it’s fine.

    It’s not the PowerShell way, but it is a way.