Create a volume

Create a volume in the console, empty or from an image or a volume snapshot, copy an existing volume, and attach the new volume right away.

Create a volume to add storage to your project. A volume can start empty, from an image, or from a volume snapshot, or it can be a copy of another volume. You can attach it to an instance in the same step.

Before you begin

  • You need the Owner or Contributor role, or a custom role with Manage access to Block & Object Storage, on the subscription or on the project.
  • The volume counts toward the subscription's quota and the project's allocation for volumes and volume storage. A create that would exceed the subscription's quota is refused. See Block Storage limits.
  • To start from an image or a snapshot, the image or the snapshot must be Available.

Create a volume

In the console, go to StorageVolumes, and select Create volume.

In Volume name, enter a name.

In Size (GB), enter the size.

Under Type, select a volume type. See Volume types.

Under Source, select the source:

  • Empty volume: a blank volume without a file system.
  • From image: a bootable volume with the image's operating system. Select the image in Image.
  • From snapshot: a new volume with the data of a volume snapshot. Select the snapshot in Snapshot.

Optional: in Attach to instance (optional), select an instance to attach the volume to when it's created. Otherwise keep Do not attach — create detached.

Select Create volume.

The form shows the estimated monthly cost of the volume before you create it.

FieldRules
Volume name1–255 characters. It can't start or end with a space, and it can't contain control characters or characters outside the Unicode Basic Multilingual Plane, such as most emoji. Unique among the volumes of the project.
Size (GB)A whole number from 1 to 16,384. From an image, at least the image's minimum disk size. From a snapshot, at least the snapshot's size.
TypeA type that the region offers.
ImageAn image that's Available, such as a public operating system image or an image that you captured.
SnapshotA volume snapshot of the project that's Available.

When you start from a snapshot, the form doesn't accept a size smaller than the snapshot's size and raises a smaller size to it. When you select an image, the form raises a smaller size to the image's minimum disk size.

Result

The console opens the new volume's page. The status is Creating at first and then Available, or In use when you chose an instance to attach to.

  • If the volume is created but can't be attached, it stays Available, and the operation reports that the volume was created but not attached. Attach it later. See Attach and detach a volume.
  • A volume created from an image is bootable. You can create an instance that boots from it. See Boot sources.
  • A volume created from an image that you captured from an instance is made from the snapshot of that instance's OS disk, which holds the image's data.
  • If the creation fails, the volume's status is Error, and its page shows the reason. A volume whose creation fails isn't billed. Delete it when you've read the reason.

Copy a volume

Cloning creates a full, independent copy of a volume, with the same size and type.

In the console, go to StorageVolumes, and select the volume.

Select Clone, and select Clone again to confirm.

The copy is named after the source with -clone appended, for example pgdata-02-clone, and appears in the volume list.

  • The source must be Available or In use. A volume that's still being created or is in error can't be copied.
  • No other volume in the project can have the copy's name. If one does, rename it or the source first.
  • The copy counts toward the subscription's quota and the project's allocation for volumes and volume storage, and it's billed like any other volume.

Choosing the copy's name and type is available through the API only. See POST/scopes/{scopeId}/storage/volumes/{volumeId}/actions/clone.

Create a volume with the API

To create a volume with the API, use POST/scopes/{scopeId}/storage/volumes. The request takes the same fields as the form, and sourceKind selects the source: empty, image, or snapshot.

Troubleshooting

MessageCauseWhat to do
"a volume with this name already exists"Another volume in the project has this name.Enter another name.
A message that starts with "Volumes quota exceeded" or "Volume Storage quota exceeded"The volume would exceed the subscription's quota. The message names the quota ID.Delete volumes that you don't need, or request a quota increase.
"sizeGb must be at least" a size, followed by "the size of the source snapshot"The size is smaller than the snapshot.Enter at least the snapshot's size.
"sizeGb must be at least" a size, followed by "the minimum disk size of the source image"The size is smaller than the image's minimum disk size.Enter at least the minimum.
"this image carries no disk payload"The image holds no disk data that a volume can be created from.Create the volume from a snapshot of the source volume instead.
"This subscription is paused; no new resources can be provisioned until it is resumed."The subscription is paused, and a paused subscription refuses new volumes.Resume the subscription. See Pause and resume a subscription.

On this page