Ask The Experts

Highlighted

powershell Create snapmirror

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
Highlighted

Re: powershell Create snapmirror

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

Highlighted

Re: powershell Create snapmirror

duplicate

Highlighted

Re: powershell Create snapmirror

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. 

Check out the KB!
Knowledge Base
All Community Forums
Public