vinfra service compute storage-policy create

Create a new storage policy:

usage: vinfra service compute storage-policy create --tier {0,1,2,3}
                                                    (--replicas <norm>[:<min>] |
                                                    --encoding <M>+<N>)
                                                    --failure-domain
                                                    {disk,host,rack,row,room}
                                                    [--total-bytes-sec <bytes>]
                                                    [--total-iops-sec <iops>]
                                                    <name>
--tier {0,1,2,3}
Storage tier
--encoding <M>+<N>

Storage erasure encoding mapping in the format:

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

Storage replication mapping in the format:

  • norm: the number of replicas to maintain
  • min: the minimum required number of replicas (optional)
--total-bytes-sec <bytes>
Total bytes per second
--total-iops-sec <iops>
Total iops
<name>
Storage policy name

Example:

# vinfra service compute storage-policy create mystorpolicy --tier 3 \
--encoding 3+2 --failure-domain host --total-bytes-sec \
104857600 --total-iops-sec 100
+----------------+--------------------------------------+
| Field          | Value                                |
+----------------+--------------------------------------+
| available      | False                                |
| failure_domain | host                                 |
| id             | 2199e71e-ce8a-4ba9-81cd-75502f0344ca |
| name           | mystorpolicy                         |
| qos            | total_bytes_sec: 104857600           |
|                | total_iops_sec: 100                  |
| redundancy     | encoding=3+2                         |
| tier           | 3                                    |
+----------------+--------------------------------------+

This command creates a storage policy mystorpolicy with the tier set to 3, redundancy scheme to erasure coding 3+2, and failure domain set to host. It also sets the limits of 100 iops and 104857600 bytes per second.