Microsoft Virtualization Discussions

foreach - snapmirror update

JSHACHER11

Hi guys,

I need a script to update snapmirror for a bunch of relationships

I created a text file with all the destinations

would this work:

$dstvols = (Get-Content c:\dstvols.txt)

   

Foreach($dstvol in $dstvols) {Invoke-NaSnapmirrorUpdate -Destination $dstvol}

cheers

Joel

1 ACCEPTED SOLUTION

vinith

Hello,  This should work, all destination volumes should belong to the same controller.

View solution in original post

2 REPLIES 2

vinith

Hello,  This should work, all destination volumes should belong to the same controller.

View solution in original post

JSHACHER11

thank you!

it worked fine for almost all the volumes

for one volume I am getting this:

Invoke-NaSnapmirrorUpdate : Source not set on command line or in /etc/snapmirror.conf file.

At C:\Users\smupdate.ps1:10 char:56

+ Foreach($dstvol in $dstvols) {Invoke-NaSnapmirrorUpdate <<<<  -Destination $dstvol}

    + CategoryInfo          : InvalidOperation: (5.5.5.5:NaController) [Invoke-NaSnapmirrorUpdate], ESNAPMIRRORPA

   RSERERROR

    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Snapmirror.InvokeNaSnapmirrorUpdate

PS C:\Users> Invoke-NaSnapmirrorUpdate -Destination vol5 -Verbose

VERBOSE: Start SnapMirror update to vol5.

Source                               Destination                          Status         State                LagTimeTS

------                               -----------                          ------         -----                ---------

filer1:vol5                          filer2:vol5                          transferring   snapmirrored          00:01:54

PS C:\Users\>

I know for a fact that the /etc/snapmirror.conf is fine

I've also tried from Putty and it works fine

Announcements
Register for Insight 2021 Digital

INSIGHT 2021 Digital: Meet the Specialists 2

On October 20-22, gear up for a fully digital, totally immersive virtual experience with a downright legendary lineup of world-renowned specialists. Tune in for visionary conversations, solution deep dives, technical sessions and more.

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