dcos storage volume create
Create a volume.
Synopsis
Arguments:
A DC/OS Storage volume is a Linux volume that may be consumed by a DC/OS service. Every volume is described by a volume profile which defines the volume’s properties. Every volume is created by a volume provider.
A volume is created by specifying the name of the volume, its size and the volume profile which describes it.
You can create a volume by specifying the name
, capacity
and profile
fields, as well as the optional node
and provider
fields. You can specify
these fields using command-line arguments or by providing a JSON document. If
JSON configuration is provided, it is read from <path>
or from STDIN
if no
<path>
is specified. If JSON is provided on STDIN and command-line arguments
are also, the JSON is ignored.
If JSON is provided, it must consist of the following fields: name
,
capacity-mb
and profile
. These fields correspond to the --name
,
--capacity
and --profile
command-line arguments accepted by this
command. The capacity-mb
field, unlike the --capacity
command-line
argument, must be an integer value corresponding to the capacity in MiB of the
volume. The node
and provider
fields, which correspond to the optional
--node
and --provider
command-line arguments, may also be specified.
Read more about volume providers by running “dcos storage provider --help”. Read more about volume profiles by running “dcos storage profile --help”.
For example, imagine you have a volume profile called fast
which selects
volume providers that are backed by SSDs. Specifying the fast
volume profile
when you create a volume will ensure that your volume will be allocated from
SSD-backed storage.
Examples
- Create two similar volume providers, each on a different node. Then create a volume profile called
fast
that selects volume providers that are backed by SSD storage. Finally, create a SSD-backed volume without selecting a specific provider and another where a particular provider is specified:
Options
Name | Description |
---|---|
--capacity string |
The size of the volume (required). |
--name string |
The name to use for this volume (required). |
--node string |
Create volume on a specific node. |
--profile string |
The name of the volume profile to use for this volume (required). |
--provider string |
Create volume using a specific provider. |
Options inherited from parent commands
Name | Description |
---|---|
-h ,--help |
Help for this command. |
--timeout duration |
Override the default operation timeout. (default 55s) |
-v ,--verbose |
Verbose mode. |