openstack中volumes无法删除问题一直显示删除中-已解决

1.找到没有连接的卷,闲置的表现故障是删除这个卷之后显示删除成功,但是之后还是显示可用

[root@manage25 ~]# cinder list|grep ava

+--------------------------------------+------+-----------+------+----------------------------------------------------------+

| ID                                  | Name | Status    | Size | Attached to                                              |

+--------------------------------------+------+-----------+------+----------------------------------------------------------+

| 19067f72-9340-4e40-9277-dada28b50afe |      | in-use    |  500 | Attached to idc-bj-ops-paas.monitor-3 on /dev/vda        |

| 84772cdf-6b5b-4e28-b1a5-4dd9b3999c9d |      | in-use    |  500 | Attached to idc-bj-ops-paas.monitor-1 on /dev/vda        |

| 54176c63-128c-4d8f-80b6-dfa9d0b82ecd |      | in-use    |  500 | Attached to idc-bj-ops-paas.monitor-2 on /dev/vda        |

| e591df3c-23fa-4e68-a5c9-4dd39ac88cc2 |      | available |  500 |                                    |  43  |      -      |  true  |                                      |

2.在存储集群中找打这个卷

[root@manage25 ~]# rbd ls -p volumes |grep e591df3c-23fa-4e68-a5c9-4dd39ac88cc2volume-e591df3c-23fa-4e68-a5c9-4dd39ac88cc2

3.查看卷的信息

[root@manage25 ~]# rbd info volume-e591df3c-23fa-4e68-a5c9-4dd39ac88cc2 -p volumes

rbd image 'volume-da605031-49d3-49c9-9b7d-968b100dcb87':

size 54GiB in 13824 objects

order 22 (4MiB objects)

block_name_prefix: rbd_data.2be40e33483d1e

format: 2

features: layering, exclusive-lock, object-map, fast-diff, deep-flatten

flags:

create_timestamp: Wed Feb 10 23:51:03 2021

# 有一个快照

parent: volumes/0ad7ae89-8b34-4db4-a873-7904c46ce17b@snap

overlap: 50GiB

4.查看这个卷有没有客户端,如果有可以吧客户端断开之后再删除,比如rbd map

[root@manage25 ~]# rbd status volume-e591df3c-23fa-4e68-a5c9-4dd39ac88cc2 -p volumes

Watchers: none

5.查看快照信息,可以看出这个快照,并且是受保护状态,如果要删除,确定对集群不会产生影响,删除快照再删除块设备即可。

[root@manage25 ~]# rbd info volumes/0ad7ae89-8b34-4db4-a873-7904c46ce17b@snap

rbd image '0ad7ae89-8b34-4db4-a873-7904c46ce17b':

size 50GiB in 6400 objects

order 23 (8MiB objects)

block_name_prefix: rbd_data.2b6dd7341ee655

format: 2

features: layering, exclusive-lock, object-map, fast-diff, deep-flatten

flags:

create_timestamp: Wed Feb 10 23:18:07 2021

protected: True

6.删除卷的信息

删除块设备:rbd rm volume-e591df3c-23fa-4e68-a5c9-4dd39ac88cc2 -p volumes

删除卷设备:openstack volume delete e591df3c-23fa-4e68-a5c9-4dd39ac88cc2

你可能感兴趣的:(openstack中volumes无法删除问题一直显示删除中-已解决)