vVols Replication PowerCLI Commands

User Guides for VMware Solutions

Audience
Public
Content Type
User Guides
Source Type
Documentation

Here are the PowerCLI commands that relate to managing vVols Array based replication with storage policies. Each command has a brief explanation about what the command does. If further information is needed, please run get-help and then the name of the command that you want more information about.

Name/Concept

Explanation

Get-SpbmFaultDomain

Retrieves fault domains based on name or ID filter - Prints the Name of the FaultDomain and the VASA Provider managing it.


> Get-SpbmFaultDomain

Name                 VasaProvider
----                 ------------
sn1-m20r2-c05-36     sn1-m20r2-c05-36-ct0
sn1-x70-b05-33       sn1-x70-b05-33-ct0
sn1-x70-c05-33       sn1-x70-c05-33-ct0

Get-SpbmReplicationGroup

Retrieves the replication groups queried from the VASA Providers - Prints the Name and State of the replication groups.


> Get-SpbmReplicationGroup

Name                                      ReplicationState
----                                      ----------------
sn1-x70-b05-33:vVols-Replication          Source
sn1-x70-b05-33:x70-1-policy-ac1-light-001 Source

Get-SpbmReplicationPair

Retrieves the relation of replication groups in a pair of source & target replication group.

The Source replication group is printed as the FlashArray:pgroup-name and the target will print with the ID.


> Get-SpbmReplicationPair

Source Group                              Target Group
------------                              ------------
sn1-x70-b05-33:vVols-Replication          395a60c2-5803-40be-95b7-029b1b3ffc3e:62
sn1-x70-c05-33:x70-2-policy-ac2-light-001 35770c78-edaf-4afc-9b75-f3fb5c2acee9:9

Get-SpbmPointInTimeReplica

Retrieves the point in time replicas (array based snapshots) for a provided replication group.

Scheduled pgroup snapshots will not have a name or description.


> Get-SpbmPointInTimeReplica

Name  CreationTime         ReplicationGroup
----  ------------         ----------------
      8/25/2020 3:34:25 PM 395a60c2-5803-40be-95b7-029b1b3ffc3e:62
PiT-1 8/25/2020 3:33:48 PM 395a60c2-5803-40be-95b7-029b1b3ffc3e:62

Get-SpbmStoragePolicy

Retrieves the Storage Policies from the connect vCenter Servers.


> Get-SpbmStoragePolicy

Name                                     Description                                                                                         Rule Sets
----                                     -----------                                                                                         ---------
Pure-Demo                                                                                                                                    {(com.purestorage.storage.policy.PureFlashArray=True) AND (com.purestorage.storage.replication.RemoteReplicationInterval=00:05:00…
VVol No Requirements Policy              Allow the datastore to determine the best placement strategy for storage objects
FlashArray Snap 1 DAYS                   FlashArray Storage Policy. Snapshot every 1 Days, retained for 7 Days.                              {(com.purestorage.storage.policy.PureFlashArray=True) AND (com.purestorage.storage.replication.LocalSnapshotInterval=1.00:00:00) …
FlashArray Replication 8 HOURS           FlashArray Storage Policy. Remote Replication every 8 Hours, retained for 1 Days.                   {(com.purestorage.storage.policy.PureFlashArray=True) AND (com.purestorage.storage.replication.RemoteReplicationInterval=08:00:00…

Sync-SpbmReplicationGroup

Triggers an on demand snapshot replication job.

This is ran against the target replication group and initiated from the target FlashArray.


> Sync-SpbmReplicationGroup -ReplicationGroup '395a60c2-5803-40be-95b7-029b1b3ffc3e:62' -PointInTimeReplicaName 'PiT-3'
Sync-SpbmReplicationGroup: 8/25/2020 3:48:04 PM Sync-SpbmReplicationGroup               Error doing 'Sync' on replication group '30488813-7524-3538-868d-66c8037a6d39/395a60c2-5803-40be-95b7-029b1b3ffc3e:62'. Reason:                                                         
Error 1: Sync of the replication group is ongoing. Ongoing task ID: 'SmsTask-SmsTask-90'

> Sync-SpbmReplicationGroup -ReplicationGroup '395a60c2-5803-40be-95b7-029b1b3ffc3e:62' -PointInTimeReplicaName 'PiT-4'
Sync-SpbmReplicationGroup: 8/25/2020 3:56:26 PM Sync-SpbmReplicationGroup               Error doing 'Sync' on replication group '30488813-7524-3538-868d-66c8037a6d39/395a60c2-5803-40be-95b7-029b1b3ffc3e:62'. Reason:                                                         
Error 1: Sync of the replication group is ongoing. Ongoing task ID: 'SmsTask-SmsTask-92'
Note:

This type of error is an expected outcome for a syncReplicationGroup Task. The key here is that the "error" is saying that there is an "ongoing task". This means that a replication job was started and is now in progress. syncReplicationGroup is an async task and the Pure VASA provider will provide a task ID for async task.

The cmdlet for syncReplicationGroup in PowerShell does not process task IDs or to query the VASA Provider for the task progress.

Start-SpbmReplicationTestFailover

Performs a test failover against the target replication group - upon completion the replication group is in an INTEST state.


> Start-SpbmReplicationTestFailover -ReplicationGroup '395a60c2-5803-40be-95b7-029b1b3ffc3e:62'

[FlashArray-B-vVol-DS] rfc4122.918928d8-01aa-47f1-80cd-f31e66d5eac7/vVols-Rep-VM-1.vmx
[FlashArray-B-vVol-DS] rfc4122.fa025596-332f-4e39-82e8-8055f7b589fb/vVols-Rep-VM-2.vmx
[FlashArray-B-vVol-DS] rfc4122.f24fc678-26a4-4234-9356-3b712abbc20b/vVols-Rep-VM-3.vmx

> Get-SpbmReplicationGroup -ReplicationGroup '395a60c2-5803-40be-95b7-029b1b3ffc3e:62'

Name                                      ReplicationState
----                                      ----------------
395a60c2-5803-40be-95b7-029b1b3ffc3e:62   InTest

Start-SpbmReplicationPromote

Promotes a target replication group from InTest to FailedOver state.

   

Stop-SpbmReplicationTestFailover

Stops the test failover on the specified replication groups and performs a cleanup on the target site.


> Stop-SpbmReplicationTestFailover -ReplicationGroup '395a60c2-5803-40be-95b7-029b1b3ffc3e:62'

Name                      ReplicationState
----                      ----------------
395a60c2-5803-40be-95b7-… Target

Start-SpbmReplicationPrepareFailover

Prepares the specified replication groups to failover - this is ran against the source replication group.


> Start-SpbmReplicationPrepareFailover -ReplicationGroup 'sn1-x70-b05-33:vVols-Replication'

Start-SpbmReplicationFailover

Performs a failover of the devices in the specified replication groups.


> Start-SpbmReplicationFailover -ReplicationGroup '395a60c2-5803-40be-95b7-029b1b3ffc3e:62'

Confirm
Are you sure you want to perform this action?
Performing the operation "Starting failover on" on target "Replication group '395a60c2-5803-40be-95b7-029b1b3ffc3e:62'".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y

[FlashArray-B-vVol-DS] rfc4122.f44d3e0f-f25d-4107-bbd6-9a8c2940720b/vVols-Rep-VM-1.vmx
[FlashArray-B-vVol-DS] rfc4122.6a3f3e3c-755d-4c00-a63c-1fd4a69b1476/vVols-Rep-VM-2.vmx
[FlashArray-B-vVol-DS] rfc4122.995eff3c-630c-4ea1-bf33-2eb0f06de84d/vVols-Rep-VM-3.vmx

> Get-SpbmReplicationGroup -ReplicationGroup '395a60c2-5803-40be-95b7-029b1b3ffc3e:62'

Name                                      ReplicationState
----                                      ----------------
395a60c2-5803-40be-95b7-029b1b3ffc3e:62   FailedOver

Start-SpbmReplicationReverse

Initiates reverse replication, this will reverse the state of the replication groups from source to target and target to source.


> Start-SpbmReplicationReverse -ReplicationGroup '395a60c2-5803-40be-95b7-029b1b3ffc3e:62'

Name                      ReplicationState
----                      ----------------
sn1-x70-c05-33:r-vVols-R… Source

Now that we have the Commands that can be used let's see how a Failover workflow would look like.