Skip to content

Compute / Overview

Instance storage

Updated · 3 min read

How an instance's durable root disk is created and sized at launch, and how extra volumes attach to a running or stopped instance.

On this page5 sections

Every instance boots from a root disk that the launch creates from the image. On top of that, you can attach volumes you created yourself. All of an instance’s volumes are durable network storage that isn’t tied to any machine, so an instance can stop, start and move between machines without losing data.

The following table shows where an instance’s disks come from.

FromStepTo
Imagelaunch copiesRoot disk of the instance
Volume you createdattachInstance
InstancedetachVolume you created

Key concepts

ConceptMeaning
Root diskThe volume the instance boots from. The launch creates it by copying the image onto it. It can’t be detached, and it’s deleted when the instance terminates.
Attached volumeA volume you created and attached. It outlives the instance: termination releases it rather than deleting it. See Attach and detach volumes.
Storage backendInstance volumes use the pvs backend: durable, network-attached storage. A launch that asks for host_local is refused immediately, naming the field, and creates nothing.

Sizing the root disk

By default the root disk is exactly as large as the image, which for a platform-provided image is enough for the operating system and little else. Ask for more at launch with bootVolume on launchInstance, or --boot-volume-size-gib and --boot-volume-storage-class on origin compute launch-instance. Size and storage class are independent, and both are optional.

  • The image’s size is the minimum. A smaller size is refused rather than raised. The error names the field and the smallest size that works.
  • You get and pay for exactly the size you ask for. Most images grow their root file system to fill the disk on first boot. That behavior belongs to the image, so check inside the guest if it matters.
  • The storage class is checked against the live catalog. Read it with origin storage list-storage-classes or the pvs.storageClasses query, and pick one whose available is true. A class that doesn’t exist is refused as invalid input. One that exists but isn’t on sale is refused with PRODUCT_UNAVAILABLE. See Storage classes.
  • It counts against your storage quota at launch. A launch that would take the organization or project past its volume storage limit is refused up front, naming the quota. See Limits.

You can’t change the root disk’s storage class after launch. To grow it later, resize the volume, which only grows. See Resize a volume. Both are reasons to ask for what you need at launch.

What you can do

Limits and quotas

See Limits.