While we removing logical volumes, some times we get this error. When the lvs are in open status.

[root@manny ~]# lvremove /dev/mapper/test_vg-testlv
Can't remove open logical volume "testlv"

Device mapper maintains entry for logical drives, so first we need to delete it from there. Then it can't restrict us while removing logical volumes which are in open status.

[root@manny ~]# dmsetup info -c  /dev/mapper/testvg-testlv
Name             Maj Min Stat Open Targ Event  UUID                                                              
testvg-testlv    253   1 L--w    1    1      0 LVM-CqaHxtgmt8hIOru9k6tYjYJU9oHyuvrtKiOnlIVuDElaLh4yFwJd9mCrpB0cJ

From above table you can see Open = 1 which means the logical volume testlv is open status, so we need to delete entry for this logical volume from dmsetup table then only we can delete any logical volume with open status.  let's do it

[root@manny ~]# dmsetup remove /dev/mapper/testvg-testlv
[root@manny ~]# lvremove /dev/mapper/testvg-testlv
[root@manny ~]# Logical volume “lvswap2″ successfully removed

testlv is removed successfully, hope works for you also and enjoy.