openstack Verified current stable Not installed? Cloud Infrastructure

Openstack / Set Volume Properties

Set Volume Properties

Modify properties of an existing volume in an OpenStack cloud.

$
Terminal
openstack volume set --name <volume_new_name> --size <volume_new_size> --attached --bootable <volume_id>

When To Use

When adjusting volume provisioning specifications post-creation, especially in response to workload changes necessitating size adjustments.

Pro Tip

Consider the impact of changing volume size on attached instances and ensure compatibility with storage backends; use `--force` if you encounter issues.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
openstack volume set --name <volume_new_name> --size <volume_new_size> --attached --bootable <volume_id>

Anatomy of Output

Understanding the result

Updating volume 'volume-1234' with new size '100 GB' and new name 'NewVolumeName'... Update Status

Indicates the parameters being modified for the volume.

Volume update initiated. Status

Signals that the update process has started.

Volume properties updated successfully. Final Status

Confirms that all modifications were applied without errors.

Troubleshooting

Common pitfalls

Error: Volume 'volume-1234' cannot be resized while in use.

Solution: Ensure the volume is detached by using `openstack server remove volume instance-456 volume-1234`.

Error: Invalid size specified. It must be greater than the current size.

Solution: Check current size using `openstack volume show volume-1234` and increase accordingly.

Error: Volume ID 'volume-id-not-found' not found.

Solution: Verify the volume ID by listing available volumes with `openstack volume list`.

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.
<volume_new_name>
volume new name
The value supplied for volume new name.
<volume_new_size>
volume new size
The value supplied for volume new size.
--attached
attached| detached
The value supplied for attached| detached.
--bootable
bootable| non bootable
The value supplied for bootable| non bootable.
<volume_id>
volume id
The value supplied for volume id.
--name
Command Option
Tool-specific option used by this command invocation.
--size
Command Option
Tool-specific option used by this command invocation.
--attached
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.