Delete a volume to remove its data and stop paying for it. Deleting frees the volume’s share of your storage quota once the deletion completes. You can’t undo a delete.
Before you begin
Clear what blocks the delete
-
Check the volume’s status. If it’s
INUSE, find the instance and detach the volume. See Find the instance a volume is attached to.terminal origin storage get-volume --volume-urn <volume-urn> -
Find the volume’s snapshots. Every snapshot reports the volume it was taken from as
volumeUrn. List your project’s snapshots with the API and look for that URN:GraphQL query { pvs { snapshots(input: { projectUrn: "<project-urn>" }) { urn volumeUrn status protectionStatus } } } -
Delete each of those snapshots, unprotecting it first if needed, and wait until each reports
DELETED. See Delete a snapshot.
Delete the volume
-
Delete the volume.
terminal origin storage delete-volume --volume-urn <volume-urn>With the API, use the
deleteVolumemutation:GraphQL mutation { pvs { deleteVolume(input: { volumeUrn: "<volume-urn>" }) { accepted message } } } -
Check the volume until it reports
DELETED.terminal origin storage get-volume --volume-urn <volume-urn>A deleted volume drops out of
origin storage list-volumesat once. You can still look it up by URN, with no time limit.
What the platform refuses
These requests are refused immediately with an error, and nothing about the volume changes:
| Request | What happens |
|---|---|
| The volume is attached | The error names the attachment that holds the volume. Detach the volume, or terminate the instance, and try again. |
| The volume has snapshots | The error names each snapshot that blocks the delete. Delete those snapshots first, then try again. |
| The volume is already being deleted | A volume in DELETING or DELETED can’t be deleted again. |
You can delete a volume in ERROR. That’s how you clean up a volume whose creation or deletion failed.
If this fails
If the deletion is accepted but fails, the volume stays in your list as ERROR with a statusReason, and its disk may still exist. It still counts against your quota. Delete it again. See Troubleshoot storage.