vinfra service compute storage-policy set

Modify storage policy parameters:

usage: vinfra service compute storage-policy set [--name <name>]
                                                 [--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>]
                                                 <storage-policy>
--name <name>
A new name for the storage policy
--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
<storage-policy>
Storage policy ID or name

Example:

# vinfra service compute storage-policy set mystorpolicy --encoding 5+2
+----------------+--------------------------------------+
| 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=5+2                         |
| tier           | 3                                    |
+----------------+--------------------------------------+

This command changes the redundancy type for the storage policy mystorpolicy from erasure coding 3+2 to 5+2.