I am using Xen with LVM2. When I create a vm in HVM - Mode (full-virtualized), the used logical Volume keeps open after the virtual machine ist stoped. Even after reboot, there ist always one "thing" that keeps the lv open. The problem is that I cannot access the lv any other way than with xen. I think that there is something in Xen, that forget to set the partition back to "unused" lvdisplay shows: --- Logical volume --- LV Name /dev/vms/server2003 VG Name vms LV UUID noTd9j-nVqZ-tuUL-pnLt-9ZSc-7phZ-Px2P1o LV Write Access read/write LV Status available # open 1 LV Size 10.00 GB Current LE 2560 Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:1 --- Logical volume --- LV Name /dev/vms/test VG Name vms LV UUID iwn7JU-DnsL-9dPr-eBvo-gR1a-SwNJ-g7ZQEW LV Write Access read/write LV Status available # open 0 LV Size 10.00 GB Current LE 2560 Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:2 --- Logical volume --- LV Name /dev/vms/windows-legacy VG Name vms LV UUID KSttrw-8IcL-iy1g-i0t1-eu30-Aow2-UqVAqX LV Write Access read/write LV Status available # open 3 LV Size 20.00 GB Current LE 5120 Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:4 where /dev/vms/server2003 is not running /dev/vms/test is ext2 and never used by xen, instead normaly mount/unmount /dev/vms/windows-legacy is running I am using: app-emulation/xen-3.1.2 app-emulation/xen-tools-3.1.2 sys-fs/udev-115-r1 sys-fs/lvm2-2.02.28-r2 sys-kernel/xen-sources-2.6.20-r6 Reproducible: Always Steps to Reproduce: 1.lvcreate -L10G -ntest vms 2.xm create test-windows 3.Shutdown Windows 4.lvdisplay Actual Results: lvdisplay shows alway at least 1 open Expected Results: should be not open by anything
I think I have a similar problem with snapshot LVs. The system that uses the LVs has run for years, after update of udev and lvm2.... Removing LV-snapshot after use fails most of the time.