Resetting volume state
During the ongoing operation of your OpenStack cloud, you will occasionally encounter trouble where a Cinder volume will get stuck in an odd state. During the course of writing this chapter, the authors had a number of volumes getting stuck in the attaching
status, after an instance failed to boot from them. This looks like the following:
openstack volume list -c Name -c Status -f table
Note
The cause of this was some fat-fingered typing while creating the boot from volume section!
Getting ready
To reset the status on a Cinder volume, you will need the following:
An
openrc
file with appropriate credentials for the environmentThe
openstack
command-line clientThe
cinder
command-line clientThe name or ID of the volume
For the example that follows, we will be resetting the following volumes to available:
cookbook.boot.volume
cookbook.volume.boot.test
How to do it…
Resetting the status of a Cinder volume is done with the cinder
command. Here the openstack
set of commands covers...