OpenStack 刪除 Cinder 僵屍卷的方法#
lvremove /dev/cinder-volumes/volume-<卷id>
如果提示報錯:#
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
查找映射設備#
ls -la /sys/dev/block/253\:6/holders
刪除 md 設備#
mdadm -S /dev/md125
刪除對應 dm 設備#
dmsetup remove /dev/dm-6
再次檢查是否被打開#
dmsetupinfo -c /dev/cinder-volumes/volume-<卷id>
沒有被打開後再執行刪除#
lvremove /dev/cinder-volumes/volume-<卷id>
提示以下內容後就成功刪除啦#
Logical volume "/dev/cinder-volumes/volume-<卷 id>" successfully. 已刪除