Summary
A volume group can be created from a list of volume IDs, another volume group (cloning), or a backup.
Reference
Create Volume Group
The sample procedure to create a volume group is:
sandbox_ocid=$( \ oci iam compartment list \ --name 'Sandbox' \ --query 'data[0].id' \ --raw-output \ ) ad_name=$( \ oci iam availability-domain list \ --compartment-id ${sandbox_ocid} \ --query 'data[0].name' \ --raw-output \ ) bv1_id=$( \ oci bv volume create \ --availability-domain ${ad_name} \ --compartment-id ${sandbox_ocid} \ --display-name "Sandbox BV 1" \ --vpus-per-gb 0 \ --size-in-gbs 50 \ --query 'data.id' \ --raw-output \ --wait-for-state AVAILABLE \ --wait-for-state TERMINATING ) bv2_id=$( \ oci bv volume create \ --availability-domain ${ad_name} \ --compartment-id ${sandbox_ocid} \ --display-name "Sandbox BV 2" \ --vpus-per-gb 0 \ --size-in-gbs 50 \ --query 'data.id' \ --raw-output \ --wait-for-state AVAILABLE \ --wait-for-state TERMINATING ) printf -v source_info \ '{"type": "volumeIds", "volumeIds": ["%s","%s"]}' \ ${bv1_id} \ ${bv2_id} oci bv volume-group create \ --availability-domain ${ad_name} \ --compartment-id ${sandbox_ocid} \ --source-details "${source_info}" \ --display-name "Sandbox Volume Group" \ --wait-for-state AVAILABLE \ --wait-for-state TERMINATING
Sample output is:
Action completed. Waiting until the resource has entered state: ('AVAILABLE', 'TERMINATING') { "data": { "availability-domain": "bPBR:AP-SYDNEY-1-AD-1", "compartment-id": "ocid1.compartment.oc1..aaaaaaaamoo6uz2qmix2adls2cgoqxxhdt4wuam3wbcrw6co6z4osweos6da", "defined-tags": { "Oracle-Tags": { "CreatedBy": "default/tenancy_admin", "CreatedOn": "2024-08-04T02:40:34.993Z" } }, "display-name": "Sandbox Volume Group", "freeform-tags": {}, "id": "ocid1.volumegroup.oc1.ap-sydney-1.abzxsljr3gsw7wjgycy7tlmrcdwleld46cdveld6zjksk246iizyfmxuvpka", "is-hydrated": null, "lifecycle-state": "AVAILABLE", "size-in-gbs": 100, "size-in-mbs": 102400, "source-details": { "type": "volumeIds", "volume-ids": [ "ocid1.volume.oc1.ap-sydney-1.abzxsljrwqx7fgldmg2hrqeqwjznizgnnurclq2qpcwbateplkifre364zpq", "ocid1.volume.oc1.ap-sydney-1.abzxsljrpgqp6n3n4vz57t6vbwt3ki2bwitrxdvnhf23pposm6jn6r23qu2q" ] }, "time-created": "2024-08-04T02:40:35.038000+00:00", "volume-group-replicas": null, "volume-ids": [ "ocid1.volume.oc1.ap-sydney-1.abzxsljrpgqp6n3n4vz57t6vbwt3ki2bwitrxdvnhf23pposm6jn6r23qu2q", "ocid1.volume.oc1.ap-sydney-1.abzxsljrwqx7fgldmg2hrqeqwjznizgnnurclq2qpcwbateplkifre364zpq" ] }, "etag": "fbbbcd5ef18b64e964d38463dcf3aa1a" }
Backup Volume Group
Use the following commands to back up the volume group created above:
vg_id=ocid1.volumegroup.oc1.ap-sydney-1.abzxsljr3gsw7wjgycy7tlmrcdwleld46cdveld6zjksk246iizyfmxuvpka comp_id=ocid1.compartment.oc1..aaaaaaaamoo6uz2qmix2adls2cgoqxxhdt4wuam3wbcrw6co6z4osweos6da oci bv volume-group-backup create \ --volume-group-id ${vg_id} \ --compartment-id ${comp_id}
The sample output is:
{ "data": { "compartment-id": "ocid1.compartment.oc1..aaaaaaaamoo6uz2qmix2adls2cgoqxxhdt4wuam3wbcrw6co6z4osweos6da", "defined-tags": { "Oracle-Tags": { "CreatedBy": "default/tenancy_admin", "CreatedOn": "2024-08-04T02:40:34.993Z" } }, "display-name": "abzxsljruzx6uqrmaitln6vxbn5c5l36ytlft7c7jtjgvgamy4rwklqy7jga", "expiration-time": null, "freeform-tags": {}, "id": "ocid1.volumegroupbackup.oc1.ap-sydney-1.abzxsljruzx6uqrmaitln6vxbn5c5l36ytlft7c7jtjgvgamy4rwklqy7jga", "lifecycle-state": "CREATING", "size-in-gbs": 100, "size-in-mbs": 102400, "source-type": "MANUAL", "source-volume-group-backup-id": null, "time-created": null, "time-request-received": "2024-08-05T16:50:15.792000+00:00", "type": "INCREMENTAL", "unique-size-in-gbs": 0, "unique-size-in-mbs": 0, "volume-backup-ids": [ "ocid1.volumebackup.oc1.ap-sydney-1.abzxsljr6snxkc2ij6rwfbv3wcihx5myxl42qgu2xdqhiowvi33ins4gnt4a", "ocid1.volumebackup.oc1.ap-sydney-1.abzxsljrmvgad5qqmngts2gtcw2d6amqwka4q3fszkgzhvsctcppn3ybbroa" ], "volume-group-id": "ocid1.volumegroup.oc1.ap-sydney-1.abzxsljr3gsw7wjgycy7tlmrcdwleld46cdveld6zjksk246iizyfmxuvpka" }, "etag": "1ac60cbdf0cf91c3d04a80dbb904fd1b" }
Clone Volume Group
Use the following commands to clone the volume group created above:
old_vg_id=ocid1.volumegroup.oc1.ap-sydney-1.abzxsljr3gsw7wjgycy7tlmrcdwleld46cdveld6zjksk246iizyfmxuvpka sandbox_ocid=$( \ oci iam compartment list \ --name 'Sandbox' \ --query 'data[0].id' \ --raw-output \ ) ad_name=$( \ oci iam availability-domain list \ --compartment-id ${sandbox_ocid} \ --query 'data[0].name' \ --raw-output \ ) printf -v source_details \ '{"type": "volumeGroupId", "volumeGroupId": "%s"}' \ ${old_vg_id} oci bv volume-group create \ --availability-domain ${ad_name} \ --compartment-id ${sandbox_ocid} \ --source-details "${source_details}" \ --display-name "Sandbox Volume Group Replica" \ --wait-for-state AVAILABLE \ --wait-for-state TERMINATING
The sample output is:
Action completed. Waiting until the resource has entered state: ('AVAILABLE', 'TERMINATING') { "data": { "availability-domain": "bPBR:AP-SYDNEY-1-AD-1", "compartment-id": "ocid1.compartment.oc1..aaaaaaaamoo6uz2qmix2adls2cgoqxxhdt4wuam3wbcrw6co6z4osweos6da", "defined-tags": { "Oracle-Tags": { "CreatedBy": "default/tenancy_admin", "CreatedOn": "2024-08-04T02:40:34.993Z" } }, "display-name": "Sandbox Volume Group Replica", "freeform-tags": {}, "id": "ocid1.volumegroup.oc1.ap-sydney-1.abzxsljrju66fkdfg524bqnh4y3md62e6dme5xbrowgzx6izbihe4i5dpt6q", "is-hydrated": null, "lifecycle-state": "AVAILABLE", "size-in-gbs": 100, "size-in-mbs": 102400, "source-details": { "type": "volumeGroupId", "volume-group-id": "ocid1.volumegroup.oc1.ap-sydney-1.abzxsljr3gsw7wjgycy7tlmrcdwleld46cdveld6zjksk246iizyfmxuvpka" }, "time-created": "2024-08-05T16:10:45.769000+00:00", "volume-group-replicas": null, "volume-ids": [ "ocid1.volume.oc1.ap-sydney-1.abzxsljr7va4wfzmnrawgebxiwhtkw7bc45mp2bex7kz4k2kgi7g5ucobpdq", "ocid1.volume.oc1.ap-sydney-1.abzxsljrliyrgjptmvii7i3yxvrzsha65m4d5pb6nflbhkvxeewp2o7ymr3q" ] }, "etag": "6ee4dd30f50eeab88759605253a84e99" }
List Volume Groups
Use the following commands to list volume groups:
sandbox_ocid=$( \ oci iam compartment list \ --name 'Sandbox' \ --query 'data[0].id' \ --raw-output \ ) oci bv volume-group list \ --compartment-id ${sandbox_ocid} \ --query 'data[*].{"Availability Domain":"availability-domain","Display Name":"display-name"}' \ --output table
The sample output is:
+-----------------------+------------------------------+ | Availability Domain | Display Name | +-----------------------+------------------------------+ | bPBR:AP-SYDNEY-1-AD-1 | Sandbox Volume Group | | bPBR:AP-SYDNEY-1-AD-1 | Sandbox Volume Group Replica | +-----------------------+------------------------------+
Oracle Defined Backup Policies
There are three Oracle defined backup policies:
Policy | Incremental Backups | Retention | ||||||
---|---|---|---|---|---|---|---|---|
Daily | Weekly | Monthly | Yearly | Daily | Weekly | Monthly | Yearly | |
Bronze | No | No | Yes | Yes | 12 mths | 5 years | ||
Silver | No | Yes | Yes | Yes | 4 weeks | 12 mths | 5 years | |
Gold | Yes | Yes | Yes | Yes | 7 days | 4 weeks | 12 mths | 5 years |
Backups are done on:
- 1 January for yearly cycle
- First of the month for monthly cycle
- Sunday for weekly cycle
Note: Full backups are no longer part of an Oracle defined backup policy. Incremental backups are functionally the same as full backups for data recovery purposes.