Volumes#

General information#

Volume is the main storage for instance data in NGN Cloud.

All volumes are attached via VirtIO protocol and thus, require specialised support from the OS. All OS images officially supported by NGN Cloud contain all the required drivers.

Virtual volume can be created independently of an instance, or during it’s creation process. During the instance creation process you can create only volumes, attached to this new instance. Wherein, the first volume of the list is the root device and others are additional. Unlike additional, root volume can’t be detached from an instance. After detaching, additional volume becomes available for further attaching to an instance. All volume data is saved when detaching a volume from an instance. You can attach volume to a running instance. You can attach up to 16 volumes to an instance, but each volume can be attached to only one instance at a time.

When creating an instance, you can select the Delete with the instance option to specify whether the volume must be deleted when the instance is deleted. If this option is not selected for the volume, or the volume was attached to the instance after the instance creation, the volume will be detached from the instance when it is deleted and can be attached to another instance.

Each new volume is either an empty volume or a copy of the master snapshot. Master snapshots contain an installed and configured OS and are mainly used for boot volumes. Volume created from the master snapshot may exceed the master volume in size. In this case, additional space appears on such volume. Later on, you can use this space to create an additional partition or expand the file system so that it occupies the entire volume.

NGN Cloud provides several volume types, which differ in performance characteristics, features and price: st2: Standard (HDD), gp2: Universal (SSD), io2: Ultimate (SSD).

You can increase the volume size after its creation. It is possible to increase the size of the volume, attached to a running instance without the need of stopping it. For some volume types, increasing the size leads to the growth of volume characteristics. You can’t decrease the volume size. For more information about features and characteristics of volumes see the Volume types section.

Each volume has a set of parameters:

  • ID — unique volume ID.

  • A Name tag is a tag with the Name key and a value set by a user. To learn more about this parameter, please see Tags section.

  • State — information on volume status.

  • Availability Zone — the data center in which physical hardware is located.

  • Type – volume type.

  • Size — maximum amount of data that a volume can hold.

  • Creation date

Volume types#

NGN Cloud provides several volume types, which differ in performance characteristics, features and price. The following table shows the use cases and main characteristics for each volume type. The default volume type when creating an instance or a volume is st2.

Standard (HDD)

Universal (SSD)

Ultimate (SSD)

API name

st2

gp2

io2

Description

Low-cost HDD volume designed for storing a big amount of data. Big-size volumes have high max throughput characteristic

Universal SSD volume, which has high performance and which is suited for a wide variety of workloads

Highest-performance SSD volume for the most demanding for IOPS performance applications

Use cases

  • Storing a big amount of data

  • Workloads involving sequential I/O

  • Other workloads involving read/write operations with large I/O size

  • The root devices

  • The critical business applications

  • Development and test environments

  • Other workloads, sensitive to latency and IOPS and MiB/s performance

  • Critical business applications that require the highest IOPS performance

  • Large database I/O workloads, such as: MongoDB, Cassandra, MS SQL Server, MySQL, PostgreSQL, Oracle

The size of the volume

32 GiB — 4 TiB

8 GiB – 4 TiB

8 GiB — 4 TiB

Max performance per volume, IOPS

1 000

10 000

50 000

Max throughput per volume, MiB/s

500

320

500

st2: Standard (HDD)#

API name: st2

st2 volume — a low-cost volume, based on magnetic drives (HDD), designed for storing a big amount of data. st2 volume type feature is max throughput scaling with increasing of volume size (0.25 MiB/s per 1 GiB).

  • Based on hard disk drives (HDD).

  • Volume size — from 32 GiB to 4 TiB. The volume size must be multiple of 8 GiB.

  • IOPS performance:

    • 500 IOPS for volumes with < 2000 GiB size.

    • 1000 IOPS for volumes with ≥ 2000 GiB size.

  • Maximum throughput per volume in MiB/s is calculated using the following formula: Max (MiB/s) = Size (GiB) * 0.25 (MiB/s per 1 GiB), but not more than 500 MiB/s. It means that the maximum throughput per st2 volume is between 8 MiB/s (for 32 GiB volume) and 500 MiB/s (for 2000 GiB to 4 TiB volumes). Max throughput recalculates and applies with further increasing of volume size.

gp2: Universal (SSD)#

API name: gp2

gp2 is a high-performance universal SSD volume. This volume type is suitable for a wide range of tasks. The hallmark of the gp2 volume type is that its performance in IOPS grows as its size increases.

  • Based on solid-state drives (SSD).

  • The volume size varies from 8 GiB to 4 TiB. The volume size is a multiple of 8 GiB.

  • IOPS performance is calculated using the following formula:

    Max (IOPS) = Size (GiB) * 10 (IOPS per GiB), but no more than 10 000 IOPS.

    It means that IOPS performance of a gp2 volume varies from 80 IOPS (for 8 GiB volume) to 10 000 IOPS (for 1000 GiB to 4 TiB volumes). IOPS performance is recalculated and increased if volume size increases.

  • Max throughput per volume:

    • 160 MiB/s for a volume size < 120 GiB.

    • 320 MiB/s for volumes with ≥ 120 GiB size.

io2: Ultimate (SSD)#

API name: io2

io2 volume — a highest-performance SSD volume, designed for the most demanding for IOPS performance applications. io2 volume type feature is the possibility to set IOPS performance on volume creation and to change it later without stopping the instance.

  • Based on high-performance solid-state drives (SSD).

  • The volume size varies from 8 GiB to 4 TiB. The volume size is a multiple of 8 GiB.

  • IOPS performance — set by the user in the following range:

    from 100 to Size (GiB) * 50 (IOPS per GiB), but no more than 50 000 IOPS.

    It means that the max performance (50 000 IOPS) can be set for the io2 volume with size ≥ 1000 GiB. There is no need to stop an instance or increase the volume size to increase the IOPS performance of an attached io2 volume.

  • Max throughput per volume, MiB/s — 500.

  • How to create a volume, please see terraform-examples.

Creating / deleting a volume#

You can use different methods to create a new volume:

  1. Create a new empty volume

  2. Create a volume from a snapshot

Create a new empty volume#

Click Create in Volumes subsection. Set the required parameters: volume size, availability zone, volume type, IOPS (if possible for this volume type), tags, and click Create Volume.

Create a volume from a snapshot#

To create a volume from a snapshot, select Create volume from snapshot. You can either create snapshots yourself or use NGN snapshots.

Set the required parameters of new volume and click Create volume.

A unique ID in vol-XXXXXXXX format is assigned to the volume when it is created. We recommend using tags for more convenient operations with volumes.

Deleting a volume#

Important

Only volumes with available status (which aren’t attached to any instance) can be deleted.

Click Delete to delete the volume.

Operations with volumes#

Attaching/detaching a volume#

Important

A volume can be attached to an instance if they are in the same availability zone.

Only volumes with available status (which aren’t attached to any instance) can be attached to an instance.

Attention

Please note that you can attach max. 4 volumes to instances with the hvm-legacy virtualization type.

Click Attach to attach the volume to the instance.

Important

You can detach only not root volumes of the instance.

Click Detach to detach the volume from instance and the volume will be available for the next attachment.

Creating a snapshot#

To create a snapshot, from which you can later create an image or which you can use for data backup, click Create snapshot.

Volume version management#

A volume version is a snapshot of volume content at the time the version is created.

The main difference between a volume version and volume snapshot is that the volume version is not copied to another storage, but remains with the volume in the same storage. Once successfully created, the version is immediately available for use. There is no need to wait until the volume content is copied to another storage, as in case of a volume snapshot.

A volume that has versions can be restored to any of them. Restoring to a version means that the volume content will return to its state at the time when the version was created. The volume is restored to the selected version instantly and can be used right after successful restore.

Volume versions are useful to retain volume content before system, application, or other critical updates. If an update fails, you can very quickly roll back, without having to wait first when the volume snapshot will be created and second when a new volume will be created from the snapshot.

Volume versions can also be part of a backup policy. For example, you can create a new version once an hour and a volume snapshot once a day, so that the volume copy is saved to a separate storage other than the storage where the volumes and their versions reside.

You only pay for the disk space occupied by versions. For example, if the volume content is almost unchanged after the version was created, then the version won’t occupy much space. However, if changes are significant, then one version may occupy as much space as the entire volume.

Note

For billing purposes, the total space occupied by all versions of one volume is rounded up to the nearest 1 GiB.

Note

You cannot create another volume directly from a version. If you need a new volume with the same data as in the volume version, create a volume snapshot first and then create the new volume from that snapshot.

Create a volume version#

To create a volume version, go to the Volumes section, select the desired volume and click Create Version, or go to the volume page and click Create Version in the Information tab. In the dialog window, you can set the Name tag value. To specify additional tags, click Add tags. Or you can do it later in the Versions tab.

In addition, you can create a version in the Versions tab on the volume page using the Create version button.

Note

If a volume is attached to a running instance, then to ensure data consistency between the volume and its version, you are recommended to flush the cache first and suspend writing to the volume. Consistency conditions for a version are the same as for a volume snapshot.

The version is created instantly, but the next version can be created only after a timeout of 1 minute. Up to five versions per volume may be created. To create a new version when the maximum number of versions is reached, you must delete at least one existing version. To keep the content of the version you want to delete, create a volume snapshot from it.

Restore volume from the version#

A volume can be restored to a certain version without being detached from the instance. A volume is restored in a fraction of a second, because you do not have to wait when the volume will be created from the snapshot.

Note

If the volume is attached to an instance, then you should first stop this instance. Restoring a volume to a certain version is only possible when the volume is not attached to an instance or when such an instance is stopped.

To restore a volume from an existing version, go to the Versions tab on the volume page, select the desired version, and click Restore to a version. Restoring a volume from a version is subject to the same one-minute timeout for repeating the action as when creating a version.

Attention

If the volume has increased in size after a version was created, then restoring the volume to that version starts with restoring the content and then expanding the restored volume to the size it had at the time of restoring.

For example, when a version was created, the volume was 32 GiB and then its size was increased to 64 GiB. Upon restoring to that version, the volume will still be 64 GiB, where the first 32 GiB are occupied by the content of the version being restored and the next 32 GiB are an unallocated area added by the automatic volume expansion mechanism.

Creating a snapshot from a version#

You can create volume snapshots from versions. This feature can be useful when you need to create new versions, but you have already reached the maximum number of versions and want to keep their content. Another use case is when you need to create new volumes with the same content as that of the version. Keep in mind that additional volumes can be created in any availability zone, not just the one where the volume and its versions are located.

To create a volume snapshot from a version, go to the volume page, select the desired version in the Versions tab, and click Create snapshot from version. In the dialog window, you can set the Name tag value and provide a snapshot description. To specify additional tags, click Add tags.

Note

Please note that the volume snapshot created from a version will have the same creation time as the version itself.

Delete versions#

To delete unnecessary versions, check them in the list in the Versions tab on the volume page and click Delete.

Note

With more changes on the volume, the versions occupy more space and a storage fee increases respectively, so we recommend deleting unnecessary versions from time to time.

Deleting a volume deletes all its existing versions as well. To keep the content of the version you want to delete, create a volume snapshot from it.

Changing a volume parameters#

Increasing the volume size#

Go to the volume page and modify the Volume size field to increase the volume size. There is no need to stop the instance.

Note

With increasing the size of st2: Standard (HDD) type volume, it gets additional 0.25 MiB/s of max volume throughput for each 1 GiB. At 2000 GiB of volume size the max volume throughput reaches the maximum for st2 type (500 MiB/s) and doesn’t grow further and the IOPS performance boosts from 500 to 1000.

Note

With increasing the size of gp2: Universal (SSD) type volume, it gets additional 10 IOPS in performance for each 1 GiB. At 1000 GiB of volume size the IOPS performance reaches the maximum for gp2 type (10 000 IOPS) and doesn’t grow further.

Note

Increasing the size of io2: Ultimate (SSD) type volume allows to increase volume IOPS performance by 50 IOPS for each 1 GiB. At 1000 GiB of volume size the max available IOPS performance for volume reaches the limit for io2 type (50 000 IOPS) and doesn’t grow further.

Unlike the gp2 volume the current IOPS performance value of io2 volume isn’t tied to its size. So if you need to increase volume IOPS value with its size, you should do it separately, by modifying the IOPS field on the volume page.

You can find more information about the characteristics of volumes in the Volume types.

Changing the volume IOPS performance#

You can change the IOPS performance without changing the volume size for io2: Ultimate (SSD) type volume by modifying the IOPS field on the volume page.

The range of available IOPS performance values for io2 volume:

from 100 to Size (GiB) * 50 (IOPS per GiB), but no more than 50 000 IOPS.

Note

You can also increase the IOPS performance for gp2: Universal (SSD) volume by increasing its size. Such volume gets additional 10 IOPS in performance for each 1 GiB. At 1000 GiB of volume size the IOPS performance reaches the maximum for gp2 type (10 000 IOPS) and doesn’t grow further.

Volume information#

Click a link with volume unique ID to go to the page with detailed volume information.

The Information tab shows volume state, Name tag, creation date, availability zone in which the volume is located, volume size, volume type, and performance in IOPS. Here you can change volume size and performance in IOPS (if possible for this volume type).

The Versions tab displays a list of available volume versions, assigned tags, and the version creation dates. Here, you can create a new volume version, restore a volume from the selected version, set tags for versions, create a volume snapshot from a version, and delete versions you no longer need. To edit, add or delete tags, select the volume version and click Customize tags.

The Metrics tab displays the volume read / write rate statistics. You can display statistics for current or selected time period.

On the Alarms tab you can see alarms, set for this volume. You can modify or delete alarms, set for this volume.

The Tags tab shows what tags have been assigned to a volume (each resource may have up to 50 tags). Here you can add tags, edit keys and values, and delete tags from the resource.