Examples
End to End Walkthrough of SBR
The following example will walk through
- Creating 3 volumes at a source site
- Enabling replication
- Adding the volumes to a volume group
- Onboarding the volumes at the target site
- Cloning the Volumes for DR Testing
- Failing over the volumes to allow access at the target site
- Failing back the volumes (replicating data back to the original site)
See which pools in the region are Replication Capable.
❯ pcloud compute volumes list-pools
Pool Name Storage Type Max Allocation Size Total Capacity Replication Capable
General-Flash-006 ssd 14695 20480 false
General-Flash-001 ssd 35205 45056 true
General-Flash-006 standard 14695 20480 false
General-Flash-001 standard 35205 45056 true
General-Flash-001
is used for this example, and 3 volumes are created with a type of SSD
❯ pcloud compute volumes create demo-vol1 -s 100 -T ssd -p General-Flash-001
VolumeID Name Size StorageType State Shareable Bootable Volume Pool Replication Status Mirroring State
4dbdcd7e-7abb-4142-88f1-7986b7acb05e demo-vol1 100 ssd creating false false General-Flash-001
1 Volume(s) created
❯ pcloud compute volumes create demo-vol2 -s 100 -T ssd -p General-Flash-001
VolumeID Name Size StorageType State Shareable Bootable Volume Pool Replication Status Mirroring State
bc15743f-3f7c-46f5-85a1-f6e58a500aaa demo-vol2 100 ssd creating false false General-Flash-001
1 Volume(s) created
❯ pcloud compute volumes create demo-vol3 -s 100 -T ssd -p General-Flash-001
VolumeID Name Size StorageType State Shareable Bootable Volume Pool Replication Status Mirroring State
d58550e6-c2ee-449f-be94-60abf42b8f30 demo-vol3 100 ssd creating false false General-Flash-001
1 Volume(s) created
Enable Replication on the new volumes
❯ pcloud compute volumes replication enable demo-vol1
replication enable request in process
❯ pcloud compute volumes replication enable demo-vol2
replication enable request in process
❯ pcloud compute volumes replication enable demo-vol3
replication enable request in process
❯ pcloud compute volumes describe demo-vol1
Describe the volumes, and see they’re enabled for replication,
note the mirroringState: inconsistent_copying
. Wait for that to be
consistent_copying
before proceeding.
volumeID: 4dbdcd7e-7abb-4142-88f1-7986b7acb05e
name: demo-vol1
cloudID: 75b10103873d4a1ba0d52b43159a2842
storageType: ssd
size: 100
shareable: false
bootable: false
state: available
instanceIDs: []
creationDate: "2025-05-09T20:24:42.000Z"
updateDate: "2025-05-09T20:25:46.000Z"
ioThrottleRate: 1000 iops
wwn: "600507681281026650000000000004E4"
volumePool: General-Flash-001
volumeType: SSD-General-Flash-001-DR
replicationStatus: enabled
mirroringState: inconsistent_copying
auxVolumeName: aux_volume-demo-vol1-4dbdcd7e-7abb84886785
masterVolumeName: volume-demo-vol1-4dbdcd7e-7abb
groupID: ""
❯ pcloud compute volumes describe demo-vol2
volumeID: bc15743f-3f7c-46f5-85a1-f6e58a500aaa
name: demo-vol2
cloudID: 75b10103873d4a1ba0d52b43159a2842
storageType: ssd
size: 100
shareable: false
bootable: false
state: available
instanceIDs: []
creationDate: "2025-05-09T20:25:03.000Z"
updateDate: "2025-05-09T20:25:52.000Z"
ioThrottleRate: 1000 iops
wwn: "600507681281026650000000000004E5"
volumePool: General-Flash-001
volumeType: SSD-General-Flash-001-DR
replicationStatus: enabled
mirroringState: inconsistent_copying
auxVolumeName: aux_volume-demo-vol2-bc15743f-3f7c84886785
masterVolumeName: volume-demo-vol2-bc15743f-3f7c
groupID: ""
❯ pcloud compute volumes describe demo-vol3
volumeID: d58550e6-c2ee-449f-be94-60abf42b8f30
name: demo-vol3
cloudID: 75b10103873d4a1ba0d52b43159a2842
storageType: ssd
size: 100
shareable: false
bootable: false
state: available
instanceIDs: []
creationDate: "2025-05-09T20:25:13.000Z"
updateDate: "2025-05-09T20:25:55.000Z"
ioThrottleRate: 1000 iops
wwn: "600507681281026650000000000004E7"
volumePool: General-Flash-001
volumeType: SSD-General-Flash-001-DR
replicationStatus: enabled
mirroringState: inconsistent_copying
auxVolumeName: aux_volume-demo-vol3-d58550e6-c2ee84886785
masterVolumeName: volume-demo-vol3-d58550e6-c2ee
groupID: ""
Look for consistent_copying
for all volumes before proceeding.
volumeID: 4dbdcd7e-7abb-4142-88f1-7986b7acb05e
name: demo-vol1
cloudID: 75b10103873d4a1ba0d52b43159a2842
storageType: ssd
size: 100
shareable: false
bootable: false
state: available
instanceIDs: []
creationDate: "2025-05-09T20:24:42.000Z"
updateDate: "2025-05-09T20:25:46.000Z"
ioThrottleRate: 1000 iops
wwn: "600507681281026650000000000004E4"
volumePool: General-Flash-001
volumeType: SSD-General-Flash-001-DR
replicationStatus: enabled
mirroringState: consistent_copying
auxVolumeName: aux_volume-demo-vol1-4dbdcd7e-7abb84886785
masterVolumeName: volume-demo-vol1-4dbdcd7e-7abb
groupID: ""
Once all 3 volumes are in a state of consistent_copying
, put them in
a volume group. Note all the volumes were specified at once.
❯ pcloud compute volume-groups create demo-vg --volume demo-vol1 --volume demo-vol2 --volume demo-vol3
volume group create request in process
Validate the status of the volume group to make sure it looks correct.
❯ pcloud compute volume-groups describe demo-vg
name: demo-vg
id: ec3ecc1c-de75-4095-abc7-4c1cfa74665b
availabilityZone: nova
description: rccg-ec3e-4665b
groupType: dbab3433-a138-4a68-bdd7-fd01fc113d5e
cloudID: 75b10103873d4a1ba0d52b43159a2842
replicationStatus: enabled
status: available
volumeTypes:
- 00758ee7-d99a-4b56-9723-820fd2744c47
- 25df1544-6d64-42ab-bd2a-6d915ab34f5e
volumes:
- 4dbdcd7e-7abb-4142-88f1-7986b7acb05e
- bc15743f-3f7c-46f5-85a1-f6e58a500aaa
- d58550e6-c2ee-449f-be94-60abf42b8f30
Onboard the volumes at the target site. Switch to that region’s Cloud Instance
❯ pcloud auth login
Attention: pcloud currently has a valid configuration for "Demo User" user ("demo.user@converge" mail)
If you would like to login as a different user, please run:
pcloud auth revoke
pcloud auth login
You have in your Billing Account several clouds, which cloud would you like to use:
[0]: Region1 (75b10103873d4a1ba0d52b43159a2842)
[1]: Region2 (7960a7c7cb58481388129a8c6fbd79af)
2
You are successfully logged with the following configuration:
accountID: account-id
cloudID: c6880a140bca43ca952118762d2681e7
cloudName: Region2
region: us-east4
Switched to target Cloud Instance (Region2). Operations now affect the DR Site.
Onboard the Aux volumes. Refer back to the output of describing the volumes earlier to get the Master and Auxillary Volume Names. For the demo, the onboarded volumes were given a name matching the prod side, with the suffix of -aux.
❯ pcloud compute volumes replication onboard --name demo-onboard --source 75b10103873d4a1ba0d52b43159a2842 --volume aux_volume-demo-vol1-4dbdcd7e-7abb84886785:demo-vol1-aux --volume aux_volume-demo-vol2-bc15743f-3f7c84886785:demo-vol2-aux --volume aux_volume-demo-vol3-d58550e6-c2ee84886785:demo-vol3-aux
replication onboarding request in process
Validate the volume-group with the newly onboarded volumes.
❯ pcloud compute volume-groups list
Name Volume Group ID Status Replication Status
rccg-ec3e-4665b db1ad3c3-4ed4-4070-a43b-2a66830bfc98 available enabled
Describe it to validate the state of the volume-group:
name: rccg-ec3e-4665b
id: db1ad3c3-4ed4-4070-a43b-2a66830bfc98
availabilityZone: ""
description: rccg-ec3e-4665b
groupType: 04feda3c-3e5e-4bde-abea-603ff8972aad
cloudID: 7960a7c7cb58481388129a8c6fbd79af
replicationStatus: enabled
status: available
volumeTypes:
- 3f39e8bc-874e-4611-aea5-55ee454fd58f
- 419ac126-a84e-4512-8074-cccebb701aaa
- 5762a360-7679-4e4f-b691-8a0a9b5baf8d
- b4ab63f8-3774-449f-9b0b-3af02d65b161
- f200b1e2-66d6-4219-a1d2-2ee12c22bcd8
volumes:
- 2e6ad217-6f21-46ef-9569-e85b9b68bd55
- 649bf262-d6ab-4185-ba46-324377f20142
- a5f6711c-c166-43ce-b7be-88f41dac06d9
Examine the relationship to get more information.
❯ pcloud compute volume-groups relationship rccg-ec3e-4665b
- id: "4837"
name: rcrel93
masterClusterID: 00000204A0409994
masterClusterName: ""
masterVdiskID: "465"
masterVdiskName: volume-demo-vol1-4dbdcd7e-7abb
auxClusterID: 00000204A0609988
auxClusterName: stg2a1stor201
auxVdiskID: "4837"
auxVdiskName: aux_volume-demo-vol1-4dbdcd7e-7abb84886785
primary: master
consistencyGroupID: "27"
consistencyGroupName: rccg-ec3e-4665b
state: consistent_copying
bgCopyPriority: "50"
progress: "100"
copyType: global
cyclingMode: multi
masterChangeVdiskID: "465"
masterChangeVdiskName: chg_volume-demo-vol1-4dbdcd7e-7abb
auxChangeVdiskID: "4838"
auxChangeVdiskName: chg_aux_volume-demo-vol1-4dbdcd7e-7abb84886785
freezeTime: 2025/05/09/16/44/20
previousPrimary: ""
channel: none
- id: "4839"
name: rcrel94
masterClusterID: 00000204A0409994
masterClusterName: ""
masterVdiskID: "466"
masterVdiskName: volume-demo-vol2-bc15743f-3f7c
auxClusterID: 00000204A0609988
auxClusterName: stg2a1stor201
auxVdiskID: "4839"
auxVdiskName: aux_volume-demo-vol2-bc15743f-3f7c84886785
primary: master
consistencyGroupID: "27"
consistencyGroupName: rccg-ec3e-4665b
state: consistent_copying
bgCopyPriority: "50"
progress: "100"
copyType: global
cyclingMode: multi
masterChangeVdiskID: "466"
masterChangeVdiskName: chg_volume-demo-vol2-bc15743f-3f7c
auxChangeVdiskID: "4840"
auxChangeVdiskName: chg_aux_volume-demo-vol2-bc15743f-3f7c84886785
freezeTime: 2025/05/09/16/44/20
previousPrimary: ""
channel: none
- id: "4841"
name: rcrel95
masterClusterID: 00000204A0409994
masterClusterName: ""
masterVdiskID: "467"
masterVdiskName: volume-demo-vol3-d58550e6-c2ee
auxClusterID: 00000204A0609988
auxClusterName: stg2a1stor201
auxVdiskID: "4841"
auxVdiskName: aux_volume-demo-vol3-d58550e6-c2ee84886785
primary: master
consistencyGroupID: "27"
consistencyGroupName: rccg-ec3e-4665b
state: consistent_copying
bgCopyPriority: "50"
progress: "100"
copyType: global
cyclingMode: multi
masterChangeVdiskID: "467"
masterChangeVdiskName: chg_volume-demo-vol3-d58550e6-c2ee
auxChangeVdiskID: "4854"
auxChangeVdiskName: chg_aux_volume-demo-vol3-d58550e6-c2ee84886785
freezeTime: 2025/05/09/16/44/20
previousPrimary: ""
channel: none
A DR test can be performed by creating a clone of the aux volumes.
❯ pcloud compute volumes list
a5f6711c-c166-43ce-b7be-88f41dac06d9 demo-vol3-aux 100 ssd available false false General-Flash-004 enabled consistent_copying
649bf262-d6ab-4185-ba46-324377f20142 demo-vol2-aux 100 ssd available false false General-Flash-004 enabled consistent_copying
2e6ad217-6f21-46ef-9569-e85b9b68bd55 demo-vol1-aux 100 ssd available false false General-Flash-004 enabled consistent_copying
❯ pcloud compute volumes clones create demo-dr-test -v demo-vol1-aux -v demo-vol2-aux -v demo-vol3-aux
cloneName: demo-dr-test
volume(s): [demo-vol1-aux demo-vol2-aux demo-vol3-aux]
Initiated cloneTaskID e0a525d6-7b4a-4f63-8775-740accebc666
Check status with:
pcloud compute volumes clones status e0a525d6-7b4a-4f63-8775-740accebc666
❯ pcloud compute volumes list
d127f9e2-7cbb-4700-a725-711a4adfcaf7 clone-demo-dr-test-93902-2 100 ssd available false false SSD-General-Flash-004 not-capable
cdb5f7f7-6ba4-460a-ab35-f4df8bf52174 clone-demo-dr-test-93902-1 100 ssd available false false SSD-General-Flash-004 not-capable
098a8eb8-b6c1-460f-9671-3526aec653fc clone-demo-dr-test-93902-3 100 ssd available false false SSD-General-Flash-004 not-capable
a5f6711c-c166-43ce-b7be-88f41dac06d9 demo-vol3-aux 100 ssd available false false General-Flash-004 enabled consistent_copying
649bf262-d6ab-4185-ba46-324377f20142 demo-vol2-aux 100 ssd available false false General-Flash-004 enabled consistent_copying
2e6ad217-6f21-46ef-9569-e85b9b68bd55 demo-vol1-aux 100 ssd available false false General-Flash-004 enabled consistent_copying
The clone volumes can then be attached to a VM, used, and when the testing is
complete they can be deleted.
These clone-demo-dr-test-X
volumes are independent copies. Attaching and using
them for testing does not impact the ongoing replication of the original demo-volX-aux
volumes.
A fail over can be performed, and the DR volumes can be used, by stopping replication and allowing access.
❯ pcloud compute volume-groups stop rccg-ec3e-4665b --allow-read-access
volume group stop request in process
At this point volumes at BOTH sites can be modified and used
Re-enable replication, first decide which site should be the new source. For this example, the volumes will fail back, meaning the aux volume will be the new primary volume.
❯ pcloud compute volume-groups start rccg-ec3e-4665b aux
volume group start request in process
This is now copying data from the “Aux” volumes back to the “Master” volumes.
The state can be checked by looking at the relationship.
The copy direction can be determined by looking at the primary
field.
❯ pcloud compute volume-groups relationship rccg-ec3e-4665b
- id: "4837"
name: rcrel93
masterClusterID: 00000204A0409994
masterClusterName: ""
masterVdiskID: "465"
masterVdiskName: volume-demo-vol1-4dbdcd7e-7abb
auxClusterID: 00000204A0609988
auxClusterName: stg2a1stor201
auxVdiskID: "4837"
auxVdiskName: aux_volume-demo-vol1-4dbdcd7e-7abb84886785
primary: aux
consistencyGroupID: "27"
consistencyGroupName: rccg-ec3e-4665b
state: consistent_copying
bgCopyPriority: "50"
progress: "100"
copyType: global
cyclingMode: multi
masterChangeVdiskID: "465"
masterChangeVdiskName: chg_volume-demo-vol1-4dbdcd7e-7abb
auxChangeVdiskID: "4838"
auxChangeVdiskName: chg_aux_volume-demo-vol1-4dbdcd7e-7abb84886785
freezeTime: 2025/05/09/16/57/56
previousPrimary: ""
channel: none
- id: "4839"
name: rcrel94
masterClusterID: 00000204A0409994
masterClusterName: ""
masterVdiskID: "466"
masterVdiskName: volume-demo-vol2-bc15743f-3f7c
auxClusterID: 00000204A0609988
auxClusterName: stg2a1stor201
auxVdiskID: "4839"
auxVdiskName: aux_volume-demo-vol2-bc15743f-3f7c84886785
primary: aux
consistencyGroupID: "27"
consistencyGroupName: rccg-ec3e-4665b
state: consistent_copying
bgCopyPriority: "50"
progress: "100"
copyType: global
cyclingMode: multi
masterChangeVdiskID: "466"
masterChangeVdiskName: chg_volume-demo-vol2-bc15743f-3f7c
auxChangeVdiskID: "4840"
auxChangeVdiskName: chg_aux_volume-demo-vol2-bc15743f-3f7c84886785
freezeTime: 2025/05/09/16/57/56
previousPrimary: ""
channel: none
- id: "4841"
name: rcrel95
masterClusterID: 00000204A0409994
masterClusterName: ""
masterVdiskID: "467"
masterVdiskName: volume-demo-vol3-d58550e6-c2ee
auxClusterID: 00000204A0609988
auxClusterName: stg2a1stor201
auxVdiskID: "4841"
auxVdiskName: aux_volume-demo-vol3-d58550e6-c2ee84886785
primary: aux
consistencyGroupID: "27"
consistencyGroupName: rccg-ec3e-4665b
state: consistent_copying
bgCopyPriority: "50"
progress: "100"
copyType: global
cyclingMode: multi
masterChangeVdiskID: "467"
masterChangeVdiskName: chg_volume-demo-vol3-d58550e6-c2ee
auxChangeVdiskID: "4854"
auxChangeVdiskName: chg_aux_volume-demo-vol3-d58550e6-c2ee84886785
freezeTime: 2025/05/09/16/57/56
previousPrimary: ""
channel: none