Forum Discussion

mzukerman's avatar
mzukerman
Novice I
4 years ago

`1` *`PS`* `>New-Pfa2Volume *-Array*` *`$FlashArray`*

`1` *`PS`* `>New-Pfa2Volume *-Array*` *`$FlashArray`* *`-Name`* `volumecopy *-Source*` *`$src -Overwrite`*

8 Replies

  • Did you create the reference object for the snap? in the current version of the SDKv2, a reference object must be created for the snap (and it is not well documented). This step will be eliminated in the next release. ```$src = New-Pfa2ReferenceObject -Id $snap.Id -Name $snap.Name New-Pfa2Volume -Name volumecopy -Source $src```
  • And I can create the new volume from this reference object, but I need to overwrite the existing volume.
  • ```$src = New-Pfa2ReferenceObject -Name overwrite_test.1 New-Pfa2Volume -Array $FA -Name overwrite_test -Source $src -Overwrite $true```
  • Curious did you get the following error with just using `-Overwrite` with no bool? ```New-Pfa2Volume : Missing an argument for parameter 'Overwrite'. Specify a parameter of type 'System.Nullable`1[System.Boolean]' and try again. At line:1 char:61 + ... ew-Pfa2Volume -Array $FA -Name overwrite_test -Source $src -Overwrite + ~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [New-Pfa2Volume], ParameterBindingException + FullyQualifiedErrorId : MissingArgument,PureStorage.Rest.PowerShell.NewVolumeCmdlet```
  • Yes, here it is: PS C:\WINDOWS\system32> New-Pfa2Volume -Array $FlashArray -Name NA01WSQLNODED11_Alarm_Data_clone -Source $src -Overwrite New-Pfa2Volume : Missing an argument for parameter 'Overwrite'. Specify a parameter of type 'System.Nullable`1[System.Boolean]' and try again. At line:1 char:87 + ... hArray -Name NA01WSQLNODED11_Alarm_Data_clone -Source $src -Overwrite + ~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [New-Pfa2Volume], ParameterBindingException + FullyQualifiedErrorId : MissingArgument,PureStorage.Rest.PowerShell.NewVolumeCmdlet