Volumes#

General information#

The volume in K2 Cloud is the primary data storage for the instance. K2 Cloud supports both virtual volumes and dedicated physical volumes. Virtual volumes are automatically replicated, but replication for dedicated volumes is not supported.

K2 Cloud provides for several volume types, which differ in performance characteristics, features, and price: st3: Standard (HDD), st2: Standard (HDD), gp2: Universal (SSD), io2: Ultimate (SSD), and nv1: Non-replicated (NVMe SSD).

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

A volume can be created either separately from an instance or together with it. When an instance is created, the created volumes are attached to it, with the first volume in the list being the boot volume for the instance, and the rest being additional ones.

Unlike additional volumes, a boot volume cannot be detached from an instance. After detaching, additional volumes can be attached to instances in the same availability zone. When a volume is detached from an instance, the data is preserved.

You can attach volumes without stopping an instance. You can attach up to 16 volumes to an instance, but no more than three nv1 volumes. Each volume can only be attached to 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 a master snapshot. Master snapshots contain an installed and configured OS and are mainly used for boot volumes. A volume created from a 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.

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

Each volume has a set of parameters:

  • ID — unique volume ID.

  • Name tag — a tag with the Name key and a user-specified value. To learn more about this parameter, please see Tags section.

  • State — The current volume state.

  • Availability zone — The location, which accommodates physical hardware to which the volume is attached.

  • Type — The volume type.

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

  • Creation date.

Volume types#

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

Replicated volumes#

The table provides usage examples and key characteristics for replicated virtual volume types.

Important

In the ru-spb region, gp2 and st3 volume types are available.

Main volume types#

Standard (HDD)

Universal (SSD)

Ultimate (SSD)

API name

st3

gp2

io2

Description

Low-cost HDD volume for storing large amounts of data. For small-size volumes, baseline throughput can be temporarily exceeded

Universal high-performance SSD volume suited for a wide variety of workloads

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

Use cases

  • Storing a big amount of data

  • Workloads involving sequential I/O

  • The boot devices

  • The critical business applications

  • Development and test environments

  • Tasks that require high performance (IOPS, MiB/s) and low latency

  • Critical business applications that require the highest IOPS performance

  • I/O intensive databases

The size of the volume

20 GiB — 4 TiB

8 GiB — 4 TiB

8 GiB — 4 TiB

Max performance per volume, IOPS

1 000

10 000

50 000

Max. throughput, MiB/s

500

320

500

Legacy volume type#

Standard (HDD)

API name

st2

Description

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

Use cases

  • Storing a big amount of data

  • Workloads involving sequential I/O

The size of the volume

32 GiB — 4 TiB

Max performance per volume, IOPS

1 000

Max throughput per volume, MiB/s

500

Non-replicated volumes#

The table provides usage examples and key characteristics for nv1 volumes. Volumes of this type are dedicated, so replication is not supported.

Non-replicated volumes#

Non-replicated (NVMe SSD)

API name

nv1

Description

NVMe SSD volume without replication

Use cases

  • Databases with built-in replication

  • Machine Learning

  • Stream processing

  • Temporary storages

  • SDS solutions like Ceph and Gluster

The size of the volume

2.9 TiB

Max. volume performance, IOPS

100,000 and more for Windows
250,000 and more for Linux

Max. throughput, MiB/s

1000

st3: Standard (HDD)#

API name: st3

The st3 type volume is a low-cost HDD-based volume designed for storing a big amount of data. For this volume type, baseline throughput grows with the volume size and can be temporarily exceeded for small-size volumes (up to 128 GiB).

Characteristics#

  • Based on hard disk drives (HDD).

  • Volume size — from 20 GiB to 4 TiB at 1 GiB increment.

  • IOPS performance:

    • 500 IOPS for volumes with < 2000 GiB size.

    • 1000 IOPS for volumes with ≥ 2000 GiB size.

  • The baseline throughput depends on the volume size 1:

    • 8 MiB/s for volumes from 20 to 32 GiB;

    • for volumes from 32 to 2,000 GiB, it is calculated by the formula:

      Volume size (GiB) * 0.25 (MiB/s per 1 GiB);
      
    • 500 MiB/s for volumes from 2 to 4 TiB.

    1

    For volumes smaller than 128 GiB, throughput can be higher than the baseline due to the ability to temporarily exceed the baseline.

When the volume size increases, the baseline throughput is recalculated.

Burst bucket model#

The baseline throughput of an st3 volume with a size of up to 128 GiB can be exceeded and reach 32 MiB/s for up to 10 minutes. Thus, small volumes with low throughput can operate for some time like larger volumes and thus better handle short bursts of load, such as during OS loading or application startup.

Frequent exceeding of the baseline may indicate that you need a larger volume with a higher baseline throughput. Exceeding the baseline is not billed.

For temporarily increasing the baseline throughput, st3 volumes use a burst bucket model. Credits accumulate when the volume is idle or consumes less than the full baseline throughput. During load bursts, the accumulated credits are spent to increase throughput.

Throughput can be increased up to a maximum of 32 MiB/s. At this speed, the entire credit pool will be exhausted in 600 seconds. However, if the volume does not use the full available 32 MiB/s, credits will be spent longer than 600 seconds. Once the credit pool is exhausted, the maximum possible throughput equals the baseline. If the volume operates at baseline throughput, credits do not accumulate.

The maximum credit pool size depends on the volume’s baseline throughput and is calculated by the formula:

(32 MiB/s – baseline throughput) * 600 s.

When the actual throughput exceeds the baseline one, the credit pool decreases each second by the difference between the actual and baseline values. And vice versa, if the actual throughput is lower than the baseline one and the pool size is less than the maximum, it increases by the difference between the baseline and actual values (see a calculation example below).

The smaller the volume and, accordingly, the lower its basic throughput, the more its throughput can be increased, and vice versa. For example, for a 100 GiB volume, the basic throughput is:

100 GiB * 0.25 (MiB/s) / 1 GiB = 25 MiB/s.

Thus, the possible throughput increase is only:

32 MiB/s – 25 MiB/s = 7 MiB/s.

For a 128 GiB volume, the baseline throughput becomes 32 MiB/s, so for volumes of this size or larger, increasing their speed beyond the baseline one is impossible.

Credit pool calculation example#

For a 20 GiB volume, the baseline throughput is 8 MiB/s. Accordingly, the maximum credit pool is:

(32 MiB/s – 8 MiB/s) * 600 s = 14,400 MiB.

The pool size is recalculated every second. If the throughput increases, for example, to 20 MiB/s, the pool size will decrease by

(20 MiB/s – 8 MiB/s) * 1 s = 12 MiB,

and will be 14,388 MiB.

If the next second it drops, for example, to 4 MiB/s, the pool size will increase by

(8 MiB/s – 4 MiB/s) * 1 s = 4 MiB,

and will be 14,392 MiB.

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 is set by the user in the range from 100 to:

    ``Size (GiB) * 50 (IOPS per GiB)``,
    

    but not more than 50,000 IOPS. That is, the maximum value of 50,000 IOPS can be set for a io2 volume ≥ 1,000 GiB.

    The IOPS performance of an io2 volume can be changed without stopping the instance and without changing the volume size.

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

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

nv1: Non-replicated (NVMe)#

API name: nv1

The nv1 volume type is a dedicated physical NVMe SSD accessed via a high-speed network protocol. It ensures the minimum latency among all available volume types, and its actual performance is about 100-300 thousand IOPS.

Note

There is no maximum limit for IOPS performance. It depends on the performance of the instance, the number of virtual cores, the number of parallel requests, the type of load, and other factors. For Windows instances, it is 100-150 thousand IOPS, and for Linux instances, it is 200-300 thousand IOPS. The difference in performance is due to the driver specifics in these operating systems.

Replication is not supported for this volume type, so it is recommended to use them with applications that have built-in replication, in high-availability cluster solutions, and for storing temporary data. To avoid losing multiple volumes at once, you can include them in a volume placement group to ensure that they are located on different physical nodes.

For non-replicated volumes, only basic operations are supported: create and delete, attach and detach. Snapshots and volume versions, backups, exports, increasing the volume size and changing its type, metrics and alarms are not supported. Ыuch volumes are automatically excluded from the instance backup.

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.

  • The maximum volume throughput in MiB/s is calculated by the formula:

    Max. throughput (MiB/s) = Size (GiB) * 0.25 (MiB/s per 1 GiB),
    

    but not more than 500 MiB/s. It means that the maximum throughput of an st2 volume is between 8 MiB/s (for 32 GiB volume) and 500 MiB/s (for 2000 GiB to 4 TiB volumes).

    The maximum throughput is recalculated and applied when the volume size increases.

Creating / deleting a volume#

You can use two methods to create a new volume:

  1. Create a volume

  2. Create a volume from a snapshot

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

Create a volume#

  1. Go to Virtual machines Storage Volumes.

  2. Click Create.

  3. In the window that opens, set the required parameters:

    • Name tag (Optional)

    • Availability zone

    • Volume type

    • Placement group (only for nv1 volumes)

    • Volume size

    • IOPS (if supported for the volume type)

    • Throughput (if supported for this volume type)

    If you do not need to assign additional tags, click Create volume. Otherwise, click Add tags.

  4. To add a tag, click Add tag and specify the tag key and value. If no tags have been set yet, you can add the Name tag by clicking Add Name tag and specifying its value. Once all tags have been specified, click Create volume.

Create a volume from a snapshot#

The wizard for creating a volume from a snapshot is similar to the volume wizard. You can use both volume snapshots provided by K2 Cloud and created by yourself, as well as those obtained during backups.

Note

To display backup-related snapshots, enable Show recovery points.

  1. Go to Virtual machines Storage Volumes.

  2. In the volume creation menu, select Create volume from snapshot.

  3. In the window that opens, select the volume snapshot and set the required parameters.

    • Name tag (Optional)

    • Availability zone

    • Volume type

    • Placement group (only for nv1 volumes)

    • Volume size

    • IOPS (if applicable for this volume type)

    • Throughput (if applicable for this volume type)

    If you do not need to assign additional tags, click Create volume. Otherwise, click Add tags.

  4. To add a tag, click Add tag and specify the tag key and value. If no tags have been set yet, you can add the Name tag by clicking Add Name tag and specifying its value. Once all tags have been specified, click Create volume.

Deleting a volume#

Important

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

  1. Go to Virtual machines Storage Volumes.

  2. Choose a volume in the resource table. You can choose several volumes at the same time.

  3. Click Delete.

  4. In the window that opens, confirm the action.

Operations with volumes#

Attaching/detaching a volume#

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.

Important

You can attach max. 4 volumes to instances with the hvm-legacy virtualization type.

Attach a volume#

  1. Go to Virtual machines Storage Volumes.

  2. Select the volume in the resource table.

  3. Click Attach.

  4. In the window that opens, select an instance from the drop-down list.

  5. Click Attach.

Detach a volume#

Important

You can detach only non-boot volumes from the instance.

  1. Go to Virtual machines Storage Volumes.

  2. Select the volume in the resource table.

  3. Click Detach.

  4. In the window that opens, confirm the action.

Creating a snapshot#

To create a volume snapshot:

  1. Go to Virtual machines Storage Volumes.

  2. Select the volume in the resource table.

  3. Click Create snapshot.

  4. In the window that opens, specify the Name tag and volume description (optional). By default, the Name tag is specified, which contains the volume ID and the date when the snapshot was created. If you do not need to specify additional tags, click Create, otherwise, click Add tags.

  5. To add a tag, click Add tag and specify the tag key and value. If no tags have been set yet, you can add the Name tag by clicking Add Name tag and specifying its value. Once all tags have been specified, click Create.

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#

  1. Go to Virtual machines Storage Volumes.

  2. Select the volume in the resource table and click on Create version. Alternatively, you can go to the volume page and select Create version in the Information tab.

  3. In the window that opens, you can set a value for the Name tag.

  4. If you need to assign additional tags, go to the next step by clicking Add Tags. Enter the tag key and value. Or you can do this later in the Versions tab.

  5. After setting all the required parameters, click Create.

Alternatively, 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 the volume from an existing version:

  1. Go to Virtual machines Storage Volumes.

  2. Find the volume in the resource table and click the volume ID to go to its page.

  3. In the Versions tab, select the desired version and click Revert to version.

  4. Confirm that you want to restore the volume state to the selected 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 if there are multipe availability zones in the region.

To create a snapshot from a version:

  1. Go to Virtual machines Storage Volumes.

  2. Find the volume in the resource table and click the volume ID to go to its page.

  3. In the Version tab, select the desired version and click Create snapshot from version.

  4. In the window that opens, you can set a value for the Name tag and snapshot description.

  5. If you need to set additional tags, go to the next step by clicking Add tags. Specify the tag key and value.

  6. After setting all the required parameters, click Create.

Note

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

Delete versions#

  1. Go to Virtual machines Storage Volumes.

  2. Find the volume in the resource table and click the volume ID to go to its page.

  3. In the Version tab, select the versions you no longer need, and click Delete.

  4. Confirm deletion.

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#

Important

To increase the volume size, there is no need to stop the instance.

  1. Go to Virtual machines Storage Volumes.

  2. Find the volume in the resource table and click the volume ID to go to its page.

  3. Edit the Volume size field in the Information tab.

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: each 1 GiB adds 10 IOPS. When the volume size reaches 1,000 GiB, the IOPS performance reaches its maximum for gp2 type (10,000 IOPS) and doesn’t grow further.

Specifying tags#

To add, modify or delete volume tags:

  1. Go to Virtual machines Storage Volumes.

  2. In the resource table, select the volume for which the tags should be modified and click on the volume ID to go to its page.

  3. Open the Tags tab.

  4. To add a tag, click Add tag and specify the Key and Value fields.

    To modify a tag, edit the required fields (Value and/or Key) of the respective tag.

    To delete a tag, click the icon next to the tag you no longer need.

    Note

    If no tags have been set earlier, you can add the Name tag by clicking Add Name tag and specifying its value.

    Note

    You can also modify the Name tag in the Information tab by editing the corresponding field.

  5. Click Apply to save the changes.

Volume information#

General information about volumes can be viewed in the resource table in Virtual machines Storage Volumes. To go to the specific volume page, click the link with its ID in the volume’s table in the Volumes subsection.

The Information tab displays the main volume parameters:

  • state;

  • volume name (Name tag);

  • creation date;

  • VPC in which the volume is located;

  • size;

  • type;

  • IOPS performance;

  • instance which the volume is attached to.

Here you can:

The Versions tab displays a table with details of existing volume versions:

  • version ID;

  • version name;

  • version creation date.

The sequence and scope of the displayed data may vary depending on the table settings.

Here you can:

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 set the period the metric graph covers, statistics, and metric calculation interval. In addition, you can plot a straight line with the maximum possible value of the metric. To do so, enable Show limit.

To automatically refresh the graph, enable Auto-refresh; to refresh it manually, click Refresh.

Important

Automatic refresh is not possible when a custom period and/or interval is selected.

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 are assigned to a volume (each resource may have up to 50 tags). Here you can add new tags, modify existing tags, and delete no-longer-needed tags.