Creating local storage policies

To apply custom redundancy schemes to VM volumes, you can create storage policies from scratch or clone existing policies.

Prerequisites

To create a policy for the local cluster

Admin panel

  1. On the Compute > Storage > Storage policies tab, click Create storage policy.
  2. In the Create storage policy window, specify a policy name and select Local storage cluster.
  3. Select a tier, failure domain, and redundancy scheme.

  4. Enable IOPS limit or Bandwidth limit to set the corresponding limits on the volume.

  5. Click Create.

Command-line interface

Use the following command:

vinfra service compute storage-policy create --tier {0,1,2,3} (--replicas <norm>[:<min>] | --encoding <M>+<N>)
                                             --failure-domain {0,1,2,3,4}
                                             [--write-bytes-sec <limit>] [--read-bytes-sec <limit>]
                                             [--read-iops-sec <limit>] [--write-iops-sec <limit>]
                                             [--total-bytes-sec <limit>] [--total-iops-sec <limit>]
                                             <name>
--tier {0,1,2,3}
Storage tier
--encoding <M>+<N>

Storage erasure encoding mapping in the format:

  • M: number of data blocks
  • N: number of parity blocks
--failure-domain {0,1,2,3,4}
Storage failure domain
--replicas <norm>[:<min>]

Storage replication mapping in the format:

  • norm: number of replicas to maintain
  • min: minimum required number of replicas (optional)
--write-bytes-sec <limit>
Number of bytes written per second
--read-bytes-sec <limit>
Number of bytes read per second
--read-iops-sec <limit>
Number of read operations per second
--write-iops-sec <limit>
Number of write operations per second
--total-bytes-sec <bytes>
Total number of bytes per second
--total-iops-sec <iops>
Total number of I/O operations per second
<name>
Storage policy name

For example, to create a storage policy mystorpolicy with the tier 3, erasure coding 3+2 scheme, host failure domain, and the limits of 100 IOPS and 104857600 bytes per second, run:

# vinfra service compute storage-policy create mystorpolicy --tier 3 \
--encoding 3+2 --failure-domain 1 --total-bytes-sec 104857600 --total-iops-sec 100

The created storage policy will appear in the vinfra service compute storage-policy list output:

# vinfra service compute storage-policy list
+-------------+--------------+------+--------------+----------------+--------------------------------+
| id          | name         | tier | redundancy   | failure_domain | qos                            |
+-------------+--------------+------+--------------+----------------+--------------------------------+
| 97b55811<…> | mystorpolicy | 3    | encoding=3+2 | 1              | read_bytes_sec: -1             |
|             |              |      |              |                | read_bytes_sec_per_gb: -1      |
|             |              |      |              |                | read_bytes_sec_per_gb_min: -1  |
|             |              |      |              |                | read_iops_sec: -1              |
|             |              |      |              |                | read_iops_sec_per_gb: -1       |
|             |              |      |              |                | read_iops_sec_per_gb_min: -1   |
|             |              |      |              |                | total_bytes_sec: 104857600     |
|             |              |      |              |                | total_bytes_sec_per_gb: -1     |
|             |              |      |              |                | total_bytes_sec_per_gb_min: -1 |
|             |              |      |              |                | total_iops_sec: 100            |
|             |              |      |              |                | total_iops_sec_per_gb: -1      |
|             |              |      |              |                | total_iops_sec_per_gb_min: -1  |
|             |              |      |              |                | write_bytes_sec: -1            |
|             |              |      |              |                | write_bytes_sec_per_gb: -1     |
|             |              |      |              |                | write_bytes_sec_per_gb_min: -1 |
|             |              |      |              |                | write_iops_sec: -1             |
|             |              |      |              |                | write_iops_sec_per_gb: -1      |
|             |              |      |              |                | write_iops_sec_per_gb_min: -1  |
| 603bd56b<…> | default      | 0    | replicas=3   | 1              | read_bytes_sec: -1             |
|             |              |      |              |                | read_bytes_sec_per_gb: -1      |
|             |              |      |              |                | read_bytes_sec_per_gb_min: -1  |
|             |              |      |              |                | read_iops_sec: -1              |
|             |              |      |              |                | read_iops_sec_per_gb: -1       |
|             |              |      |              |                | read_iops_sec_per_gb_min: -1   |
|             |              |      |              |                | total_bytes_sec: -1            |
|             |              |      |              |                | total_bytes_sec_per_gb: -1     |
|             |              |      |              |                | total_bytes_sec_per_gb_min: -1 |
|             |              |      |              |                | total_iops_sec: -1             |
|             |              |      |              |                | total_iops_sec_per_gb: -1      |
|             |              |      |              |                | total_iops_sec_per_gb_min: -1  |
|             |              |      |              |                | write_bytes_sec: -1            |
|             |              |      |              |                | write_bytes_sec_per_gb: -1     |
|             |              |      |              |                | write_bytes_sec_per_gb_min: -1 |
|             |              |      |              |                | write_iops_sec: -1             |
|             |              |      |              |                | write_iops_sec_per_gb: -1      |
|             |              |      |              |                | write_iops_sec_per_gb_min: -1  |
+-------------+--------------+------+--------------+----------------+--------------------------------+

To clone a storage policy

  1. On the Compute > Storage > Storage policies tab, select a policy from the list.
  2. On the policy right pane, click Clone.
  3. Modify the existing parameters or just leave them as they are, and then click Clone.