From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4EC24A12.20200@redhat.com> Date: Tue, 15 Nov 2011 11:16:34 +0000 From: "Bryn M. Reeves" MIME-Version: 1.0 References: <4EC09964.1080305@omiha.com> <4EC12F54.2000303@redhat.com> <4EC20A6A.10709@omiha.com> <4EC247E0.7050905@redhat.com> In-Reply-To: <4EC247E0.7050905@redhat.com> Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Unable to remove LVs Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: LVM general discussion and development Cc: Jan Bakuwel 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.