Creating Volumes from Protection Group Sources

When creating new volumes (Copy Volume) from a Protection Group snapshot when it comes to naming conventions, the devil in the details.

Creating Volumes from Protection Group Sources

Summary

Learn how to create volumes from Pure Storage Protection Group snapshots, now updated with the latest PowerShell SDK 2.16, enhanced cmdlets, and per-protection group SafeMode for improved data protection and ransomware resilience.

image_pdfimage_print

Below is an example using the PowerShell SDK . The below has also been added to the new Microsoft Platform GuidePowerShell section.

Output example:


The below PowerShell script example removes the manual task of picking a specific PGroup snapshot like in Part 1.

12345678910# Connect to FlashArray.$f = New-PfaArray -EndPoint 10.0.0.1 -Credentials (Get-Credential) -IgnoreCertificateError# Get latest PGroup Snapshots.$psoPGroup = Get-PfaAllVolumeSnapshots -Array $f | where {$_.Source -like “*Barkz-Bootlun-06-WS2016-DC-GUI-6*” -and $_.Name -like “*z-nightly-replica-to-PureTEC*”}ForEach ($PGroupSnapshot in $psoPGroup) {  If ([DateTime]($PGroupSnapshot.created) -gt (get-date).addHours(-8)) {     Write-Host $PGroupSnapshot.name ” — “ $PGroupSnapshot.created  }}

Note: You will notice that the Get-PfaAllVolumeSnapshots does not return a PSObject and the “created” field is returned as a string. Using [DateTime] I convert the string to a datetime and then compare that to get snapshots >8hrs.

Output:

12z–nightly–replica–to–PureTEC.158.Barkz–Bootlun–06–WS2016–DC–GUI–6 — 2017–10–20T15:49:00Zz–nightly–replica–to–PureTEC.159.Barkz–Bootlun–06–WS2016–DC–GUI–6 — 2017–10–20T17:39:00Z

Updated Information:

To align with the latest advancements, consider the following updates:

1. Utilizing the Latest PowerShell SDK:

  • Installation: Ensure you have the latest version of the Pure Storage PowerShell SDK installed:powershellCopyEditInstall-Module -Name PureStorage.FlashArray -Force -AllowClobber
  • Connecting to the FlashArray:powershellCopyEdit$FlashArray = Connect-PfaArray -EndPoint "your_flasharray_ip" -UserName "your_username" -Password "your_password"

2. Creating Volumes from Protection Group Snapshots:

  • Listing Protection Group Snapshots:powershellCopyEdit# Retrieve all protection group snapshots $PgroupSnapshots = Get-PfaProtectionGroupSnapshot -Array $FlashArray
  • Creating a New Volume from a Snapshot:powershellCopyEdit# Specify the source snapshot and new volume name $SourceSnapshot = "pgroup_name.snapshot_name" $NewVolumeName = "new_volume_name" # Create the new volume New-PfaVolume -Array $FlashArray -Source $SourceSnapshot -VolumeName $NewVolumeName

3. Implementing Per-Protection Group SafeMode:

  • Enabling SafeMode on a Protection Group: With the introduction of per-protection group SafeMode, you can now enable SafeMode on specific protection groups to enhance data protection:powershellCopyEdit# Enable SafeMode on a protection group Enable-PfaProtectionGroupSafeMode -Array $FlashArray -ProtectionGroupName "pgroup_name"
  • Benefits:
    • Prevents deletion or modification of snapshots within the protection group.
    • Provides granular control over data protection settings.

Conclusion:

By updating to the latest PowerShell SDK and leveraging new features like per-protection group SafeMode, administrators can enhance their data protection strategies and streamline the process of creating volumes from protection group snapshots.

enterprise strategy