Powershell toolkit Get-NcVolSize returns incorrect volume size after ONTAP upgrade
Applies to
- ONTAP 9
- Powershell Toolkit
Issue
- After an ONTAP upgrade, the size returned by the powershell toolkit when running Get-NcVolSize is 1024 times bigger than the actual volume size:
- Powershell command with debug shows that, while ONTAP returns the correct value, the toolkit multiplies that value to 1024
PS C:\Windows\system32> Get-NcVolSize -Vserver svm1 -Name vtest
2025-08-05 10:10:31,080 INFO DataONTAP.C.PowerShell.SDK.NcControllerCmdlet - Cmdlet invocation: Get-NcVolSize -Vserver svm1 -Name vtest -Zapi
2025-08-05 10:10:31,082 DEBUG NetApp.Ontapi.NaServer - <netapp version='1.7' xmlns='http://www.netapp.com/filer/admin' vfiler='svm1'><volume-size>
<volume>vtest</volume>
</volume-size></netapp>
2025-08-05 10:10:31,333 DEBUG NetApp.Ontapi.NaServer - <results status="passed"><is-fixed-size-flex-volume>false</is-fixed-size-flex-volume><is-readonly-flex-volume>false</is-readonly-flex-volume><is-replica-flex-volume>false</is-replica-flex-volume><volume-size>524288000</volume-size></results>
NcController : 1.2.3.4
VolumeSize : 536870912000
IsReadOnlyFlexVol : False
IsReplicaFlexVol : False
IsFixedSizeFlexVol : False