Microsoft Virtualization Discussions

snapmirror update

JSHACHER11
7,127 Views

I am trying to update snapmirror from a file with a list of destination volumes without success - what am I doing wrong?

connect-nacontroller -name filer02 -credential $FasCred

$dests = (get-content C:\volumes.txt)

foreach ($dest in $dests) {Invoke-NaSnapmirrorUpdate -Destination $dest}

the c:\volumes.txt file:

vol1

vol2

vol3

this is the error:

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

At line:1 char:53

+ foreach ($dest in $dests) {Invoke-NaSnapmirrorUpdate <<<<  -Destination $dest}

    + CategoryInfo          : InvalidOperation: (10.0.9.9:NaController) [Invoke-NaSnapmirrorUpdate], ESNAPMIRRORPARSERERROR

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

if I Putty and run 'snapmirror update' for any of those volumes, it works fine

8 REPLIES 8

JSHACHER11
7,127 Views

it's a vfiler, so maybe it cannot find the /etc/snapmirror.conf (?)

bsti
7,127 Views

Try qualifying your -destination param with the filer name.

invoke-SnapmirrorUpdate -Destination "filer02:$dest"

Sent from my Windows Phone

JSHACHER11
7,127 Views

same thing

the first relationship starts fine but all the rest fail with the above error message

bsti
7,127 Views

Odd.  I only get this error when I try the Invoke-NaSnapmirrorUpdate while connected to the source controller (instead of the destination) or I give an invalid destination volume name (perhaps you are supplying the source controller vol name when you should be giving the destination volume name - assuming they are different?).   Can we see the output from Get-NaSnapmirrorUpdate?

I tried your exact code (with different vol names) and it worked for me. 

JSHACHER11
7,127 Views

did you try it on a vfiler?

bsti
7,127 Views

No. I don't have access to one to test. You may be right in that being the difference.

Sent from my Windows Phone

JGPSHNTAP
7,127 Views

Are you logging into a vfiler or a filer?  Where are the snapmirrors setup?

Also, why are you using a static list of volume names..

JSHACHER11
7,127 Views

the snapmirrors are on the vfiler

I connect to the filer first and then to the vfiler - connection works fine and I can run commands on the vfiler

Connect-NaController -Name filer01 -Credential $FasCred

connect-nacontroller -Name ($global:CurrentNaController).name -Vfiler vfiler01 -Credential $FasCred

Public