Skip to content

Storage / Concept

Volume states

Updated · 5 min read

The status and modification status values a volume reports, how asynchronous operations and failures show up in them, and which states are billed.

On this page7 sections

A volume reports two independent fields: status describes the volume itself, and modificationStatus describes the last resize. Creating, importing, resizing, and deleting a volume are asynchronous. The request returns as soon as the platform accepts it, and these fields tell you how the work ended.

Status

What moves a volume between status values:

  • Create or import: the volume starts CREATING, then becomes AVAILABLE, or ERROR if creation fails.
  • Attach and detach: an AVAILABLE volume becomes INUSE when attached, and AVAILABLE again when detached.
  • Delete: an AVAILABLE or ERROR volume moves to DELETING, then DELETED, or to ERROR if deletion fails. An INUSE volume moves to DELETING when its instance is terminated (see below).
StatusMeaningBilledCounts against quota
CREATINGThe platform is provisioning the volume.NoYes
AVAILABLEThe volume exists and isn’t attached to an instance.YesYes
INUSEThe volume is attached to an instance. claimRef names the attachment.YesYes
DELETINGThe platform is removing the volume.NoYes
DELETEDThe volume is gone.NoNo
ERRORCreating or deleting the volume failed. statusReason says what failed.NoYes

An INUSE volume moves to DELETING only when the instance it’s attached to is terminated and the volume is set to be deleted with it. A delete you request yourself is refused while the volume is attached. See Delete a volume.

To see which instance holds an INUSE volume, see Find the instance a volume is attached to.

When an operation fails

A failed operation never reports success. The volume tells you what happened:

  • A volume that couldn’t be created ends in ERROR instead of AVAILABLE. It has no usable disk behind it. Delete it and create a new one.
  • A volume that couldn’t be deleted stays in your volume list as ERROR instead of reaching DELETED. Its disk may still exist, so it still counts against your quota. Delete it again once the cause is resolved.

statusReason is null for every status except ERROR. When set, it has the form the operation failed (<code>), for example the operation failed (ERR_IMPORT). For the codes an import can report, see Import a disk image as a volume.

Requests the platform can tell are invalid up front, such as deleting an attached volume or shrinking a volume, are refused immediately with an error. They never reach ERROR, and nothing about the volume changes.

Modification status

How modificationStatus tracks a resize: a resize moves it from COMPLETED to RESIZING. When the size is applied it returns to COMPLETED; if the resize fails it moves to FAILED, and another resize moves it to RESIZING again.

ValueMeaning
COMPLETEDNo resize is in progress. The last resize, if any, was applied.
RESIZINGA resize is in progress. pendingSizeInGib shows the target size.
FAILEDThe last resize wasn’t applied. modificationStatusReason says why.
MODIFYINGA modification is in progress on a volume that reports no target size. Treat it like RESIZING.

sizeInGib changes only after the platform confirms the new size, so it’s always a size the disk really has. While a resize runs, compare sizeInGib with pendingSizeInGib to tell “still in progress” from “didn’t happen”. A failed resize leaves the volume’s data and sizeInGib untouched. For details, see Resize a volume.

Settled states

A state that has settled stays settled. Only something you do next changes it:

  • A DELETED volume never reappears in your list and never returns to ERROR.
  • An ERROR volume leaves that state only through another delete.
  • A FAILED resize keeps its modificationStatusReason until you request another resize.

Deleted volumes

A deleted volume drops out of your volume list immediately. You can still look it up by its URN with origin storage get-volume or the pvs.volume query, with no time limit, and it reports DELETED.

A volume that outlived its instance

When you terminate an instance, the volumes created with it are normally deleted too. If one of them can’t be deleted, most often because a snapshot of it still exists, the platform keeps the volume instead of failing the termination. The volume is AVAILABLE, it’s yours, and it’s billed.

retentionNote on the volume explains why it was kept. It’s null on every other volume, including volumes you created yourself. To remove a kept volume, delete its snapshots and then the volume. See Delete a volume.