Microsoft Virtualization Discussions

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

aselvan
7,041 Views

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

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

NAMAN
6,649 Views

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

 

Aparajita
6,643 Views

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

 

skellner_fi
6,520 Views

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

wassilios_lyghas
6,405 Views

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

Public