You can detach the storage volume from an instance. If the instance is in the running
state, then you must first unmount the storage volume in the instance. Log in to the instance, identify the storage volume, and unmount the storage volume using the command umount path-to-disk-mount-point
.
Note:
You cannot delete a storage volume that was attached while creating an instance.Use the following command to detach a storage volume from an instance:
oracle-compute delete storageattachment attachment_name
For more information, see CLI Reference for Oracle Compute Cloud Service.
To detach a storage volume from an instance using the API, use the DELETE https://api.oc.example.com/storage/attachment/name
method.
For more information, see REST API Reference for Oracle Compute Cloud Service.