Pages

Tuesday, March 25, 2014

Forcefully remove LVM


You may come across the below error while removing an LVM especially with Xen nodes.
lvremove -f /dev/xen/vmXXX_img
Logical volume xen/vmXXX_img is used by another device.
Here are the steps to remove the LV's forcefully.
dmsetup ls
dmsetup info -c xen-vmXXX_img
dmsetup remove xen-vmXXX_img
lvremove -f /dev/xen/vmXXX_img

3 comments: