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

Re: [linux-lvm] Unable to remove LVs



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.


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