Pve 4.2-2: Volume Group disappears using LVM on multipathed iSCSI storage

sidmax

Renowned Member
Oct 8, 2010
11
0
66
Bergamo, Italy
Hi all,

while working on a small cluster with shared storage on iSCSI, I've noticed a problem with multipath that I can consistently reproduce. I've done some tests with a single (non clustered) node to exclude problems related to the cluster setup. I've tried with and without multipath and the problem happens only with multipath enabled.

Initial setup:
  • iSCSI Lun created on storage and mapped R/W to the proxmox node
  • Multipath installed and configured
Steps to reproduce the problem:
  • I create the iSCSI storage with Proxmox GUI and deselect "Use LUNs directly"
  • I add a LVM ("classic" lvm, not thin), choose the iSCSI storage and select the LUN as base storage, and give it a name (vg98): the VG is created as confirmed by vgdisplay in the shell
  • I try to restore a backup, choosing the LVM storage I've just created as destination and get the following error:
restore vma archive: lzop -d -c /mnt/pve/test/dump/vzdump-qemu-100-2016_06_01-01_07_09.vma.lzo|vma extract -v -r /var/tmp/vzdumptmp19529.fifo - /var/tmp/vzdumptmp19529
CFG: size: 337 name: qemu-server.conf
DEV: dev_id=1 size: 34359738368 devname: drive-virtio0
CTIME: Wed Jun 1 01:07:12 2016
Logical volume "vm-100-disk-1" created.
new volume ID is 'vg98:vm-100-disk-1'
Volume group "vg98" not found
Volume group "vg98" not found
can't deactivate LV '/dev/vg98/vm-100-disk-1': Cannot process volume group vg98
TASK ERROR: volume deativation failed: vg98:vm-100-disk-1 at /usr/share/perl5/PVE/Storage.pm line 932.

Doing a vgdisplay in the shell shows the volume group vg98 has disappeared!

If a repeat the previous steps from the beginning, disabling multipath I get no error (apart the obvious warnings about duplicate PVs).

Other tests:
  • created the VG from the command-line and then added in the gui chosing "existing VG"
  • changed the filter value in /etc/lvm/lvm.conf to exclude anything except /dev/sda* (local disk) and /dev/mapper/mpath*
Workaround:

After the failed attempt to restore the backup, and after the VG vanished I've recovered it from the shell with:

vgcfgrestore vg98

After this everything seems to work fine


Any idea?