Effective December 3, NetApp adopts Microsoft’s Business-to-Customer (B2C) identity management to simplify and provide secure access to NetApp resources.
For accounts that did not pre-register (prior to Dec 3), access to your NetApp data may take up to 1 hour as your legacy NSS ID is synchronized to the new B2C identity.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Microsoft Virtualization Discussions

get-ncsnapmirror not working?

James_Castro

anyone else seeing this?  am i missing something here?  this should be pretty straight forward right?

 

Get-NcSnapmirror | Where-Object {$_.RelationshipType -eq "load_sharing"}

 

Get-NcSnapmirror : Object reference not set to an instance of an object.

 

+ Get-NcSnapmirror | Where-Object {$_.RelationshipType -eq "load_sharing"}

+ ~~~~~~~~~~~~~~~~

+ CategoryInfo : InvalidOperation: (10.x.x.x:NcController) [Get-NcSnapmirror], NullReferenceException

+ FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Snapmirror.GetNcSnapmirror

 

6 REPLIES 6

James_Castro

I think I know what the issue is.  The particular cluster I am runnin gthis on happens to be a very "busy" one.  comand works fine on other less busy clusters.  I believe the zapi is timing out even though i adjust the number of retries.  Thanks

JGPSHNTAP

extended you https timeout on your connect command

 

$global:currentncontroller | select * 

 

Look for timoutmsec

 

 

jpulk

Another approach to this could be to have the cluster only reply with the load sharing mirrors by sumbitting the request with the query as shown below:

 

C:\PS>$query = Get-NcSnapmirror -Template
$query.RelationshipType = "load_sharing"
Get-NcSnapmirror -Query $query


Using an advanced query, get all load-sharing SnapMirror relationships.

 

SourceLocation DestinationLocation Status MirrorState
-------------- ------------------- ------ -----------
VxeRubble://costea01/vol1_LS1 VxeRubble://costea01/vol1_LS2 idle snapmirrored

 

Example taken from the Toolkit Help file.

JGPSHNTAP

^^

This is old method and imho, not prefered method, by building a template.. The OP, has the correct way in my mind..

JGPSHNTAP

What version of PS are you running and what version of toolkit version and Ontap

 

I'm running 

PS 3

Toolkit version: 3.3.0.65

ontap 8.3.1GA

JGPSHNTAP

That command works fine

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