Re: Unable to remove LVs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/15/2011 11:07 AM, Bryn M. Reeves wrote:
On 11/15/2011 06:44 AM, Jan Bakuwel wrote:
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

It's possible kpartx is getting confused and is refusing to remove the
maps if they still exist after running this command.

That seems to be the case:

# vgcreate d /dev/loop0
  Volume group "d" successfully created
# lvcreate -n pdc.oa.c -L 4m d
  Logical volume "pdc.oa.c" created
# fdisk /dev/d/pdc.oa.c
[...]
# kpartx -l /dev/mapper/d-pdc.oa.c
d-pdc.oa.c1 : 0 8191 /dev/mapper/d-pdc.oa.c 1
# ls /dev/mapper/d-pdc.oa.c*
/dev/mapper/d-pdc.oa.c  /dev/mapper/d-pdc.oa.cp1
# kpartx -d /dev/mapper/d-pdc.oa.c
# kpartx -l /dev/mapper/d-pdc.oa.c
d-pdc.oa.c1 : 0 8191 /dev/mapper/d-pdc.oa.c 1
# ls /dev/mapper/d-pdc.oa.c*
/dev/mapper/d-pdc.oa.c  /dev/mapper/d-pdc.oa.cp1

It does the right thing if you specify the partition separator on the command line:

# kpartx -d -pp /dev/mapper/d-pdc.oa.c
# ls /dev/mapper/d-pdc.oa.c
/dev/mapper/d-pdc.oa.c

Regards,
Bryn.

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux