Skip to main content
NetApp Knowledge Base

Powershell toolkit Get-NcVolSize returns incorrect volume size after ONTAP upgrade

Views:
17
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
core
Last Updated:

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

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.