Sometimes after deleting an instance, the volume cannot be easily deleted via the UI.

Here are tried and true methods for getting rid of that unused volume:

  1.  Get volume UUID by running the following command
 [root@rdo-vm-2 devops]#cinder list

2.  You can check the available status and try to reset the state of volume, if that shows "Error_deleting" or "Detaching" Then you can reset-state of the volume 

[root@rdo-vm-2 devops]#cinder reset-state --state available $volume_uuid

3. If that also fails, Login to mysql db and use cinder DB

mysql> use cinder;

4. Following cinder mysql query sets the Cinder state to available:

mysql>update volumes set attach_status='detached',status='available' where id ='$volume_uuid';

5.  Another proved solution is set up the UUID to NULL

mysql>update volumes set attach_status='detached', instance_uuid=NULL, status="available" WHERE id='volume_uuid';

6. Now try again deleting the affected volume

[root@rdo-vm-2 devops]#cinder delete $volume_uuid

7. If the above workflow does not help then the below mysql query will delete the volume

mysql>update volumes set deleted=1,status='deleted', deleted_at=now(), updated_at=now() where deleted=0 and id='$volume_uuid';
Did this answer your question?