Slowness Accessing Knowledge Base
We are currently experiencing slow responses when accessing Knowledge Base articles directly and through Elio. Thank you for your patience while we work on resolving the issue.

Microsoft Virtualization Discussions

Creating SVMDR snapmirror relationship with PowerShell

Andrew7193
2,888 Views

I am trying to create a script that will create a snapmirror relationship for an SVMDR environment I cannot seem to get the New-NcSnapmirror command to cooperate. 

 This version keeps asking for the volumes.

New-NcSnapmirror -DestinationVserver svm_nam-pdtst01 -Controller NA1-FAS01 -SourceVserver svm_nam-pdtst01_rep -SourceCluster NA2-FAS01 -Type XDP -schedule 5min -Policy $pol -PreserveIdentity

 

 This version just bombs no matter how I configure it. 

New-NcSnapmirror -Destination svm_nam-pdtst01: -Controller NA1-FAS01 -SourceVserver svm_nam-pdtst01_rep -SourceCluster NA2-FAS01 -Type XDP -schedule 5min -Policy $pol -PreserveIdentity
New-NcSnapmirror : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:1
+ New-NcSnapmirror -Destination svm_nam-pdtst01: -Controller NA1-FAS01 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [New-NcSnapmirror], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,DataONTAP.C.PowerShell.SDK.Cmdlets.Snapmirror.NewNcSnapmirror

 

As always any help is appreciated.

1 ACCEPTED SOLUTION

Andrew7193
2,693 Views

OK I figured it out. When I got the error using -Source and -Destination what the error was saying was "Who do I action this on" I had forgotten the controller parameter. So this works:

New-NcSnapmirror -Controller $n1fas -Source svm_nam-pdtst01_rep: -Destination svm_nam-pdtst01: -type dp -Schedule 5min -Policy svm_nam-pdtst01_rep_policy -PreserveIdentity

 

Recap:

 

To script a snapmirror relationship using SVMDR you need to use the -Source and -Destination parameters and end the VSM names with a colon ":". 

 

 

 

View solution in original post

4 REPLIES 4

hmoubara
2,786 Views

Hello,

 

When running the command did you include the ":" after the SVM name as listed below based on your commnad; i can see based on the example you tried that by adding it on the destination side only:

 

New-NcSnapmirror -Destination svm_nam-pdtst01: -Controller NA1-FAS01 -SourceVserver svm_nam-pdtst01_rep:                           -SourceCluster NA2-FAS01 -Type XDP -schedule 5min -Policy $pol -PreserveIdentity

 

Thanks

 

Thanks

Andrew7193
2,703 Views

I am sorry about the delay. I thought I had added the ":" after the source SVM name but I tried it just now and I get the same error. It does not like the ":" and if you leave it off it asks for the volumes. The -SourceVolume parameter does not take wildcards either. 

Andrew7193
2,702 Views

Another interesting thing. When you look at Get-Help for the command for the -source parameter it says:

-Source <String>
Specifies the source endpoint of the SnapMirror relationship in the format: [cluster:]//vserver/volume. This format may change in the future. When specifying a source endpoint, you must use either the source location, or the source cluster, source vserver, and source volume.

 

If I look an an existing snapmirror SVMDR configuration I see this value:

SourceLocation                DestinationLocation              Status                               MirrorState
--------------                              -------------------                        ------                                    -----------
svm_nam-pdtst01:           svm_nam-pdtst01_rep:        idle                                  snapmirrored

 

I then tried the command using -Source and -Destination but I still get the same error. Now I am trying to track down how to refer to the source location and if it is even the same in this command as the value return in the Get-Snapmirror command. 



Andrew7193
2,694 Views

OK I figured it out. When I got the error using -Source and -Destination what the error was saying was "Who do I action this on" I had forgotten the controller parameter. So this works:

New-NcSnapmirror -Controller $n1fas -Source svm_nam-pdtst01_rep: -Destination svm_nam-pdtst01: -type dp -Schedule 5min -Policy svm_nam-pdtst01_rep_policy -PreserveIdentity

 

Recap:

 

To script a snapmirror relationship using SVMDR you need to use the -Source and -Destination parameters and end the VSM names with a colon ":". 

 

 

 

Public