Editing and deleting storage policies
Limitations
- You cannot change the redundancy type of an existing storage policy.
- You cannot change redundancy parameters of a storage policy with the erasure coding redundancy type.
- You cannot delete a storage policy that governs existing volumes. If you still want to delete the storage policy, first remove these volumes or select another policy for them.
Prerequisites
- A storage policy is created, as described in Creating local storage policies or Creating external storage policies.
To edit a storage policy
Admin panel
- On the Compute > Storage > Storage policies tab, select a policy from the list.
- On the policy right pane, click Edit.
- Change the required parameters, and then click Save.
Keep in mind, that changes to the storage policy will affect the redundancy and performance of all the volumes covered by it.
Command-line interface
Use the following command:
vinfra service compute storage-policy set [--name <name>] [--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>] <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
: number of data blocksN
: 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 maintainmin
: 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
<storage-policy>
- Storage policy ID or name
For example, to change the redundancy type for the storage policy mystorpolicy
from 2 replicas to 3 replicas, run:
# vinfra service compute storage-policy set mystorpolicy --replicas 3
To delete a storage policy
Admin panel
- On the Compute > Storage > Storage policies tab, select a policy from the list.
- On the policy right pane, click Delete.
- In the confirmation window, click Delete policy.
Command-line interface
Use the following command:
vinfra service compute storage-policy delete <storage-policy>
<storage-policy>
- Storage policy ID or name
For example, to delete the storage policy mystorpolicy
, run:
# vinfra service compute storage-policy delete mystorpolicy