Storage / task

Find the instance a volume is attached to

A volume that reports INUSE names what holds it in claimRef: the id of a volume attachment. Follow that attachment to find the instance, for example before you detach the volume to delete it.

Before you begin

  • The volume’s URN and the URN of the project it belongs to.
  • Permission compute.instance.list on the project, the same permission that lets you list the project’s instances. See Roles.

Find the instance

  1. Read the volume’s claimRef.

    Terminal window
    origin storage get-volume --volume-urn <volume-urn>
  2. List the attachments that reference the volume.

    Terminal window
    origin compute list-volume-attachments \
    --project-urn <project-urn> --volume-urn <volume-urn>

    With the API, use the volumeAttachments query:

    query {
    compute {
    volumeAttachments(input: {
    projectUrn: "<project-urn>"
    volumeUrn: "<volume-urn>"
    }) {
    id
    instanceUrn
    deviceName
    status
    }
    }
    }
  3. Take the entry whose id equals the volume’s claimRef. Its instanceUrn is the instance, and deviceName is the device name the guest sees.

  4. Confirm by reading the instance. Its volumeAttachments include the volume.

    Terminal window
    origin compute get-instance --instance-urn <instance-urn>

Reading the attachment list

Normally the list has one entry, with status ATTACHED. Other entries appear while an attach or detach is in progress and after an attach that FAILED. An entry with status RELEASE_ABANDONED may still hold the volume: the platform has stopped trying to release it. Detached attachments aren’t listed.

A volume from another project returns an empty list, exactly like a volume that doesn’t exist.

Next steps

Origin Cloud — user documentation · last reviewed 2026-10-03 Legal notice Privacy policy