Microsoft Virtualization Discussions

Set-NaVolOption Option Names

ITINFRASTRUCTURETEAM
4,656 Views

I spent about an hour trying to figure out how to set the space guarantee option using the set-navoloption cmdlet because get-navoloption returns names like actual_guarantee and effective_guarantee, but there is no indication that the correct name to use with set-navoloption is, in fact, just "guarantee". I discovered this secret option name by finding a forum post from someone else using this exact command. Am I missing something when it comes to determining the correct option names to use with set-navoloption? I've scoured the help documentation and came up with nothing. Just want to be able to avoid this delay in the future, should I find myself in a similar scenario.

1 ACCEPTED SOLUTION

bsti
4,656 Views

Most of the options coincide directly with the output from Get-NaVolOptions.  That one was tricky.   To set volume guarantee, try:

Set-NaVolOption -Name myvol -key guarantee -value none  #  Or volume, or file

In this case, I ran vol options from the CLI and observed the option names there.  I think the actual and effective guarantees are computed values based on guarantee and other values. 

View solution in original post

4 REPLIES 4

vinith
4,656 Views

Did you try extracting the detailed help fro the cmdlet?

PS C:\Windows\system32> Get-Help Set-NaVolOption -Detailed

ITINFRASTRUCTURETEAM
4,656 Views

Absolutely, but the only option it lists is "spacereserve," but using that option name fails miserably, as seen below.

PS C:\Windows\system32>>> Set-NaVolOption $vols[0] spacereserve none

Set-NaVolOption : Invalid 'option-name': spacereserve

At line:1 char:16

+ Set-NaVolOption <<<<  $vols[0] spacereserve none

    + CategoryInfo          : InvalidOperation: (ssc-na1b:NaController) [Set-NaVolOption], EONTAPI_E

    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Volume.SetNaVolOption

bsti
4,657 Views

Most of the options coincide directly with the output from Get-NaVolOptions.  That one was tricky.   To set volume guarantee, try:

Set-NaVolOption -Name myvol -key guarantee -value none  #  Or volume, or file

In this case, I ran vol options from the CLI and observed the option names there.  I think the actual and effective guarantees are computed values based on guarantee and other values. 

ITINFRASTRUCTURETEAM
4,656 Views

Thanks for the reply. I'll keep that in my back pocket should I encountered things like this in the future.

Public