DEV Community

Garett Dunn
Garett Dunn

Posted on • Originally published at garettmd.com on

Liberate Orphaned OpenStack Volumes

If you delete a server that a volume is attached to, and then quickly try to delete the volume before the server has finished deleting (at least, that’s where I think the problem stems from; it could just be that this happens even if you waited for it to fully delete), the volume can get stuck saying that it’s still attached. You cannot run openstack server remove volume <server id> < volume id> because it will complain that the server doesn’t exist. The only way I could figure out how to get around this is to use the cinder tool to remove the attachement ID

openstack volume show <volume_id>
# Grab the attachment ID for use in next step

cinder --os-volume-api-version 3.50 attachment-delete <attachment_id>
# For some reason you have to specify at least api version 3.50. Why it can't figure this out on it's own is beyond me
Enter fullscreen mode Exit fullscreen mode

Hopefully this will help someone out.

Oldest comments (0)