[CentOS] LVM not removing LV

Fri Aug 22 14:13:57 UTC 2008
Toby Bluhm <tkb at midwestinstruments.com>

nate wrote:
> Mag Gam wrote:
>> I am using RHEL 5.1 with custom kernel.

Might be something about your custom kernel that affects lvm operations.
It could be you have a version mis-match in lvm components in your system.

>> I have a LV I am trying to remove and its keep complaining its open. I
>> have unmounted the filesystem, lsof shows nothing, fuser shows
>> nothing. I am certain a reboot will fix it, but I don't know why this
>> occurs. Can anyone shed some light on this?
>> Are there some other LVM hacks I can use for this?

No snapshots still present for that lv?

> Not really a hack but you need to deactivate it:
> lvchange -a n <logical volume>
> Verify that it's deactivated with the lvdisplay command

Current versions of lvm/lvremove will do that automatically.

Toby Bluhm
Alltech Medical Systems America, Inc.