背景:逻辑卷删除失败导致虚拟机销毁失败,逻辑卷删除失败通常分为两类:(1)Logical volume domu/fc37fd2d-02c4-4f3c-929b-6556d0e6b_vda contains a filesystem in use,逻辑卷被挂载未umount掉,直接lvremove;(2)Logical volume domu/fc37fd2d-02c4-4f3c-929b-6556d0e6b_vda is used by another device,逻辑卷被其他设备使用中,lvremove失败。
一、逻辑卷被设备占用,lvremove失败
报错信息“Logical volume domu/fc37fd2d-02c4-4f3c-929b-6556d0e6b_vda is used by another device”,我们需要查找逻辑卷的映射,然后找到映射设备,最后删除点映射设备。
[rootbird~]# dmsetup info -c |grep “fc37fd2d-02c4-4f3c-929b-6556d0e6b_vda”
fc37fd2d-02c4-4f3c-929b-6556d0e6b_vda 253 1 L–w 1 1 0 LVM-OC1NaKa5z5xnsTcIS5chrT4nclVg53lBhaaduekEB7M50Qz70o9vg4sDfSdQSEq9
[rootbir