Deleting a Block Volume
On Compute Cloud@Customer, you can delete a volume that is no longer needed.
You can't undo this operation. Any data on a volume is permanently deleted when the volume is deleted.
All policy-based (scheduled) backups expire. A manual backup expires if a scheduled backup of the same volume is created after the manual backup was created. To keep a volume backup indefinitely, cancel all future scheduled backups and create a manual backup before you delete the source volume. See Backing Up Block Volumes.
The result of deleting a block volume differs depending on thee following conditions:
- The volume has no backups or clones: The volume is immediately deleted and the volume capacity is returned to the system for reuse. The volume is marked TERMINATED and eventually is no longer listed.
- The volume has a backup or a clone: The volume is marked TERMINATED, but the volume is not deleted and the capacity is not returned to the system until all of the backups and clones of the volume are deleted.
- The volume is part of a DR configuration and replicating: The volume is marked TERMINATED, but the volume is not deleted and the capacity is not returned to the system until DR completes the replication.
-
Perform administrative tasks to remove any dependencies that any instances have for the block volume.
For example, ensure that no applications are accessing the volume. Unmount the volume and remove it from the
/etc/fstab
file, and so on. -
In the Compute Cloud@Customer Console navigation menu, click Block Storage, then click Block Volumes.
-
At the top of the page, select the compartment that contains the block volume that you plan to delete.
-
For the volume you plan to delete, click the Actions menu (
), then click Terminate.
-
Confirm the termination.
The block volume enters the TERMINATED state, and remains in that state for about 24 hours until it's removed.
-
Use the oci bv volume delete command and required parameters to delete a block volume.
oci bv volume delete --volume-id <volume_OCID> [OPTIONS]
For a complete list of CLI commands, flags, and options, see the Command Line Reference.
Use the DeleteVolume operation to delete a volume.
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.