Updating a Volume Group

Update a volume group in the Block Volume service. For example, add or remove block volumes or boot volumes.

When you update a volume group, you can also update its tags. For instructions, see Updating a Tag for a Single Resource. For more information about tagging, see Resource Tags.
    1. On the Volume Groups list page, select the volume group you want to update. If you need help finding the list page or the volume group, see Listing Volume Groups.
    2. On the details page, select Edit.
    3. Select Next.
    4. To add a block volume or boot volume:
      1. Select Additional Volume.
      2. Select the compartment that contains the volume that you want to add.
      3. (Optional) Select the cluster placement group for the volume you want to add.
      4. Select the volume that you want to add.
      Note

      For both block volumes and boot volumes:
      • You can't add a volume with an existing backup policy assignment to a volume group with a backup policy assignment. Remove the backup policy assignment from the volume before you add it to the volume group.
      • If any of the volumes you add to the group are configured for replication, the destination region configured for them must match the destination region you configure for the volume group. See Limitations and Considerations.
    5. Select X for the volume that want to remove.
      Note

      When you remove the last volume in a volume group, the volume group is terminated.
    6. Select Next.
    7. (Optional) Enable or disable cross-region replication.
    8. Select Next.
    9. (Optional) Add or update the backup policy for the group.
    10. Select Next.
    11. Review your changes in the Summary section.
    12. Select Save changes.
  • Use the oci bv volume-group update command and required parameters to update a volume group:

    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 must 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.

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the UpdateVolumeGroup operation and specify the volumeGroupId attribute in the request body and optionally the definedTags, displayName, freeformTags, volumeGroupReplicas, and/or volumeIds attributes in the UpdateVolumeGroupDetails resource to update a volume group.