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. Open the navigation menu  and select Storage. Under Block Storage, select Volume Groups.
    2. Under List scope, select the compartment that contains the volume group.
    3. In the Volume Groups list, select the volume group you want to update.
    4. Select Edit.
      The Edit volume group page opens.
    5. To add a block volume or boot volume:
      1. Select Add or remove volumes.
      2. Select + Additional Volume.
      3. Select the compartment that contains the volume that you want.
      4. Select the volume that you want.
      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.
    6. To remove a volume:
      1. Select Add or remove volumes.
      2. 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.
    7. To review changes, select Summary.
    8. (Optional) Select Tags and add one or more tags to the volume group. If you have permissions to create a resource, then you also have permissions to apply free-form tags to that resource. To apply a defined tag, you must have permissions to use the tag namespace. For more information about tagging, see Resource Tags. If you're not sure whether to apply tags, skip this option or ask an administrator. You can apply tags later.
    9. 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.