Volume Groups

The Oracle Cloud Infrastructure Block Volume service provides you with the capability to group together multiple volumes in a volume group. A volume group can include both types of volumes, boot volumes, which are the system disks for your Compute instances, and block volumes for your data storage. You can use volume groups to create volume group backups and clones that are point-in-time and crash-consistent.

This simplifies the process to create time-consistent backups of running enterprise applications that span multiple storage volumes across multiple instances. You can then restore an entire group of volumes from a volume group backup.

Similarly, you can also clone an entire volume group in a time-consistent and crash-consistent manner. A deep disk-to-disk and fully isolated clone of a volume group, with all the volumes associated in it, becomes available for use within a matter of seconds. This speeds up the process of creating new environments for development, quality assurance, user acceptance testing, and troubleshooting.

For more information about Block Volume-backed system disks, see Boot Volumes. For more information about Block Volume backups see Overview of Block Volume Backups. See Cloning a Volume for more information about Block Volume clones.

This capability is available using the Console, command line interface (CLI), SDKs, or REST APIs.

Volume groups and volume group backups are high-level constructs that allow you to group together multiple volumes. When working with volume groups and volume group backups, keep the following in mind:

  • You can only add a volume to a volume group when the volume status is available.

  • You can add up to 32 volumes in a volume group, up to a maximum size limit of 128 TB. For example, if you wanted to add 32 volumes of equal size to a volume group, the maximum size for each volume would be 4 TB. Or you could add volumes that vary in size, however the overall combined size of all the block and boot volumes in the volume group must be 128 TB or less. Make sure you account for the size of any boot volumes in your volume group when considering volume group size limits.

  • Each volume may only be in one volume group.

  • When you clone a volume group, a new group with new volumes are created. For example, if you clone a volume group containing three volumes, once this operation is complete, you will now have two separate volume groups and six different volumes with nothing shared between the volume groups.

  • When you update a volume group using the CLI, SDKs, or REST APIs you need to specify all the volumes to include in the volume group each time you use the update operation. If you do not include a volume ID in the update call, that volume will be removed from the volume group.

  • When you delete a volume group the individual volumes in the group are not deleted, only the volume group is deleted.

  • When you delete a volume that is part of a volume group you must first remove it from the volume group before you can delete it.

  • When you delete a volume group backup, all the volume backups in the volume group backup are deleted.

Warning

Avoid entering confidential information when assigning descriptions, tags, or friendly names to your cloud resources through the Oracle Cloud Infrastructure Console, API, or CLI.

Required IAM Policy

To use Oracle Cloud Infrastructure, you must be given the required type of access in a policy  written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you try to perform an action and get a message that you don’t have permission or are unauthorized, confirm with your administrator the type of access you've been granted and which compartment  you should work in.

For administrators: The policy in Let volume admins manage block volumes, backups, and volume groups lets the specified group do everything with block volumes, backups, and volume groups.

See the following policy examples for working with volume groups:

Tip

When users create a backup from a volume or restore a volume from a backup, the volume and backup don't have to be in the same compartment . However, users must have access to both compartments.
If you're new to policies, see Getting Started with Policies and Common Policies. For reference material about writing policies for instances, cloud networks, or other Core Services API resources, see Details for the Core Services.

Tagging Resources

You can apply tags to your resources to help you organize them according to your business needs. You can update the resource later with the desired tags. For general information about applying tags, see Resource Tags.

Using the Console

To create a volume group from existing volumes
  1. Open the navigation menu. Under Core Infrastructure, go to Block Storage and click Volumes Groups.
  2. Click Create Volume Group.
  3. Fill in the required volume information:
    • Name: A user-friendly name or description.
    • Compartment: The compartment for the volume group.
    • Availability Domain: The availability domain for the volume group.
    • Volumes: For each volume you want to add, select the compartment containing the volume and then the volume to add. Click + Volume to add additional volumes.
  4. Click Create Volume Group.
To view the volumes in a volume group
  1. Open the navigation menu. Under Core Infrastructure, go to Block Storage and click Volumes Groups.
  2. In the Volume Groups list, click the volume group you want to view the volumes for.
  3. To view the block volumes for the volume group, in Resources, click Block Volumes.
  4. To view the boot volumes for the volume group, in Resources, click Boot Volumes.
To add block volumes to an existing volume group
  1. Open the navigation menu. Under Core Infrastructure, go to Block Storage and click Volumes Groups.
  2. In the Volume Groups list, click the volume group you want to add the volume to.
  3. In Resources, click Block Volumes.
  4. Click Add Block Volumes.

  5. For each block volume you want to add, select the compartment containing the volume and then select the volume to add. Click + Volume to add additional volumes.

  6. Once you have selected all the block volumes to add to the volume group, click Add.

To remove block volumes from an existing volume group
  1. Open the navigation menu. Under Core Infrastructure, go to Block Storage and click Volumes Groups.
  2. In the Volume Groups list, click the volume group you want to add the volume to.
  3. In Resources, click Block Volumes.
  4. In Actions menu for the block volume you want to remove, click Remove.

  5. In the Confirm dialog, click Remove.

Note

When you remove the last volume in a volume group the volume group is terminated.
To add boot volumes to an existing volume group
  1. Open the navigation menu. Under Core Infrastructure, go to Block Storage and click Volumes Groups.
  2. In the Volume Groups list, click the volume group you want to add the volume to.
  3. In Resources, click Boot Volumes.
  4. Click Add Boot Volumes.

  5. For each boot volume you want to add, select the compartment containing the volume and then select the volume to add. Click + Volume to add additional volumes.

  6. Once you have selected all the boot volumes to add to the volume group, click Add.

To remove boot volumes from an existing volume group
  1. Open the navigation menu. Under Core Infrastructure, go to Block Storage and click Volumes Groups.
  2. In the Volume Groups list, click the volume group you want to add the volume to.
  3. In Resources, click Boot Volumes.
  4. In Actions menu for the boot volume you want to remove, click Remove.

  5. In the Confirm dialog, click Remove.

To create a backup of the volume group
  1. Open the navigation menu. Under Core Infrastructure, go to Block Storage and click Volumes Groups.
  2. In the Volume Groups list, click Create Volume Group Backup in the Actions menu for the volume group you want to create a backup for.
To create a clone of the volume group
  1. Open the navigation menu. Under Core Infrastructure, go to Block Storage and click Volumes Groups.
  2. In the Volume Groups list, click Create Volume Group Clone in the Actions menu for the volume group you want to clone.
To delete the volume group
  1. Open the navigation menu. Under Core Infrastructure, go to Block Storage and click Volumes Groups.
  2. In the Volume Groups list, click the volume group you want to delete.
  3. On the Volume Group Details page, click Terminate.
  4. On the Terminate Volume Group dialog, click Terminate.
Note

When you delete a volume group the individual volumes in the group are not deleted, only the volume group is deleted.
To restore a volume group from a volume group backup
  1. Open the navigation menu. Under Core Infrastructure, go to Block Storage and click Volumes Group Backups.
  2. In the Volume Group Backups list, click the volume group backup you want to restore.
  3. Click Create Volume Group.
  4. Fill in the required volume information:
    • Name: A user-friendly name or description.
    • Compartment: The compartment for the volume group.
    • Availability Domain: The availability domain for the volume group.
  5. Click Create Volume Group.

Using the CLI

For information about using the CLI, see Command Line Interface (CLI).

To retrieve information about the supported operations

Open a command prompt and run the one of the following commands to retrieve the information.

  • To retrieve the supported operations for volume groups:

    oci bv volume-group --help
  • To retrieve the supported operations for volume group backups:

    oci bv volume-group-backup --help
  • To retrieve help for a specific volume group operation:

    oci bv volume-group <operation_name> --help
  • To retrieve help for a specific volume group backup operation:

    oci bv volume-group-backup <operation_name> --help

Volume Group Operations

To list the volume groups in a specified compartment

Open a command prompt and run:

oci bv volume-group list --compartment-id <compartment_ID>

For example:

oci bv volume-group list --compartment-id ocid1.compartment.oc1..<unique_ID>
To create a volume group from existing volumes

Open a command prompt and run:

oci bv volume-group create --compartment-id <compartment_ID> --availability-domain <external_AD> --source-details <Source_details_JSON>

Volume status must be available to add it to a volume group.

For example:

oci bv volume-group create --compartment-id ocid1.compartment.oc1..<unique_ID> --availability-domain ABbv:PHX-AD-1 --source-details '{"type": "volumeIds", "volumeIds":["ocid1.volume.oc1.phx.<unique_ID_1>", "ocid1.volume.oc1.phx.<unique_ID_2>"]}'
To clone a volume group from another volume group

Open a command prompt and run:

oci bv volume-group create --compartment-id <compartment_ID> --availability-domain <external_AD> --source-details <Source_details_JSON>

For example:

oci bv volume-group create --compartment-id ocid1.compartment.oc1..<unique_ID> --availability-domain ABbv:PHX-AD-1 --source-details '{"type": "volumeGroupId", "volumeGroupId": "ocid1.volumegroup.oc1.phx.<unique_ID>"}'
To restore a volume group from a volume group backup

Open a command prompt and run:

oci bv volume-group create --compartment-id <compartment_ID> --availability-domain <external_AD> --source-details <Source_details_JSON>

For example:

oci bv volume-group create --compartment-id ocid1.compartment.oc1..<unique_ID> --availability-domain ABbv:PHX-AD-1 --source-details '{"type": "volumeGroupBackupId", "volumeGroupBackupId": "ocid1.volumegroup.oc1.sea.<unique_ID>"}'
To retrieve a volume group

Open a command prompt and run:

oci bv volume-group get --volume-group-id <volume-group-ID>

For example:

oci bv volume-group get --volume-group-id ocid1.volumegroup.oc1.phx.<unique_ID>
To update display name or add/remove volumes from a volume group

Open a command prompt and run:

oci bv volume-group update --volume-group-id <volume-group_ID> --volume-ids <volume_ID_JSON>

You can update the volume group display name along with adding or removing volumes from the volume group. The volume group is updated to include only the volumes specified in the update operation. This means that you need to specify the volume IDs for all of the volumes in the volume group each time you update the volume group.

The following example changes the volume group's display name for a volume group with two volumes:

oci bv volume-group update --volume-group-id ocid1.volumegroup.oc1.phx.<unique_ID> --volume-ids '["ocid1.volume.oc1.phx.<unique_ID_1>","ocid1.volume.oc1.phx.<unique_ID_2>"]' --display-name "new display name"

If you specify volumes in the command that are not part of the volume group they are added to the group. Any volumes not specified in the command are removed from the volume group.

To delete a volume group

Open a command prompt and run:

oci bv volume-group delete --volume-group-id <volume-group_ID>

When you delete a volume group, the individual volumes in the group are not deleted, only the volume group is deleted.

For example:

oci bv volume-group delete --volume-group-id ocid1.volumegroup.oc1.phx.<unique_ID>

Volume Group Backup Operations

To list volume backup groups

Open a command prompt and run:

oci bv volume-group-backup list --compartment-id <compartment_ID>

For example:

oci bv volume-group-backup list --compartment-id ocid1.compartment.oc1..<unique_ID>
To create a volume group backup

Open a command prompt and run:

oci bv volume-group-backup create --volume-group-id <volume-group_ID>

For example:

oci bv volume-group-backup create --volume-group-id ocid1.volumegroup.oc1.phx.<unique_ID>
To retrieve a volume group backup

Open a command prompt and run:

oci bv volume-group-backup get --volume-group-backup-id <volume-group-backup_ID>

For example:

oci bv volume-group-backup get --volume-group-backup-id ocid1.volumegroupbackup.oc1.phx.<unique_ID>
To update display name for a volume group backup

Open a command prompt and run:

oci bv volume-group-backup update --volume-group-backup-id <volume-group-backup_ID> --display-name <new_display_name>

You can only update the display name for the volume group backup.

For example:

oci bv volume-group-backup update --volume-group-backup-id ocid1.volumegroupbackup.oc1.phx.<unique_ID> --display-name "new display name"
To delete a volume group backup

Open a command prompt and run:

oci bv volume-group-backup delete --volume-group-backup-id <volume-group-backup_ID>

When you delete a volume group backup, all volume backups in the group are deleted.

For example:

oci bv volume-group-backup delete --volume-group-backup-id ocid1.volumegroupbackup.oc1.phx.<unique_ID>

Using the API

For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

Use the following operations for working with volume groups:

Use the following operations for working with volume group backups: