Ask The Experts

powershell Create snapmirror

fmg_netapp1

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

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

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

duplicate

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public