Friday, February 18, 2011

LVM: Can't remove open logical volume



lvremove command can't remove open logical volume



[root@rhel01 /]# lvremove /dev/lab_group/lab01

Can't remove open logical volume "lab01"

Command failed


Using dmsetup command to check the status of the LVM



[root@rhel01 /]# dmsetup info -c lab_group-lab01

Name             Maj Min Stat Open Targ Event  UUID

lab_group-lab01  253   7 L--w    0    1      0 LVM-XHpst6rC31EOIHxjWAp6CfbCBUIcF                                                                        p1uqjWa6RINr32OZVWF0pdnfaal8DKoUZGH


Eventhough Open is 0 still can't remove the logical volume




[root@rhel01 /]# lvremove /dev/lab_group/lab01

Can't remove open logical volume "lab01"



Removing dm table entry



[root@rhel01 /]# dmsetup remove lab_group-lab01


lvremove successfully removed the logical volume



[root@rhel01 /]# lvremove /dev/lab_group/lab01

Logical volume "lab01" successfully removed




No comments: