Ask The Experts

powershell Create snapmirror

fmg_netapp1
2,486 Views

Hi, I am trying to create a snapmirror relationship with powershell and am failing, been trying this for a while and still not getting anywhere. looked at some examples but they just dont seem to be working with me. 

 

we have netapp v9.1 in two locations, one prod, and one dr. I created a volume in a SVM, then tried to create the snapmirror via powershell also. 

 

I tried the following command: 

new-ncsnapmirror -sourcelocation "PRODNA://PROD_SVM/SRM_TEST" -destinationlocation "DR-Cluster-1://DR_SVM/SRM_TEST_mirror" -Type transition_data_protection

I got the following error : new-ncsnapmirror :

 

Volume "DR-Cluster-1://DR_SVM/SRM_TEST_mirror" not found. (entry doesn't exist)

 

Also tried some examples from https://practical-admin.com/blog/netapp-powershell-toolkit-101-data-protection/

could not get those to work either.

 

Any help will be most appreciated, as i need to do quite a few of these, but also need to understand why this is not working. 

btw if i do it manually it creates not a problem, but would like to do it with powershell to automate it. 

3 REPLIES 3

SeanLuce
2,395 Views

Hello fmg_netapp1,

 

You will need to first create the destination volume as type 'DP' using the New-NCVol cmdlet.

 

Let me know if that solves the issue or if you still need more assistance.

 

Thanks,

Sean Luce, Trace3

#NetAppATeam

fmg_netapp1
2,361 Views

Hi,

 

After creating the dp module firs then running the above script, it worked as expected. Just means that i have another line in the script. 

 

thanks for your help. 

SeanLuce
2,394 Views

duplicate

Public