OpenStack volumes can be in the following states: "available”, “error”, “creating”, “deleting”, “in-use”, “attaching”, “detaching”, “error_deleting” or “maintenance”.
Sometimes the volumes might be in a state which does not reflect their present condition. For example, a failed live migration might set the volume state to "error". However, you can access and edit the data inside the volume. In such a case, it becomes necessary to reset the volume state to reflect its actual condition.
WARNING: This option simply changes the state of the volume in the database with no regard to actual status, exercise caution when using.
- Platform9 Managed OpenStack - All Versions.
- python-openstackclient (OpenStack CLI)
- These steps can only be run as admin. Source the RC file with the admin credentials.
$ source <your_rc_file>
- Get the UUID of the volume whose status you want to change.
- Change the status using the following command.
$ openstack volume set --state <desired_state> <volume_uuid>
- Verify if the volume state has changed
$ openstack volume show <volume_uuid>