Data ONTAP Discussions

Highlighted

Get-NcVolSize command not reporting volsize correctly when > 1024GB using Ontap Powershell Toolkit

Hello Powershell Coders,

 

My config : 

Powershelltoolkit : 9.6.0 ou 4.5.0

Dataontap : 9.4P2

 

I'm facing a strange problem with command   Get-NcVolSize : 

 

- volsize  < to 1024 GB or a strict multiple of 1024GB  (ex : 2048GB) is reported correctly,

- volsize  > to 1024 GB or not strict multiple of 1024GB  (ex : 1025GB) is reported incorrectly (equal to 0 systematically).

 

This behaviour have a side effect on "Set-NcVolSize" command, for volume > to 1024GB or not strict multiple of 1024, and make the resize command fail!

 

Someone experiencing the same issue/ has a workaround for this?

 

Many thanks in advance.

 

Best regards, 

 

Yannick

13 REPLIES 13
Highlighted

Re: Get-NcVolSize command not reporting volsize correctly when > 1024GB using Ontap Powershell T

Can you show us the command you're running and the output where the volume size is reported incorrectly (sanitizing volume/vserver names as necessary)? 

 

Thanks! 

 

Donny

Highlighted

Re: Get-NcVolSize command not reporting volsize correctly when > 1024GB using Ontap Powershell T

here is the command i use (very simple) : 

 

Get-NcVolSize  <volume name> -VserverContext <vservername>

 

 

when the volume is under or equal to 1024 (return in json format) : 

"VolumeSize": 548682072064,
"IsReadOnlyFlexVol": false,
"IsReplicaFlexVol": false,
"IsFixedSizeFlexVol": false

 

when the volume is above 1024 (here set to 1025) (return in json format) : 

 

"VolumeSize": 0,
"IsReadOnlyFlexVol": false,
"IsReplicaFlexVol": false,
"IsFixedSizeFlexVol": false

 

 

Highlighted

Re: Get-NcVolSize command not reporting volsize correctly when > 1024GB using Ontap Powershell T

Hello Donny,

 

Is the last informations I give sufficient?

 

Did you have reproduce my issue?

  

thanks in advance,

Highlighted

Re: Get-NcVolSize command not reporting volsize correctly when > 1024GB using Ontap Powershell T

I am not able to replicate this issue, unfortunately. However, I do not have a system running 9.4 available to determine if it is something specific with that version - I have 9.3 in production and 9.6 in the lab; neither of them exhibit the same issue with version 9.6 of the PS Toolkit. 

Highlighted

Re: Get-NcVolSize command not reporting volsize correctly when > 1024GB using Ontap Powershell T

thank you for the tests.

 

During september I will update my FAS in 9.5 or 9.6, I'll retry test after that and update the thread.

 

Highlighted

Re: Get-NcVolSize command not reporting volsize correctly when > 1024GB using Ontap Powershell T

Hello, 

 

I've updated my FAS Arrays during september as I said i my earlier post, but I observe the same issue....

 

FAS2620 in 9.5P7

powershell module : 9.6.0

powershell server : Windows 2012R2 (6.3.9600)

Highlighted

Re: Get-NcVolSize command not reporting volsize correctly when > 1024GB using Ontap Powershell T

@donny_lang  Can you please help @lafoucrier 

 

 

Thanks

Rajesh

Highlighted

Re: Get-NcVolSize command not reporting volsize correctly when > 1024GB using Ontap Powershell T

Hi Donny,

 

I've updated my FAS Arrays during september as I said i my earlier post, but I observe the same issue, is there any other test I can do to debug the situation (or maybe au workaround with another cmdlet)?

 

thanks in advance,

FAS2620 in 9.5P7

powershell module : 9.6.0

powershell server : Windows 2012R2 (6.3.9600) or Windows 2016

 

regards

 

Highlighted

Re: Get-NcVolSize command not reporting volsize correctly when > 1024GB using Ontap Powershell T

Sorry for the delay. On the larger than 1024GB volume, can you try to collect the volume size from Get-NcVol instead to see if that works:

 

Get-NcVol -Vserver <vserver> -Volume <volume> | fl TotalSize

It'll (theoretically) report the volume size in bytes, which should be a non-zero number. If that doesn't work, we can try to query it via the ZAPI call directly with Invoke-NcSystemApi and see if that yields any different output. 

 

 

Highlighted

Re: Get-NcVolSize command not reporting volsize correctly when > 1024GB using Ontap Powershell T

Hi Donny,

 

Thank you, this command works well.

 

What i'm trying to do initialy was a 

 

Set-NcVolSize -NewSize <newSize> -Name <volname> -VserverContext <vservename>

 

but this command fail with the same behaviour as Get-NcVolSize

 

Do you also have a command to bypass this one?

 

thanks in advance

 

Yann

Highlighted

Re: Get-NcVolSize command not reporting volsize correctly when > 1024GB using Ontap Powershell T

Try with Invoke-NcSystemApi like this:

 

$Volume = "<your volume>"
$NewSize = "<desired size>"
$Vserver = "<your SVM>"

$Request = @"

  <volume-size>
    <new-size>$NewSize</new-size>
    <volume>$Volume</volume>
  </volume-size>

"@

Invoke-NcSystemApi -Request $Request -VserverContext $Vserver
Highlighted

Re: Get-NcVolSize command not reporting volsize correctly when > 1024GB using Ontap Powershell T

Thank You Donny, your workaround is working.

 

any idea why both commandlet Get-NcVolSize an Set-NcVolSize will fail in my context?

 

thanks

 

Yann

Highlighted

Re: Get-NcVolSize command not reporting volsize correctly when > 1024GB using Ontap Powershell T

Glad it's working! 

 

If I had to guess, I'd say it is a strange bug in the module for those two cmdlets. 

Try the NEW Knowledgebase!
NetApp KB Site
Forums