lvm is great for creating logical volumes for vps installations on xen. i created a snapshot for doing a backup of one of the vps systems from domain-0, then when i was done, i tried to remove the snapshot with lvremove and the command never finished. later, i found out that any kernel after 2.6.15 requires lvm greater than 2.01 and devmapper greater than 1.01 to avoid such an uninterruptible hang.
here's some info about how i created the snapshot and recovered from the hang error.
here's the setup that led to the problem:
kernel 2.6.16.33-xen running on a debian sarge distro.
lvm2 from sarge installed the following:
lvm2_2.01.04-5_i386.deb
lvm-common_1.5.17_i386.deb
libdevmapper1.01_2%3a1.01.00-4sarge1_i386.deb
The solution is to upgrade to lvm 2.02 or greater and devmapper 1.02 or greater. If you're running sarge, one solution is to read this blog entry http://blog.blackdown.de/2006/04/09/lvm-snapshots-with-debian-sarge-and-linux-2616/ and use the debs that Jürgen has kindly provided.
Thanks Jürgen Kreileder
__________
uname -a
Linux localhost 2.6.16.33-xen #1 SMP Mon Jan 8 14:39:02 GMT 2007 i686 GNU/Linux
lvm version
LVM version: 2.01.04 (2005-02-09)
Library version: 1.01.00-ioctl (2005-01-17)
Driver version: 4.5.0
#this command with the above version of lvm caused a hang
lvremove /dev/vg01/tempsnap
#to use the blackdown.de debs, perform the following
#add the following lines to /etc/apt/sources.list
deb http://blog.blackdown.de/static/debian/lvm/ sarge main
deb-src http://blog.blackdown.de/static/debian/lvm/ sarge main
#execute the following so apt knows about the blackdown debs
apt-get update
#if you want to see what it will do first, use apt-get -s
apt-get -s install lvm2 libdevmapper1.02 lvm-common
#then install it for real
apt-get install lvm2 libdevmapper1.02 lvm-common
#then you can check the installed version with
lvm version
LVM version: 2.02.02 (2006-02-07)
Library version: 1.02.03 (2006-02-08)
Driver version: 4.5.0
#the following debs were installed
libdevmapper1.02_2%3a1.02.03-1jk1_i386.deb
lvm2_2.02.02-1jk1_i386.deb
lvm-common_1.5.20jk1_i386.deb
up