User Guide
Reference
CLI Reference
OpenStack Client
Command Line Interface
Volumes service service CLI reference
See https://docs.openstack.org/ocata/cli-reference/cinder.html .
These commands allow you to create, list, show details of, delete, and manage volumes, snapshots, and volume types in the Volumes service. The <volume_id_or_name>
, <snapshot_id_or_name>
, <volume_type_id_or_name>
, and <server_id_or_name>
in the commands are placeholders that should be replaced with the actual IDs or names of the volumes, snapshots, volume types, and instances (servers).
List volumes
Bash openstack volume list
Show volume details
Bash openstack volume show <volume_id_or_name>
Create a Volume
Bash openstack volume create --size <size_in_gb> <volume_name>
<size_in_gb>
: Size of the volume in gigabytes.
Delete a volume
Bash openstack volume delete <volume_id_or_name>
Extend a volume
Bash openstack volume set --size <new_size_in_gb> <volume_id_or_name>
<new_size_in_gb>
: New size of the volume in gigabytes, which must be larger than the current size.
List volume snapshots
Bash openstack volume snapshot list
Show snapshot details
Bash openstack volume snapshot show <snapshot_id_or_name>
Create a volume snapshot
Bash openstack volume snapshot create --volume <volume_id_or_name> <snapshot_name>
Delete a volume snapshot
Bash openstack volume snapshot delete <snapshot_id_or_name>
List volume types
Bash openstack volume type list
Create a volume type
Bash openstack volume type create <volume_type_name>
Delete a volume type
Bash openstack volume type delete <volume_type_id_or_name>
Attach a volume to an instance
Bash openstack server add volume <server_id_or_name> <volume_id_or_name>
Detach a volume from an instance
Bash openstack server remove volume <server_id_or_name> <volume_id_or_name>
March 7, 2024 at 9:24 PM
March 4, 2024 at 6:26 PM