Detaching a Storage Volume from an Instance

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.
  1. Log in to the UI and go to the Self Service Portal.
  2. In the Home tab, click an orchestration in the Services section.
    All the instances in the orchestration are displayed.
  3. In the Name column, click an instance from which you want to detach a storage volume.
  4. In the instance details page, select the volume and click Detach in the Storage section.
  5. Confirm the detach action.

Detaching a Storage Volume from an Instance Using the CLI or API

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.