SHED

SHEDの博客

【技术教程】OpenStack 删除Cinder僵尸卷的方法

OpenStack 删除 Cinder 僵尸卷的方法#

lvremove /dev/cinder-volumes/volume-<卷id>
image

如果提示报错:#

device-mapper: remove ioctl on failed: Deviceor resource busy. 设备繁忙

卷文件系统被占用

检查是否被打开#

dmsetupinfo -c /dev/cinder-volumes/volume-<卷id>

查看被谁打开#

fuser -m /dev/cinder-volumes/volume-<卷id>

将进程杀掉#

kill -9 28964 28968 28970 29906

如果提示报错:#

Logical volume cinder-volumes/volume-<卷 id> is used by another device.

卷可能被其他设备占用

首先查找到卷的映射#

dmsetup info -c
image

查找映射设备#

ls -la /sys/dev/block/253\:6/holders
image

删除 md 设备#

mdadm -S /dev/md125
image

删除删除对应 dm 设备#

dmsetup remove /dev/dm-6
image

再次检查是否被打开#

dmsetupinfo -c /dev/cinder-volumes/volume-<卷id>

没有被打开后再执行删除#

lvremove /dev/cinder-volumes/volume-<卷id>
image

提示以下内容后就成功删除啦#

Logical volume "/dev/cinder-volumes/volume-<卷 id>" successfully. 已删除

最后进入 OpenStack 将卷删除即可#

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.