Microsoft Virtualization Discussions

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


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




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.




Thank you,




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
+ FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Quota.GetNaQuotaReport

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


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



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


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