#New-NcVolClone parameters invalid

1 messages · Page 1 of 1 (latest)

silent tree
#
PS /> Get-Command -Syntax New-NcVolClone

New-NcVolClone [-CloneVolume] <string> [-ParentVolume] <string> [[-ParentSnapshot] <string>] [-SpaceReserve <string>] [-JunctionPath <string>] [-JunctionActive <bool>] [-VolumeType <string>] [-QosPolicyGroup <string>] [-CachingPolicy <string>] [-Option <string[]>] [-Comment <string>] [-Vserver <string>] [-ParentVserver <string>] [-VserverDrProtection <string>] [-Uid <long>] [-Gid <long>] [-MatchParentStorageTier <bool>] [-Style <string>] [-SnaplockType <string>] [-VserverContext <string>] [-Controller <NcController[]>] [-ZapiCall] [-WhatIf] [-Confirm] [-ZapiRetryCount <int>] [<CommonParameters>]

PS /workspaces/ContentDev-Toolkit> $global:currentNcController        

Name                 Address           Vserver              Version
----                 -------           -------              -------
<REDACTED>           <REDACTED>        devcd1               NetApp Release 9.13.1P6: Tue Dec 05 16:06:25 UTC 2023

PS /workspaces/ContentDev-Toolkit> $global:currentNcController.Vserver
devcd1
PS /workspaces/ContentDev-Toolkit>     $Params = @{
>>       ParentSnapshot      = $snapshotName
>>       CloneVolume         = $vAppName
>>       VserverDrProtection = "unprotected"  <<<<<<<<<<
>>       JunctionPath        = $junctionPath
>>       JunctionActive      = $True
>>       Vserver             = $global:currentNcController.Vserver
>>     }
PS /> $sourceVol | New-NcVolClone @Params
New-NcVolClone: [failure]: Cannot protect volume "devcd1:CDT00235" because the parent volume is unprotected in the Vserver DR relationship. If volume requires Vserver DR protection, protect the parent volume first using the "volume modify -vserver-dr-protection protected" command. Otherwise, to create a clone without protection, specify the "-vserver-dr-protection unprotected" parameter.
PS />

This is... uh... messed up...

#

The syntax and my splat use VserverDrProtection but the error message says vserver-dr-protection. When trying to pass vserver-dr-protection:

PS /workspaces/ContentDev-Toolkit>     $Params = @{
>>       ParentSnapshot          = $snapshotName
>>       CloneVolume             = $vAppName
>>       VserverDrProtection     = "unprotected"
>>       JunctionPath            = $junctionPath
>>       JunctionActive          = $True
>>       Vserver                 = $global:currentNcController.Vserver
>>       "vserver-dr-protection" = "unprotected"
>>     }
PS /> 
PS />     $sourceVol | New-NcVolClone @Params
New-NcVolClone: A parameter cannot be found that matches parameter name 'vserver-dr-protection'.
PS />
#
PS /> Test-v3Prerequisites
[?] You are using a PowerShell version 7.3.9.
[√] PSGallery is available.
[√] PSGallery is Trusted.
[√] Repositories are available and configured correctly.
[√] VMware.PowerCLI 13.2.1.22851661
[√] NetApp.ONTAP 9.14.1.2401
----------------------------------------------------------------------------------
[√]     All the required Modules are installed in the required version
----------------------------------------------------------------------------------
passed prerequisites check
PS />