Moving a Block Volume to a Different Compartment
Move a block volume in the Block Volume service to a different compartment.
When you move a block volume to a new compartment, associated Block Volume resources, such as volume backups, volume clones, and volume replicas aren't moved. After you move the block volume to the new compartment, inherent policies apply immediately and affect access to the block volume through the Console. For more information, see Managing Compartments.
When you move a block volume between compartments, ensure that users have sufficient access permissions on the compartment the block volume is being moved to.
- Open the navigation menu and select Storage. Under Block Storage, select Block Volumes.
- Under List scope, select the compartment that contains the block volume.
- In the Block Volumes list, select the name of the block volume that you want to move.
- Select Move resource.
- Choose the destination compartment from the list.
- Select Move resource.
Use the
oci bv volume change-compartment
command and required parameters to move a block volume between compartments:oci bv volume change-compartment --compartment-id compartment-ocid --volume-id volume-ocid [OPTIONS]
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Run the ChangeVolumeCompartment operation and specify the
volumeId
attribute in the request body and thecomparmentId
attribute in theChangeVolumeCompartmentDetails
resource to move a block volume to a different compartment.