Creating volumes on the FlashArray is very simple because we remove all of the complexities of needing to define RAID groups or aggregates. All of the below examples of how to work with volumes assumes that an existing connection to the Everpure FlashArray has been created using the How-To: Connect to a FlashArray with the PowerShell SDK v2 topic.
The PowerShell SDK version 2 does not require a variable for the array once a session is connected, although it can be used as shown in the examples below. A defined variable, such as
$FlashArray , would be used to perform tasks against multiple arrays connected in a single PowerShell session.
Let's first create a single volume using the
New-Pfa2Volume cmdlet. The only parameters that are required:
-
-Name-- Target volume name. -
-Provisioned-- Size in bytes of the volume.
Please be aware that the parameters have changed from the SDK version 1 to version 2 for specifying the size of the volumes to be created.
PS > New-Pfa2Volume -Array $FlashArray -Name 'SDKv2-Sample' -Provisioned 10485760
Id : cc99ed38-c8a8-4b86-974a-0994aca81831
Name : SDKv2-Sample
ConnectionCount : 0
Created : 8/7/2020 6:47:41 PM
Destroyed : False
HostEncryptionKeyStatus : none
Provisioned : 10485760
...
You can use the PowerShell common parameter of
-Verbose that shows the exact REST API call in JSON format. This is helpful when wanting to understand what exactly a cmdlet is passing to the REST API.
PS > New-Pfa2Volume -Array $FlashArray -VolumeName 'SDK-Sample' -Provisioned 10485760 -Verbose