NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform.
You will still be able to view content, but posting and replying will be temporarily disabled.
To learn more, please review the information in this blog post.

Microsoft Virtualization Discussions

Confusion with Start-Nasnapvaultsectransfer

JGPSHNTAP
3,502 Views

So, we ran into an issue where we needed to start a bunch of snapvaults that for some reason or the other failed to start.  (root cause to be determined)

So I took this opportunity to test my netapp ps skills and for some reason i'm not liking what i'm seeing.

I'm running a simple query

get-nasnapvaultsecstatus | ? {$_.secondary -like "*servera*"} |  Start-nasnapvaultsectransfer

But i'm met with a big error: Start-NaSnapvaultSecTransfer : The qtree idle is not configured in snapvault.

So, i said, that doesn't seem to be correct, so  Then I did the following

get-nasnapvaultsecstatus | ? {$_.secondary -like "*servera*"} |  Select Destinationpath | out-file c:\log.log

I figured I would hack my way through this and then did

gc c:\temp\log.log | % { start-nasnapvaultsectransfer $_ }

And i'm met with ..

At line:1 char:61

+ gc C:\log.log | % { start-nasnapvaultsectransfer <<<<  $_ }

    + CategoryInfo          : InvalidOperation: (filer:NaController) [Start-NaSnapvaultSecTransfer], ESNAPVAULTSETUP

    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Snapvault.StartNaSnapvaultSecTransfer

Start-NaSnapvaultSecTransfer : The qtree blah/blah

                                          is not configured in snapvault.

But the qtree's are 100% configured...

Ok, where' am I going wrong?

thx

josh

2 REPLIES 2

beam
3,502 Views

Hi Josh,

It looks like the pipelining is failing to bind the SecondaryPath parameter properly.  Your work-around would work, but there appears to be white space after the qtree path, which is causing the cmdlet to fail.  Try something like this:

Get-NaSnapvaultSecStatus  | ? {$_.secondary -like "*servera*"} | % { Start-NaSnapvaultSecTransfer $_.DestinationPath }

Thanks,

Steven

JGPSHNTAP
3,502 Views

Yeah, that seems to work.. Weird how things didn't work from the pipeline and not binding to the secondarypath parameter.

Public