Microsoft Virtualization Discussions
Microsoft Virtualization Discussions
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
Solved! See The Solution
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
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
I was just wondering if I was the only one having that issue.
Thanks!
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
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