Managing volumes

Prerequisites

To set a read/write limit for a volume attached as a LUN

Admin panel

  1. Open Storage services > Block storage > Target groups, click the name of the desired target group to open it.

  2. On the LUNs tab, click the desired LUN to open its details, then click the pencil icon in the Limits field.
  3. In the Set LUN limit window, enter limit values, and then click Save.

The set limits will be shown in LUN details.

Command-line interface

Use the following command:

vinfra service block-storage volume set [--read-ops-limit <iops>] [--write-ops-limit <iops>]
                                        [--read-bps-limit <MiB/s>] [--write-bps-limit <MiB/s>] <volume>
--read-ops-limit <iops>
Number of read operations per second
--write-ops-limit <iops>
Number of write operations per second
--read-bps-limit <MiB/s>
Number of mebibytes read per second
--write-bps-limit <MiB/s>
Number of mebibytes written per second
<volume>
Volume name or ID

For example, to limit the IOPS and throughput of the volume vol1 to 100 IOPS and 100 MiB/s, run:

# vinfra service block-storage volume set vol1 --read-ops-limit 100 --read-bps-limit 100 \
--write-ops-limit 100 --write-bps-limit 100

You can check that the limits are successfully applied in the vinfra service block-storage volume show output:

# vinfra service block-storage volume show vol1
+---------------+--------------------------------------+
| Field         | Value                                |
+---------------+--------------------------------------+
| grp_id        | 1b661da7-cb4d-4b81-9f09-f8ad54fa631e |
| grp_name      | tg1                                  |
| id            | 9841d72f-5d68-4659-82d5-cd96cf1031b6 |
| limits        | read:                                |
|               |   bps: 104857600                     |
|               |   ops: 100                           |
|               | write:                               |
|               |   bps: 104857600                     |
|               |   ops: 100                           |
| lun           | 0                                    |
| name          | vol1                                 |
| serial        | cd96cf1031b6                         |
| size          | 107374182400                         |
| used_size     | 1048576                              |
| volume_params | failure_domain: host                 |
|               | redundancy:                          |
|               |   m: 1                               |
|               |   type: raid1                        |
|               | tier: 0                              |
+---------------+--------------------------------------+

To detach a volume from a target group

Admin panel

  1. Open Storage services > Block storage > Target groups, click the name of the desired target group to open it.

  2. On the LUNs tab, click the ellipsis button of the desired LUN, and then click Detach.

Alternatively, you can open Storage services > Block storage > Volumes, click the ellipsis icon of the desired volume, and then click Detach.

Command-line interface

Use the following command:

vinfra service block-storage target-group volume detach <target-group> <volume>
<target-group>
Target group name or ID
<volume>
Volume name or ID

For example, to detach the volume vol1 from the target group tg1, run:

# vinfra service block-storage target-group volume detach tg1 vol1

To delete a volume that is not attached to a target group

Admin panel

  1. Open Storage services > Block storage > Volumes.
  2. Click the ellipsis icon of the desired volume, and then click Delete.

Command-line interface

Use the following command:

vinfra service block-storage volume delete <volume>
<volume>
Volume name or ID

For example, to delete the volume vol1, run:

# vinfra service block-storage volume delete vol1