Subscribe

snapmirror update

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

Re: snapmirror update

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

Re: snapmirror update

Try qualifying your -destination param with the filer name.

invoke-SnapmirrorUpdate -Destination "filer02:$dest"

Sent from my Windows Phone

Re: snapmirror update

same thing

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

Re: snapmirror update

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. 

Re: snapmirror update

did you try it on a vfiler?

Re: snapmirror update

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

Sent from my Windows Phone

Re: snapmirror update

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..

Re: snapmirror update

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