Creates a new volume.
Synopsis
Creates a new volume with specified properties.
cfcli create volume [flags]Examples:
x
```bash#create a volume in project: 'my-project' with volume name: 'vol' maximum capacity: '10gib', acl: 'ALLOW_ANY', and replica count: '3':cfcli create volume --project-name my-project --name vol --size 10gib --replica-count 3 --acl ALLOW_ANY#create a volume in cluster 'clus-314': cfcli create volume --placement-affinity clusterid:clus-314 --project-name my-project --name vol --size 10gib --replica-count 3 --acl ALLOW_ANY#create a volume in 'server42' primary failure domain under cluster 'clus-314': cfcli create volume --placement-affinity clusterid:clus-314|primaryfd:server42 --project-name my-project --name vol --size 10gib --replica-count 3 --acl ALLOW_ANY| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
| --acl | stringSlice | ACL assigned to the volume. | ||
| --size | string | 1GiB | Volume size in human-readable format (e.g., 3GiB, 1024MiB) (required). | |
| --compression | string | false | Compression mode, values: true/false. | |
| --placement-affinity | string | Specifies placement affinities for the volume. Must be in the format: "key:value|key:value|key:value|... " (up to 25 pairs, with each 'value' up to 100 characters). The supported keys are: 'fd', 'primaryfd' and 'clusterid' where 'clusterid' can be used in cluster-federation to specify the ID of the cluster where the volume must be created. | ||
| --help | -h | bool | Help for volume. | |
| --ip-acl-volume | stringSlice | IP address ACL assigned to the volume (optional). | ||
| --size | string | Volume maximal capacity in human readable format (e.g., 3gib, 1024mib). | ||
| --replica-count | uint32 | Number of replicas, values: {1, 2, 3}. | ||
| --name | string | Volume name. | ||
| --project name | string | The project this volume belongs to. | ||
| --sector size | int32 | Sector size allowed. Currently only 512 and 4096 are allowed. | ||
| --source-snapshot-name | string | Snapshot name from which to create the volume. | ||
| --source-snapshot-UUID | string | Snapshot UUID from which to create the volume. |
Was this page helpful?