[linux-lvm] Unable to remove LVs

Jan Bakuwel jan.bakuwel at omiha.com
Tue Nov 15 06:44:58 UTC 2011


Hi Bryn,
 
> The partition map has a 'p' separator - d-pdc.oa.cp1 - the correct
> command is:
>
> kpartx -d /dev/mapper/d-pdc.oa.c

# kpartx -d /dev/mapper/d-pdc.oa.c
# kpartx -l /dev/mapper/d-pdc.oa.c
d-pdc.oa.c1 : 0 71103627 /dev/mapper/d-pdc.oa.c 63
# lvs | grep oa
  pdc.oa.c         d    -wi-ao  37.00G      

>
>> server1:/# lvs | grep oa
>>    pdc.oa.c         d    -wi-ao  37.00G
>
> The LV is still showing as active and open here. You should be able to
> remove it with lvremove d/pdc.oa.c or shut it down with
> vgchange/lvchange after correctly removing the kpartx mapping.

# lvremove d/pdc.oa.c
  Can't remove open logical volume "pdc.oa.c"
# lvchange -a n d/pdc.oa.c
  LV d/pdc.oa.c in use: not deactivating

>
> If it still shows as open you may want to look at the output of
> "dmsetup ls --tree" to see if there are other device-mapper devices
> using it and make sure that it's not mounted anywhere.

# dmsetup ls --tree
d-pdc.oa.cp1 (254:78)
 └─d-pdc.oa.c (254:7)
    └─ (8:11)


I'm positive it's not mounted anywhere.

Any advice how to proceed from here?

kind regards,
Jan




More information about the linux-lvm mailing list