Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if the Openstack kilo virtual machine cannot delete the cloud disk?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail what to do if the Openstack kilo version of the virtual machine cannot delete the cloud disk. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.

Background:

In the Openstack kilo version, after terminating the CVM, it is found that the corresponding cloud disk cannot be deleted, and the deletion prompt that the error is reported to the cloud disk is not an error or available status, so switch to the admin user and manually update the status of the cloud disk to the error status.

Delete step: check the cloud disk status: # cinder list | grep error | 2e641c12-79bf-463b-b65b-6e81534ececa | error | hyp_001 | 50 |-| true | 57a8ff48-4b9e-4dfd-b038-bbf8bc3f13d3 | error | hyp_002 | 50 |-| true | | |

The command line is deleted, indicating that there is also a dependent snapshot.

# cinder delete 2e641c12-79bf-463b-b65b-6e81534ececaDelete for volume 2e641c12-79bf-463b-b65b-6e81534ececa failed: Invalid volume: Volume still has 1 dependent snapshots. (HTTP) (Request-ID: req-5ba025fb-5a61-422b-b00a-556e19083bd5) ERROR: Unable to delete any of the specified volumes. View snapshot: # cinder snapshot-list | grep hyp | 1806ff4c-558b-4a99-808f-1998163d5692 | 2e641c12-79bf-463b-b65b-6e81534ececa | deleting | snapshot for hyp_001_ initialization | 50 | | 3cb470d2-4098-4975-a321-2bb85cf1e91a | 57a8ff48-4b9e-4dfd-b038-bbf8bc3f13d3 | deleting | snapshot for hyp_002_ initialization | 50 |

Found that the snapshot is in deleting state, as it has always been

View the ceph pool and select the id number of hyp_001

# rbd ls-p volumes | grep 2e641c12-79bf-463b-b65b-6e81534ececavolume-2e641c12-79bf-463b-b65b-6e81534ececa

As we can see, the cloud disk that cannot be deleted is a hard disk that depends on snapshots, but the reason why snapshots cannot be deleted is unknown. There is no way but to use violent means to enter the Metabase.

Mysql > select id,status,volume_id,display_name from snapshots where volume_id = '2e641c12-79bfmur463 b65bmur6e81534eca' +-- -+ | id | status | volume_id | display_name | +-- +-- -+-+ | 1806ff4c-558b-4a99-808f-1998163d5692 | deleting | 2e641c12-79bf-463b-b65b-6e81534ececa | snapshot for hyp_001_ initialization | +-- -+-+-- +-+ delete data in Metabase

The table snapshots in the metadata cinder library can view the information of the snapshot of hyp_001 and delete it

Mysql > delete from snapshots where volume_id = '2e641c12-79bf muri 463b65bMuth6e81534ecahydronism politics query OK, 1 row affected (0.00 sec)

Then delete the cloud disk on the command line and find that it has been deleted.

# cinder delete 2e641c12-79bf-463b-b65b-6e81534ececa# cinder list | grep error | 57a8ff48-4b9e-4dfd-b038-bbf8bc3f13d3 | error | hyp_002 | 50 |-| true | |

Check the snapshot and ceph pool and find that it is also gone

# cinder snapshot-list | grep hyp | 3cb470d2-4098-4975-a321-2bb85cf1e91a | 57a8ff48-4b9e-4dfd-b038-bbf8bc3f13d3 | deleting | snapshot for hyp_002_ initialization | 50 | # rbd ls-p volumes | grep 2e641c12-79bf-463b-b65b-6e81534ececa

Delete the other one in the same way.

1. Pay attention to the two fields of id core volume-id when deleting, so as not to get confused.

2, the test environment, violence to solve the problem is still not very good, pay attention to check the log to prescribe the right medicine.

This is about what to do if the Openstack kilo virtual machine cannot delete the cloud disk. I hope the above content can be of some help and learn more. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report