volume¶
Block Storage v2, v3
volume create¶
Create new volume
openstack volume create
[--size <size>]
[--type <volume-type>]
[--image <image>]
[--snapshot <snapshot>]
[--source <volume>]
[--description <description>]
[--availability-zone <availability-zone>]
[--consistency-group consistency-group>]
[--property <key=value>]
[--hint <key=value>]
[--bootable | --non-bootable]
[--read-only | --read-write]
[--backup <backup>]
[--remote-source <key=value>]
[--host <host>]
[--cluster <cluster>]
[<name>]
- --size <size>¶
Volume size in GB (required unless –snapshot or –source specified)
- --type <volume-type>¶
Set the type of volume
- --image <image>¶
Use <image> as source of volume (name or ID)
- --snapshot <snapshot>¶
Use <snapshot> as source of volume (name or ID)
- --source <volume>¶
Volume to clone (name or ID)
- --description <description>¶
Volume description
- --availability-zone <availability-zone>¶
Create volume in <availability-zone>
- --consistency-group consistency-group>¶
Consistency group where the new volume belongs to
- --property <key=value>¶
Set a property to this volume (repeat option to set multiple properties)
- --hint <key=value>¶
Arbitrary scheduler hint key-value pairs to help creating a volume. Repeat the option to set multiple hints. ‘same_host’ and ‘different_host’ get values appended when repeated, all other keys take the last given value
- --bootable¶
Mark volume as bootable
- --non-bootable¶
Mark volume as non-bootable (default)
- --read-only¶
Set volume to read-only access mode
- --read-write¶
Set volume to read-write access mode (default)
- --backup <backup>¶
Restore backup to a volume (name or ID) (supported by –os-volume-api-version 3.47 or later)
- --remote-source <key=value>¶
The attribute(s) of the existing remote volume (admin required) (repeat option to specify multiple attributes, e.g.: ‘–remote-source source-name=test_name –remote-source source-id=test_id’)
- --host <host>¶
Cinder host on which the existing volume resides; takes the form: host@backend-name#pool. This is only used along with the –remote-source option.
- --cluster <cluster>¶
Cinder cluster on which the existing volume resides; takes the form: cluster@backend-name#pool. This is only used along with the –remote-source option. (supported by –os-volume-api-version 3.16 or above)
- name¶
Volume name
volume delete¶
Delete volume(s)
openstack volume delete
[--force | --purge]
[--remote]
<volume>
[<volume> ...]
- --force¶
Attempt forced removal of volume(s), regardless of state (defaults to False)
- --purge¶
Remove any snapshots along with volume(s) (defaults to False)
- --remote¶
Specify this parameter to unmanage a volume.
- volume¶
Volume(s) to delete (name or ID)
volume list¶
List volumes
openstack volume list
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--project <project>]
[--project-domain <project-domain>]
[--user <user>]
[--user-domain <user-domain>]
[--name <name>]
[--status <status>]
[--all-projects]
[--long]
[--limit <limit>]
[--marker <marker>]
- --sort-column SORT_COLUMN¶
specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated
- --sort-ascending¶
sort the column(s) in ascending order
- --sort-descending¶
sort the column(s) in descending order
- --project <project>¶
Filter results by project (name or ID) (admin only)
- --project-domain <project-domain>¶
Domain the project belongs to (name or ID). This can be used in case collisions between project names exist.
- --user <user>¶
Filter results by user (name or ID) (admin only)
- --user-domain <user-domain>¶
Domain the user belongs to (name or ID). This can be used in case collisions between user names exist.
- --name <name>¶
Filter results by volume name
- --status <status>¶
Filter results by status
- --all-projects¶
Include all projects (admin only)
- --long¶
List additional fields in output
- --limit <limit>¶
The maximum number of entries to return. If the value exceeds the server-defined maximum, then the maximum value will be used.
- --marker <marker>¶
The first position in the collection to return results from. This should be a value that was returned in a previous request.
volume migrate¶
Migrate volume to a new host
openstack volume migrate
--host <host>
[--force-host-copy]
[--lock-volume]
<volume>
- --host <host>¶
Destination host (takes the form: host@backend-name#pool)
- --force-host-copy¶
Enable generic host-based force-migration, which bypasses driver optimizations
- --lock-volume¶
If specified, the volume state will be locked and will not allow a migration to be aborted (possibly by another operation)
- volume¶
Volume to migrate (name or ID)
volume set¶
Set volume properties
openstack volume set
[--name <name>]
[--size <size>]
[--description <description>]
[--no-property]
[--property <key=value>]
[--image-property <key=value>]
[--state <state>]
[--attached | --detached]
[--type <volume-type>]
[--migration-policy <migration-policy>]
[--bootable | --non-bootable]
[--read-only | --read-write]
<volume>
- --name <name>¶
New volume name
- --size <size>¶
Extend volume size in GB
- --description <description>¶
New volume description
- --no-property¶
Remove all properties from <volume> (specify both –no-property and –property to remove the current properties before setting new properties.)
- --property <key=value>¶
Set a property on this volume (repeat option to set multiple properties)
- --image-property <key=value>¶
Set an image property on this volume (repeat option to set multiple image properties)
- --state <state>¶
New volume state (“available”, “error”, “creating”, “deleting”, “in-use”, “attaching”, “detaching”, “error_deleting” or “maintenance”) (admin only) (This option simply changes the state of the volume in the database with no regard to actual status, exercise caution when using)
- --attached¶
Set volume attachment status to “attached” (admin only) (This option simply changes the state of the volume in the database with no regard to actual status, exercise caution when using)
- --detached¶
Set volume attachment status to “detached” (admin only) (This option simply changes the state of the volume in the database with no regard to actual status, exercise caution when using)
- --type <volume-type>¶
New volume type (name or ID)
- --migration-policy <migration-policy>¶
Migration policy while re-typing volume (“never” or “on-demand”, default is “never” ) (available only when –type option is specified)
- --bootable¶
Mark volume as bootable
- --non-bootable¶
Mark volume as non-bootable
- --read-only¶
Set volume to read-only access mode
- --read-write¶
Set volume to read-write access mode
- volume¶
Volume to modify (name or ID)
volume show¶
Display volume details
openstack volume show <volume>
- volume¶
Volume to display (name or ID)
volume unset¶
Unset volume properties
openstack volume unset
[--property <key>]
[--image-property <key>]
<volume>
- --property <key>¶
Remove a property from volume (repeat option to remove multiple properties)
- --image-property <key>¶
Remove an image property from volume (repeat option to remove multiple image properties)
- volume¶
Volume to modify (name or ID)
Block Storage v3
volume summary¶
Show a summary of all volumes in this deployment.
openstack volume summary [--all-projects]
- --all-projects¶
Include all projects (admin only)
volume revert¶
Revert a volume to a snapshot.
openstack volume revert <snapshot>
- snapshot¶
Name or ID of the snapshot to restore. The snapshot must be the most recent one known to cinder.