openstack Verified current stable Not installed? Cloud Infrastructure

Openstack / Create New Volume

Create New Volume

Creates a new volume in OpenStack with specified characteristics.

$
Terminal
openstack volume create --size <size_in_GB> --image <image_id> --snapshot <snapshot_id> --bootable <volume_name>

When To Use

During the provisioning phase for an application requiring dedicated storage solutions.

Pro Tip

Setting `--snapshot` can reduce provisioning time by creating a volume from a snapshot; verify snapshot status is 'available' before use.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
openstack volume create --size <size_in_GB> --image <image_id> --snapshot <snapshot_id> --bootable <volume_name>

Anatomy of Output

Understanding the result

+--------------------------------------+---------+ Header: Volume Creation Result

Indicates the results of the volume creation operation.

| id | abcdef01-1234-5678-90ab-cdef01234567 | Volume ID

Unique identifier provided for the newly created volume.

| status | creating | Creation Status

Describes the current creation status of the volume.

Troubleshooting

Common pitfalls

ERROR: InvalidInput: Required parameters missing.

Solution: Double-check that all mandatory parameters, such as size and image, are supplied.

ERROR: Snapshot not found or not available.

Solution: Ensure the specified snapshot exists and is in 'available' status for cloning.

ERROR: Image 'img-xyz' not found.

Solution: Confirm the image ID is valid and accessible to the project.

Command Breakdown

What each part is doing

openstack
Base Command
The executable that performs this operation. Here it runs Openstack before the shell applies any redirect operators.
<size_in_GB>
size in GB
The value supplied for size in GB.
<image_id>
image id
The value supplied for image id.
<snapshot_id>
snapshot id
The value supplied for snapshot id.
--bootable
bootable| non bootable
The value supplied for bootable| non bootable.
<volume_name>
volume name
The value supplied for volume name.
--size
Command Option
Tool-specific option used by this command invocation.
--image
Command Option
Tool-specific option used by this command invocation.
--snapshot
Command Option
Tool-specific option used by this command invocation.
--bootable
Command Option
Tool-specific option used by this command invocation.

Alternative Approaches

Comparable commands in other tools

Alternative cloud infrastructure tools for the same job.