From: "Bryn M. Reeves" <bmr@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: Jan Bakuwel <jan.bakuwel@omiha.com>
Subject: Re: [linux-lvm] Unable to remove LVs
Date: Tue, 15 Nov 2011 11:16:34 +0000 [thread overview]
Message-ID: <4EC24A12.20200@redhat.com> (raw)
In-Reply-To: <4EC247E0.7050905@redhat.com>
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.
next prev parent reply other threads:[~2011-11-15 11:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-14 4:30 [linux-lvm] Unable to remove LVs Jan Bakuwel
2011-11-14 15:10 ` Bryn M. Reeves
2011-11-15 6:44 ` Jan Bakuwel
2011-11-15 11:07 ` Bryn M. Reeves
2011-11-15 11:16 ` Bryn M. Reeves [this message]
[not found] ` <4EC2D031.3090101@omiha.com>
2012-09-17 23:54 ` Jan Bakuwel
2012-09-18 1:10 ` [linux-lvm] Unable to remove LVs - problem solved Jan Bakuwel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EC24A12.20200@redhat.com \
--to=bmr@redhat.com \
--cc=jan.bakuwel@omiha.com \
--cc=linux-lvm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).