Detaching a Volume
Detach a block volume from an instance.
When an instance no longer needs access to a volume, you can detach the volume from the instance without affecting the volume's data.
For volumes attached using iSCSI, we recommend that you unmount and disconnect the volume from the instance using
iscsiadmbefore you detach the volume. Failure to do so may lead to loss of data. See Disconnecting From a Volume for more information.
- Open the navigation menu and click Compute. Under Compute, click Instances.
- In the Instance list locate the instance. Click its name to display the instance details.
- In the Resources section on the Instance Details page, click Attached Block Volumes
- Click the next to the volume you want to detach, and then click Detach. Confirm when prompted.
Use the oci compute volume-attachment detach command and required parameters to detach a block volume from an instance:
oci compute volume-attachment detach --volume-attachment-id volume_attachment_ocid [OPTIONS]
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Run the DetachVolume operation to detach a block volume from an instance.