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.
| From | Step | To |
|---|---|---|
| Image | launch copies | Root disk of the instance |
| Volume you created | attach | Instance |
| Instance | detach | Volume you created |
Key concepts
| Concept | Meaning |
|---|---|
| Root disk | The 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 volume | A volume you created and attached. It outlives the instance: termination releases it rather than deleting it. See Attach and detach volumes. |
| Storage backend | Instance 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-classesor thepvs.storageClassesquery, and pick one whoseavailableistrue. A class that doesn’t exist is refused as invalid input. One that exists but isn’t on sale is refused withPRODUCT_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
- Attach and detach volumes
- Launch an instance with a larger root disk
- Find which instance holds a volume
Limits and quotas
See Limits.