r/openstack • u/ConclusionBubbly4373 • Apr 16 '24
Cinder volume no longer exist but I get VolumeSizeExceedsAvailableQuota when creating a new instance
I'm using Openstack Yoga. I created an instance with 400GB of disk, but after 60 retries the volume allocation had failed (now I've changed block_device_allocate_retries to 500 in nova.conf).
I later deleted the failing instance but the associated 400GB volume would not be deleted. I tried to manually wipe the volume using commands:
cinder reset-state --reset-migration-status VOLUME_ID
cinder reset-state --attach-status detached VOLUME_ID
cinder delete VOLUME_IDbut the volume remained in the "deleting_error" state, so I followed this other procedure to delete the volume directly from the cinder db:
#mysql > use cinder;Set the cinder volume state available:
#mysql> update volumes set attach_status=’detached’,status=’available’ where id ='<volumeid’;Comeout from mysql prompt and try to delete the volume using volume id:
#cinder delete VOLUME_IDSince this procedure didn't work anyway, I ran this command in the cinder db:
#mysql > update volumes set deleted=1,status=’deleted’,deleted_at=now(),updated_at=now() where deleted=0 and id='<volumeid>’;PROBLEM:
If I run the openstack volume list command, the volume is deleted because it no longer exists in the list, but from the openstack dashboard, in the pie charts, that 400GB volume space is still assigned, in fact if I try to create another 400GB instance, it is not possible because it results in VolumeSizeExceedsAvailableQuota.
PLUS: I also noticed that from the Openstack dashboard the instance I had created no longer existed after deleting it, while when running openstack server list, the instance was still there. So I ran openstack server delete INSTANCE_ID thinking it would solve all my problems, but now the instance no longer exists, nor does the 400gb volume associated with it, but in the volume dashboard the 400gb are always occupied and I actually can't create a new one 400gb instance.
3
u/AwesomeA900 Apr 16 '24
What do you use as a storage backend? Ceph? If you use Ceph you can jump on the monitor node and do a
rbd ls -p <pool> | grep <volumeid>To see if it still exists.
You can list all pools by doing a
ceph dfI think you should be able to remove it by doing a
rbd rm <pool>/<volumeid>0
u/Sinscerly Apr 16 '24
It depends. If you create a volume with auto delete on instance deletion. It will be deleted when the instance gets deleted.
Volume can be increased when in use. Just use the correct micro version of the api