Skip to main content
Pure Technical Services

How-To: Creating Volumes from Protection Group Snapshots with SDK v1

Currently viewing public documentation. Please login to access the full scope of documentation.

This article is for the PowerShell SDK version 1.

Problem

Not using the correct name of the Protection Group snapshot source to create a new volume. 

Solution

When creating new volumes (Copy Volume) from a Protection Group snapshot, the naming convention is the devil in the details. Below is an example using the Pure Storage PowerShell SDK.

# Connect to FlashArray.
$f = New-PfaArray -EndPoint 10.0.0.1 -Credentials (Get-Credential) -IgnoreCertificateError

# OPTIONAL -- Used to illustrate all of the volume snapshots.
# Get all the volume snapshots, this will include PGroups. 
Get-PfaAllVolumeSnapshots -Array $f | ft -a

# Pick a specific Pgroup snapshot. Name of snapshot is FLASHARRAYNAME:PGROUPNAME.SNAPSHOT_NAME
$PgroupSnapSource = Get-PfaVolumeSnapshots -Array $f -volumename 'solutions-lab-bfs-405-c09-20:z-nightly-replica-to-PureTEC.157.arvnd-Boot-Lun-05'

# Create a volume from the Pgroup source.
New-PfaVolume -Array $f -Source $PgroupSnapSource.name -VolumeName 'barkz-test'

# Validate the volume has been created.
Get-PfaVolume -Array $f -Name 'barkz-test'

Output example:

source                                   serial                   created              name                                                                                        size
------                                   ------                   -------              ----                                                                                        ----
Mark-sql-dev-SQL-Data-Log                73E940225A2A52BB0002CA81 2016-08-03T00:50:56Z Mark-sql-dev-SQL-Data-Log.Mark-sql-dev-SQL-Data-Log                                1099511627776
Mark-sql-dev-SQL-System                  73E940225A2A52BB0002CA82 2016-08-03T00:51:15Z Mark-sql-dev-SQL-System.Mark-sql-dev-SQL-System                                     214748364800
Mark-sql-dev-SQL-Temp                    73E940225A2A52BB0002CA83 2016-08-03T00:51:34Z Mark-sql-dev-SQL-Temp.Mark-sql-dev-SQL-Temp                                         536870912000
old-Mark-Bootlun-03-2016TP5              73E940225A2A52BB0002CEEF 2016-08-04T23:47:25Z old-Mark-Bootlun-03-2016TP5.Mark-Bootlun-Rep                                        161061273600
old-Mark-Bootlun-04-2016tp5              73E940225A2A52BB0002CEF0 2016-08-04T23:47:25Z old-Mark-Bootlun-04-2016tp5.Mark-Bootlun-Rep                                        161061273600 
.......LOTS OF SNAPSHOTS......
Barkz-Bootlun-03-WS2016-DC-GUI-3         73E940225A2A52BB0003D19D 2017-10-19T17:39:00Z z-nightly-replica-to-PureTEC.157.Barkz-Bootlun-03-WS2016-DC-GUI-3                   161061273600
Barkz-Bootlun-04-WS2016-DC-GUI-4         73E940225A2A52BB0003D19E 2017-10-19T17:39:00Z z-nightly-replica-to-PureTEC.157.Barkz-Bootlun-04-WS2016-DC-GUI-4                   161061273600
Barkz-Bootlun-02-WS2016-DC-GUI-2         73E940225A2A52BB0003D19F 2017-10-19T17:39:00Z z-nightly-replica-to-PureTEC.157.Barkz-Bootlun-02-WS2016-DC-GUI-2                   161061273600
Barkz-Bootlun-05-WS2016-DC-GUI-5         73E940225A2A52BB0003D1A0 2017-10-19T17:39:00Z z-nightly-replica-to-PureTEC.157.Barkz-Bootlun-05-WS2016-DC-GUI-5                   161061273600
TBL-CH6-Somu-SVR05-BootLun-OEL           73E940225A2A52BB0003D19A 2017-10-19T17:39:00Z z-nightly-replica-to-PureTEC.157.TBL-CH6-Somu-SVR05-BootLun-OEL                     107374182400
TBL-CH6-Somu-SRV02-BootLun-RHEL          73E940225A2A52BB0003D19B 2017-10-19T17:39:00Z z-nightly-replica-to-PureTEC.157.TBL-CH6-Somu-SRV02-BootLun-RHEL                    107374182400
arvnd-Boot-Lun-05                        73E940225A2A52BB0003D19C 2017-10-19T17:39:00Z z-nightly-replica-to-PureTEC.157.arvnd-Boot-Lun-05                                   75161927680
TBL-BootLun-CH6-SRV06-OEL                73E940225A2A52BB0003D1A4 2017-10-19T17:39:00Z z-nightly-replica-to-PureTEC.157.TBL-BootLun-CH6-SRV06-OEL                          107374182400
CH3-Mark-Linux-Svr6-Bootlun              73E940225A2A52BB0003D1A5 2017-10-19T23:38:19Z CH3-Mark-Linux-Svr6-Bootlun.CH3-Mark-Linux-Svr6-Bootlun-Snap-Base                   322122547200

source  : arvnd-Boot-Lun-05
serial  : 73E940225A2A52BB0003D1A7
created : 2017-10-19T17:39:00Z
name    : barkz-test2
size    : 75161927680

name           : barkz-test2
created        : 2017-10-19T17:39:00Z
source         : arvnd-Boot-Lun-05
time_remaining : 
serial         : 73E940225A2A52BB0003D1A7
size           : 75161927680