Deleting volumes
At some point, you will no longer need the volumes you have created. To remove the volumes from the system permanently, so they are no longer available, we simply pull out another tool from the OpenStack client, the volume delete
option.
Getting ready
To delete a volume, you will need the following:
The
openstack
command-line clientAn
openrc
file with appropriate credentials for the environmentThe name or ID of the volume to delete
For our example, these values are as follows:
Volume:
cookbook.volume
Note
Warning: This will remove the volume and any data stored on it, so ensure that this is the correct action you want to perform before continuing.
You can only delete a volume that isn't currently attached to an instance.
How to do it…
To delete a volume using the OpenStack client, carry out the following steps:
First, we list the volumes available to identify the volume we want to delete, with the following command:
openstack volume list
This shows that the volume is available and...