dtctl volume create
Usage
dtctl volume create [flags]
Aliases
c
Description
Create a block storage volume with a size and storage policy (see dtctl volume storage-policies). Pass --image-ref to create a bootable volume from an image.
Example
# Create a 20 GB data volume
dtctl volume create --name data-1 --size 20 --storage-policy default
Response
In text output (the default), this command returns the following columns: ID, Name, Status, Storage Policy, Size, Bootable, Type, Disk Serial Number.
Pass --output json to get the full response object instead.
Flags
| Option | Description |
|---|---|
--image-ref, -r | Image ID to create a bootable volume from |
--name, -n | Name of the volume (required) |
--size, -s | Size of the volume in GB (required) |
--storage-policy, -p | Storage policy name, e.g. HI-IOPS (see 'dtctl volume storage-policies'). The name, not the id (required) |
Related Commands
| Command | Description |
|---|---|
| dtctl volume list | List volumes |
| dtctl volume show | Show a volume |
| dtctl volume update | Update a volume |
| dtctl volume delete | Delete a volume |
| dtctl volume action | Perform a volume action |
| dtctl volume attach | Attach a volume to a VM |
| dtctl volume clone | Clone a volume |
| dtctl volume detach | Detach a volume from a VM |
| dtctl volume snapshots | List a volume's snapshots |
| dtctl volume storage-policies | List storage policies |
Global Flags
| Option | Description |
|---|---|
--api-url | Send this command to a different API endpoint, e.g. a test environment (default "https://console.dt.net.tr/api/v1") |
--config, -c | Specify a custom config file Default: ~/.config/dtctl/config.yaml |
--no-headers | Omit the column headers, for scripting Default: false |
--output, -o | Output format: text, wide, vertical, json. text fits the terminal, wide never truncates, vertical prints one field per line Default: text |