Subscribe
Accepted Solution

Set-NaVolOption Option Names

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.

Re: Set-NaVolOption Option Names

Did you try extracting the detailed help fro the cmdlet?

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

Re: Set-NaVolOption Option Names

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. 

Re: Set-NaVolOption Option Names

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

Re: Set-NaVolOption Option Names

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