Subscribe
Frequent Contributor
Accepted Solution

Assign snapshot policy to a volume

Hello,

Is it possible to assign an existing snapshot policy to a volume with Powershell Toolkit please?

Using PSTK 3.1 and cDOT 8.2.1.

PS E:\Scripts\bin> set-ncvoloption -Controller $TargetClusterCnt -VserverContext nas-dcwnd-wprd -name nasdcwndwprd_root -key "snapshot-policy" -value "none"

set-ncvoloption : Invalid value specified for "option-name" element within "volume-set-option": "snapshot-policy".

At line:1 char:1

+ set-ncvoloption -Controller $TargetClusterCnt -VserverContext nas-dcwnd-wprd -na ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (nas-dcwnd-cprd.san.cec.eu.int:NcController) [Set-NcVolOption], EINVAL

   IDINPUTERROR

    + FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Volume.SetNcVolOption

Kind regards,

Michel

Re: Assign snapshot policy to a volume

Can you try with

Invoke-Ncssh

or

Update-NcVol

Frequent Contributor

Re: Assign snapshot policy to a volume

That was it, thank you!

(Update-NcVol is pretty complex and would require a bit more documentation IMHO)

Re: Assign snapshot policy to a volume

Thanks for the feedback, we will look at the same.