Ask Your Question
0

Volume still has 1 dependent snapshots

asked 2014-04-03 02:51:15 -0600

Deeptanshu gravatar image

updated 2016-02-29 15:15:02 -0600

Hi,

We are getting the error listed below while deleting the Volume from Openstack. I have tried it from the CLI too but no luck. Please suggest the solution.

============================================================================================
root@*****:/home/stack# cinder list
+--------------------------------------+--------+--------------+------+-------------------+----------+-------------+
|                  ID                  | Status | Display Name | Size |    Volume Type    | Bootable | Attached to |
+--------------------------------------+--------+--------------+------+-------------------+----------+-------------+
| c51c1aa5-bc49-4c0c-8ea0-30ccf406f851 | error  |     FED      |  20  | First Volume |   true   |             |
+--------------------------------------+--------+--------------+------+-------------------+----------+-------------+
==============================================================================================

ERROR

BadRequest: Invalid volume: Volume still has 1 dependent snapshots (HTTP 400) (Request-ID: req-e14dc10c-9ba5-4f84-ae38-c15a4404f5ce)
edit retag flag offensive close merge delete

Comments

Have you tried deleting the (dependent) snapshot first and then the volume?

unmesh-gurjar gravatar imageunmesh-gurjar ( 2014-04-03 06:28:16 -0600 )edit

Hi,

Actually there is no snapshot available at the moment. How can we delete it from DB ?

Deeptanshu gravatar imageDeeptanshu ( 2014-04-03 07:48:33 -0600 )edit

SELECT * from cinder.snapshots WHERE volume_id = '<your volume="" id="">'; Will show you snapshots connected to the volume, if any.

UPDATE cinder.snapshots SET deleted = 1, deleted_at = NOW() WHERE id = '<your snapshot="" id="">'; Will mark a specific snapshot as deleted in openstack.

muran gravatar imagemuran ( 2014-12-17 02:50:48 -0600 )edit

UPDATE cinder.volumes SET deleted = 1, deleted_at = NOW() WHERE id = '<your volume="" id="">'; Will mark a specific volume as deleted in openstack.

Please note that you might want to check why the snapshot/volume didn't show before doing it this way.

muran gravatar imagemuran ( 2014-12-17 02:52:20 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2016-02-22 10:52:27 -0600

updated 2016-02-22 11:01:41 -0600

In my case i solved like this

. Check your dependent snapshots like this

cinder snapshot-list --all-tenants=1 | grep <volume-id>

. Get yout dependent snapshot id from previous command and delete it

cinder snapshot-delete <snapshot id>

. Finaly delete your volume

cinder delete <volume-id>
edit flag offensive delete link more

Comments

for the first command you can also do:

cinder snapshot-list --volume-id <volume-id>

instead of grepping.

This approach worked fine for me too! Thank you!

stavros gravatar imagestavros ( 2016-06-14 02:35:13 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-04-03 02:51:15 -0600

Seen: 836 times

Last updated: Feb 29 '16