Microsoft Virtualization Discussions

Get-NcLun fails with JSON integer is too large or small for an int32


This works fine to the same array under an old module but fails with this error under and


Get-NcLun : JSON integer 5556847471 is too large or small for an Int32. Path '', line 151,
position 24.
At line:1 char:1
+ Get-NcLun
+ ~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-NcLun], ArgumentException
+ FullyQualifiedErrorId : JSON integer 5556847471 is too large or small for an Int32. Path 'statistics.latency_raw
.read', line 151, position 24.,DataONTAP.C.PowerShell.SDK.Cmdlets.Lun.GetNcLun



Any ideas?




To add a bit more this started after upgrading to 9.11.1p5 but I suspect any 9.11.X has this issue.  Called NetApp support they will not help and told me to come here which I had already done but no replies so I guess the powershell toolkit is not something they want to work.  Kind of disheartening to be honest.  I beleive but can't prove it now that I've upgraded all my arrays that this property "" didn't exist in the old version.  When using powershell tollkit 9.11.x.x the property doesn't exists when you do a Get-NcLun | get-memebr which is why it works.


Same problem here.


It worked fine in the old "DataONTAP" module (version 9.8 in my case) but it fails with "NetApp.ONTAP" version

Very disappointed in NetApp.  They haven't helped and have given me the official we don't support the toolkit and to come here for support.  I said wait a minute on GitHUB it says "Copyrighted by NetApp and all the developers that are taking credit work for NetApp so excuse me for thinking you might support your own product.


I was able to get around it by using a template that only selected what I needed and not the performance numbers that are causing the error.



#Workaround to avoid reading Statistics data which errors. Only read the below properties when reading fron Array.
$lun_template = Get-NcLun -template
$lun_template.vServer ="*"
$lun_template.Path ="*"
$lun_template.Mapped ="*"
$lun_template.Online ="*"
$lun_template.Volume ="*"

$luns = Get-NcLun -Attributes $lun_template -ErrorAction Stop
Write-Host "Failed Enumerating LUNs on $MyArray"
If ($Report) {"Failed Enumerating LUNs on $MyArray" | Out-File -FilePath $OutputFile -Append -Encoding utf8 }



Hope that helps,


Yes, it helps. Thank you very much.