Skip to content

Volumes

Encrypted block storage volumes, their types, sizes and provisioned IOPS and throughput, growing them live, and what happens when an instance terminates.

Updated View as Markdown

A volume is a block storage disk in a project. Every instance has a root volume, made from its image at launch, and can have more. In the console, open Compute, then Volumes.

Volume types

A volume type sets a volume’s size range and performance. The types your organization can use are on the Create volume dialog’s Type list, and in ListOrganizationVolumeTypes (ezgh compute volume-types list):

Field Meaning
name, displayName What you create it by, and its description
sizeGiB.min, sizeGiB.max The sizes it allows
baseline.iops, baseline.throughputMBps What every volume of the type gets, whatever its size
maximum.iops, maximum.throughputMBps The most a volume can be provisioned with
ratios.maxIopsPerGiB The most IOPS per GiB of size
ratios.maxMBpsPerIops The most MB/s per provisioned IOPS
burst.factor, burst.seconds How far above its limits a volume can burst, and for how long
default The type a launch uses when rootVolume.volumeType is left out
status active, or deprecated: existing volumes keep working, new ones are refused

Throughput is in MB/s, 10⁶ bytes per second.

Performance

A volume gets its type’s baseline IOPS and throughput unless you provision more, from the baseline up to the type’s maximum, at most maxIopsPerGiB × its size in IOPS, and at most maxMBpsPerIops × its IOPS in MB/s. The console shows the range under IOPS and Throughput (MB/s) for the size you chose. A volume can burst to burst.factor times its limits, up to the type’s maximum, for burst.seconds.

An instance’s volumes together also stay within its instance type’s storage.iops and storage.throughputMBps.

Create a volume

In the console, choose Create volume: a name, Empty or From a snapshot, the size (100 GiB to start), the type, and optionally IOPS and throughput. With the API, CreateVolume takes source.kind empty (with sizeBytes and volumeType), image (an image alias) or snapshot (see Snapshots). Sizes in the API are bytes, as decimal strings. From the CLI:

ezgh compute volumes create data --type <type> --size-gib 100 --iops 3000 --throughput 125 --wait
ezgh compute volumes create restored --snapshot nightly

A create answers 202 with a CreateVolume operation and the volume in creating. A launch creates the root volume and any new volumes it names; see Instances. A new volume is attached to an instance with AttachVolume, while the instance is stopped or running.

State Meaning
Creating Being created or copied; the console shows the percentage done
Available Ready, not attached
In use Attached to an instance, running or stopped
Modifying A size or performance change is being applied
Deleting Being deleted
Failed The create failed (failureReason). Delete it

While a running instance attaches or detaches it, an in-use volume’s attachment.state is attaching or detaching, and the console shows Attaching or Detaching; otherwise it’s attached.

Modify a volume

Modify (console) or ModifyVolume grows a volume or changes its IOPS and throughput, live, attached or not. Sizes only grow. One change runs at a time (409 operation_in_progress); modification shows it while it’s applied.

ezgh compute volumes modify data --size-gib 200
ezgh compute volumes modify data --iops 6000 --throughput 250

After growing a volume, grow its partition and file system in the guest, for example with growpart and resize2fs or xfs_growfs.

Encryption

Every volume is encrypted at rest with its own key, always. There’s nothing to turn on, and the volume’s page shows Encryption: Platform keys (encryption.keyManagement: platform).

Delete on termination

A volume attached to an instance has attachment.deleteOnTermination, on its page as On termination: Deleted with the instance or Kept. The root volume and the volumes a launch created are deleted with the instance; volumes you attached are kept unless you attached them with deleteOnTermination: true.

Deletion protection

A volume with deletionProtection: true can’t be deleted (409 deletion_protection_enabled) until it’s turned off. Set it with UpdateVolume or at create (ezgh compute volumes update data --deletion-protection=true, or --deletion-protection on ezgh compute volumes create); the console shows it as Deletion protection Yes or No.

Delete a volume

An attached volume can’t be deleted (409 volume_in_use): terminate its instance, or detach it first. Deleting (ezgh compute volumes delete data) answers 202 with a DeleteVolume operation. The data is gone for good; the volume’s snapshots are kept.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close