[CentOS-virt] Cannot remove lvs associated with deleted vm guests

Mon Jan 30 17:45:29 UTC 2012
James B. Byrne <byrnejb at harte-lyne.ca>

This problem was finally resolved with the generous help
of Bryn M. Reeves on the inux-lvm at redhat.com list.

The difficulty was that the utility kpartx had the lvs
opened via their mappings.  Further, the mappings were
created with the -pp option of kpartx and that option had
to be provided to the delete action in order for that to

# kpartx -d -pp /path/to/logical/volume/name

Once the mappings were removed then the lvremove also
worked and the volumes were removed.

A small point, failure to provide the -pp option to the
kpartx -d action does not raise an error.  Nor does it
remove the mapping however.

***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB at 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