I'm playing with XEN. After installing the Domain0 I wanted to create an instance with xen-create-image utility  - unssuccessfully, of course. I tryed again, but now I got a different problem. Something about that l12-disk was already created and it was unable to delete it.

root@l00> lvremove /dev/instances/l12-disk  
Do you really want to remove active logical volume l12-disk? [y/n]: y  
device-mapper: remove ioctl on  failed: Device or resource busy  
device-mapper: remove ioctl on  failed: Device or resource busy  
[...]  
Unable to deactivate instances-l12--disk (254:1)  
Unable to deactivate logical volume "l12-disk"

Same happens with dmsetup:

root@l00> dmsetup remove -f --retry /dev/instances/l12-disk  
device-mapper: resume ioctl on instances-l12--disk failed: Invalid
argument  
device-mapper: remove ioctl on instances-l12--disk failed: Device or
resource busy  
device-mapper: remove ioctl on instances-l12--disk failed: Device or
resource busy  
[...] Removed for brevety  
Command failed

You can execute the following command if you want to know if the volume is being used or not:

root@l00> dmsetup info -c /dev/mapper/instances-l12--disk  
Name                Maj Min Stat Open Targ Event  UUID  
instances-l12--disk 254   3 L--w    1    1      0
LVM-E4nzU5k4MgTBK08gvtSvqc16U0ra9maFetLgOVHxSscXDlMQvwZTpxfWWYQq2RNe

As you can see in "Open" there is somebody that is using it. If you want to know who is using and then umount it:

root@l00> fuser -m /dev/mapper/instances-l11--disk  
/dev/dm-2:             369  1792  1827  1841  2109  2210  2247  2254 
2258  2259  2567  2590  2591  2692  2693  2694  2695  2696  2697  2748

root@l00> umount /dev/dm-2

root@l00> dmsetup info -c /dev/mapper/instances-l11--disk  
Name                Maj Min Stat Open Targ Event  UUID  
instances-l11--disk 254   2 L--w    0    1      0
LVM-E4nzU5k4MgTBK08gvtSvqc16U0ra9maFoIIyZRYkzONwj0jtmJY06klkETCuUxnh

And now we can delete the volume and try to create the image again with xen-create-image utility:

lvremove /dev/instances/l12-disk

Take care!