Microsoft Virtualization Discussions

Get-NcEfficiency vs Restricted volumes

PHILIPALBERT

Hi,

 

I noticed that when I have a restricted volume the cmd Get-NcEfficiency fails.

 

PS Prompt> Get-NcEfficiency

Get-NcEfficiency : Object reference not set to an instance of an object.
At line:1 char:17
+ Get-NcEfficiency <<<<
+ CategoryInfo : InvalidOperation: (liauc94:NcController) [Get-NcEfficiency], NullReferenceException
+ FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Toolkit.Efficiency.GetNcEfficiency

 

Is this a normal behavior?

 

Thanks

1 ACCEPTED SOLUTION

asulliva

Well, the same behavior happens to me...so I would say it is "normal".  Is it the intended or desired result, probably not : )

 

I'll open a bug for this...thanks for pointing it out!

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

4 REPLIES 4

Alcazar

Was there ever a bug filed for this?  I there an existing work around in place?  When  i try to run Get-NCEffiicnecy i get the same results, unsure if its a bug within the toolkit or something within my code.

 

$cdot_controllers= (Get-Content $controllers) | Out-string | ConvertFrom-Json

foreach ($cdot_controller in $cdot_controllers | where {$_.Vendor -eq "NetApp" -and $_.Location -eq "Data Center" -and $_.OS -eq "CDOT"}){

$cdot_connect = Connect-NcController $cdot_controller.ClusterServer -Credential $cred

$cdot_aggregates = Get-NcAggr | ?{ $_.Name -notlike "*root" }

$cdot_efficiency = Get-NcEfficiency

foreach ($cdot_aggregate in $cdot_aggregates) {

$cdot_total_tb +=$cdot_aggregate.TotalSize

$cdot_available_tb +=$cdot_aggregate.Available

}

foreach ($cdot_vol in $cdot_efficiency) {

$cdot_dedupe_tb +=$cdot_vol.Returns.Dedupe

}

}

 

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

At E:\Michael\Netapp Heatmap Aggr Capacity.ps1:72 char:24

+ $cdot_efficiency = Get-NcEfficiency

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

+ CategoryInfo : InvalidOperation: (wdlnapc01.internal.cigna.com:NcController) [Get-NcEfficiency], NullReferenceException

+ FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Toolkit.Efficiency.GetNcEfficiency

 

asulliva

Hello @Alcazar,

 

This was created as bug id 986240.

 

You could exclude the root aggregates and get only online aggregates using this query...

 

Get-NcAggr -Query @{ AggrRaidAttributes = @{ IsRootAggregate = $false; State = "online" } }

 

Likewise, the same works for volumes to return only non-system volumes...

 

Get-NcVol -Query @{ VolumeStateAttributes = @{ IsVserverRoot = $false; IsNodeRoot = $false; State = "online" } }

 

Which should eliminate the issue of returning aggregates which the Get-NcEfficiency cmdlet can't operate against.

 

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

asulliva

Well, the same behavior happens to me...so I would say it is "normal".  Is it the intended or desired result, probably not : )

 

I'll open a bug for this...thanks for pointing it out!

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

PHILIPALBERT

I was just wondering if I was the only one having that issue.

 

Thanks!

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