From: "James B. Byrne" <byrnejb@harte-lyne.ca>
To: "Bryn M. Reeves" <bmr@redhat.com>
Cc: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Cannot delete lv
Date: Mon, 30 Jan 2012 12:34:56 -0500 [thread overview]
Message-ID: <17b6cba6866a7d79f73a7fd6dc5e27f1.squirrel@webmail.harte-lyne.ca> (raw)
In-Reply-To: <4F26CD7D.7030400@redhat.com>
On Mon, January 30, 2012 12:03, Bryn M. Reeves wrote:
>
> The partition maps were apparently created with kpartx's
> "-p p" option
> to force a partition separator of 'p' (the default is to
> use a 'p' if
> the device name ends with a numeral but no separator
> otherwise).
>
> If the maps were created with -pp kpartx will refuse to
> remove them if
> the option is not given (but helpfully doesn't report any
> error.. :-/):
>
> # ls /dev/mapper/vg_mother-lv_base*
> /dev/mapper/vg_mother-lv_base
> /dev/mapper/vg_mother-lv_basep1
> # kpartx -d /dev/mapper/vg_mother-lv_base
> # ls /dev/mapper/vg_mother-lv_base*
> /dev/mapper/vg_mother-lv_base
> /dev/mapper/vg_mother-lv_basep1
> # kpartx -d -pp /dev/mapper/vg_mother-lv_base
> # ls /dev/mapper/vg_mother-lv_base*
> /dev/mapper/vg_mother-lv_base
>
> Just add the -pp to your kpartx command lines and it
> should remove the
> devices.
>
[root@vhost01 ~]# kpartx -d -pp
/dev/mapper/vg_vhost01-lv_vm_base
[root@vhost01 ~]# kpartx -d -pp
/dev/mapper/vg_vhost01-lv_vm_basep1
failed to stat() /dev/mapper/vg_vhost01-lv_vm_basep1
[root@vhost01 ~]# /sbin/lvremove -f
/dev/vg_vhost01/lv_vm_base
Logical volume "lv_vm_base" successfully removed
And repeated as required.
Success! Thank you so very much. I would never have
discovered this on my own. Never.
[root@vhost01 ~]# dmsetup ls --tree
vg_vhost01-lv_swap (253:1)
└─ (8:2)
vg_vhost01-lv_root (253:0)
└─ (8:2)
vg_vhost01-lv_centos_repos (253:8)
└─ (8:2)
vg_vhost01-lv_tmp (253:2)
└─ (8:2)
vg_vhost01-lv_vm_inet02.harte--lyne.ca_00 (253:21)
└─ (8:2)
vg_vhost01-lv_vm_inet03.harte--lyne.ca_00 (253:23)
└─ (8:2)
vg_vhost01-lv_log (253:4)
└─ (8:2)
vg_vhost01-lv_vm_inet04.harte--lyne.ca_00 (253:25)
└─ (8:2)
vg_vhost01-lv_spool (253:3)
└─ (8:2)
vg_vhost01-lv_vm_inet08.harte--lyne.ca_00 (253:24)
└─ (8:2)
vg_vhost01-lv_vm_inet09.harte--lyne.ca_00 (253:22)
└─ (8:2)
Everything appears clean now and I have confirmed that the
disk space has been returned to the virt-manager storage
pool.
Again, thank you.
--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3
prev parent reply other threads:[~2012-01-30 17:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 15:44 [linux-lvm] Cannot delete lv James B. Byrne
2012-01-30 15:57 ` James B. Byrne
2012-01-30 16:00 ` Bryn M. Reeves
2012-01-30 16:00 ` Bryn M. Reeves
2012-01-30 16:25 ` James B. Byrne
2012-01-30 16:30 ` Bryn M. Reeves
2012-01-30 16:50 ` James B. Byrne
2012-01-30 17:03 ` Bryn M. Reeves
2012-01-30 17:34 ` James B. Byrne [this message]
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=17b6cba6866a7d79f73a7fd6dc5e27f1.squirrel@webmail.harte-lyne.ca \
--to=byrnejb@harte-lyne.ca \
--cc=bmr@redhat.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).