Microsoft Virtualization Discussions

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

aselvan

Hi All,

 

I'm trying to get the list of volumes from the storage system via Get-navol. Its working for some of the systems and not for few, I compared systems with same ONTAP version systems. So i don't think it is due to ONTAP version.However on a Non-Working system , I was able to perform other commands such as Get-NaSystemVersion. Is it something to do with the timeout ?

 

 

Below is the error log

 

> Get-NaVol

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

At line:1 char:1

+ Get-NaVol

+ ~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (XXXX:NaController) [Get-NaVol], NullReferenceException

    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Volume.GetNaVol

 

 

> Get-NaSystemVersion

NetApp Release 8.2.3P3 7-Mode: Tue Apr 28 14:48:22 PDT 2015

5 REPLIES 5

skellner_fi

Hi,

I think I found the solution. The command has a standard timeout of 60s. On some controllers this timeout is not sufficient. If you issue $gobal:CurrentNaController.TimeoutMsec=600000 the timeout is increased for the current controller and the command will work.

 

Regards

Stefan

Thank you,

 

$global:CurrentNaController.TimeoutMsec=600000

 

fixed my issue also with > Get-NaQuotaReport
Get-NaQuotaReport : Object reference not set to an instance of an object.
At line:1 char:1
+ Get-NaQuotaReport
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (hostname:NaController) [Get-NaQuotaReport], NullRefere
nceException
+ FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Quota.GetNaQuotaReport

Aparajita
Can you please enable debug logging through 'Set-NaToolkitConfiguration DEBUG' and then post the output? That will help determine what actually went wrong.

NAMAN

Even with the line   $c = Connect-NaController $filer    added, I still see only one aggr in the output.

 

Aparajita

Hi Naman,

 

Did you mean to post this to the other thread (about getting aggr-space info from multiple volumes)?

 

In that case, I suggest

  • printing out $filer to check all filers are indeed being iterated over.
  • printing the $c to make sure each filer is getting connected to
  • Remove the export-csv and see if all data is being displayed

Running my script on my own setup does show aggrs from all filers in my 7mode.txt, as you can see in my aggr.csv ... So I can't think of anything else that's going wrong in your setup.

 

- Aparajita

 

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