lbcli create volume

Creates a new volume.

Synopsis

Creates a volume with specified properties.

Volume Name

Each volume name must be unique within a given project. It is therefore not possible to create multiple volumes with the same name in the same project. After a volume has been created, its name can be modified using the update volume API with the --new-name flag.

Volume name cannot be empty and can be up to 253 characters: The following are the allowed characters in volume name:

  • 0-9
  • a-z
  • A-Z
  • . - _
Bash
Copy

This command is an asynchronous operation. To verify that the create volume operation succeeded, use the lbcli list volume or get volume commands.

Examples:

Bash
Copy
FlagShortTypeDefaultDescriptionVersion
--aclComma Delimited StringACL assigned to the volume (required).
--sizestring1GiBVolume size in human-readable format (e.g., 3GiB, 1024MiB) (required).
--compressionboolfalseCompression mode, values: true/false (optional).
--placement-affinitystring

Specifies affinities for volume placement. Cluster volume placement logic places volume on nodes that have an affinity with one or more of the specified affinities. Affinities can be encoded with up to 25 key value pairs, with each value being a value of 100 characters. The supported keys are “FD” (a node’s Failure Domain), or PrimaryFD (a Failure Domain for the node serving as primary). Affinity key value pairs are evaluated and enforced during the volume placement phase. The placement algorithm assigns the volume on the resources that share common key value pairs with the key value pairs assigned to the volumes. The key defines the type of affinity (i.e., fd - a node's Failure Domain) - while the value is the exact value the placement logic should match.

Notes;

  • volume-affinity FD can only be specified for volumes of single replication (--replica-count=1), and where Dynamic Rebalance is disabled (lbcli get feature-flag fail-in-place, lbcli get feature-flag proactive-rebalance both return false). The example syntax is "--placement-affinity='fd:Server0|fd:rack1|fd:rack0'"
  • Tech Preview: volume-affinity PrimaryFD can only be specified for volumes of two or three replicas counts. Dynamic rebalance does not need to be disabled, but if triggered it may later change volume placement without accounting for the affinity value. The example syntax is "--placement-affinity='primaryfd:server0'"
  • Either fd or primaryfd can be specified for a volume.
2.3.8 and above.
--help-hboolHelp for volume.
--ip-aclComma Delimited String[ALLOW_ANY]IP address ACL assigned to the volume (optional).
--labelsstringA volume can be created with user-defined labels (optional). When creating a clone, if labels are passed, the clone will be created with them. Otherwise, the labels are copied from the snapshot used for the clone (which is tagged with labels of its original source volume). The labels argument format is key0=val0,key1=val1,...keyN=valN, when the number of labels is limited to 16. Label-key and label-value length must be between 1 and 253 characters and can contain any of: alphanumeric characters (a-z, A-Z, 0-9), hyphen (-), underscore (_), and period (.).
--replica-countuint32Number of replicas, values: {1, 2, 3}, (required).
--min-replicasuint32Minimum number of replicas (optional, default: 0, 0 - implies default system behavior.
--namestringVolume name (required). See volume name allowed characters above.
--qos-policy-uuidstringThe QoS policy UUID to assign to the volume (optional).2.3.16 and above.
--qos-policy-namestringThe QoS policy name to assign to the volume (optional).2.3.16 and above.
--project namestringThe project this volume belongs to.2.1 and above
--sector sizeint32Sector size allowed. Currently only 512 and 4096 are allowed.2.1 and above
--source-snapshot-namestring

Snapshot name from which to create the volume (clone volume).

Note: To clone a volume from a snapshot, specify either the source snapshot name or UUID.

2.2 and above
--source-snapshot-UUIDstring

Snapshot UUID from which to create the volume (clone volume).

Note: To clone a volume from a snapshot, specify either the source snapshot name or UUID.

2.2 and above

Update/rollback/deletion of volumes can only be done on an active volume. See auto$ for additional information.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard