In some version of RHEL and Suse Linux LVM2 won’t remove or deactivate logical volume or volume groups due to their being open.
# lvremove /dev/rootvg/lvswap
Can’t remove open logical volume “lvswap”
Use dmsetup command to check the status of lvm
# dmsetup info -c rootvg-lvswap
Name Maj Min Stat Open Targ Event UUID
rootvg-lvswap 253 8 L–w 1 1 0 Dw0QIgVGOulDwWsiFZMD1Pi7JLQWcNnruaCRo1f8OxdYQpfZYiYigBp1Ccqx1VRa
#man dmsetup
dmsetup is a low level logical volume management
dmsetup manages logical devices that use the device-mapper driver.
As you can see from the above command Open status is equal to 1. Use the following command to remove the dm table entry .
#dmsetup remove rootvg-lvswap2
Try this one more time now
# lvremove /dev/rootvg/lvswap2
Logical volume “lvswap2″ successfully removed


