The problem is a known bug. The reason for the message is because of the drbd-metadata, which adds to the guest storage and thus leading to different sizes. A workround exists by using external metadata. This is discouraged (by linbit) because the linstor-proxmox-plugin is only designed for use with internal metadata.
Comment to the bug from a developer:
tl;dr: the problem is now fully understood, but it will take time until this is fully resolved.
The problem is fixed with the latest version of the linstor-proxmox plugin. One has to set โexactsize yesโ as option for the linstor-storage in /etc/pve/storage.cfg for online storage migration to work.
I think itโs obvious, that having to set an additional flag is not a perfect choice and I would love linstor/drbd more, to have a software that just works โข. But so far: Thanks for the fix!
This avoided a successful test for online moving of storage from lvm to linstor. The value ExactSize yes was overruled by this resource-definition and I again got the error.
I had to delete that resource-definition. After that the live online storage moving worked again.
I still have unresolved trouble migrating Storage and VM. There is a VM, I migrated back and forth and it can not be migrated between lvm and linstor because of the different sizes problem, although exactsize is set to yes, although the settings of any resource-definition object has exactsize set to yes.
I have been using a Proxmox cluster for testing lately and I am able to reproduce this.
First, if I create a new disk for a running VM backed by LINSTOR with the exactsize yes parameter specified in /etc/pve/storage.cfg, I can move this disk image back and forth between LVM โ LINSTOR repeatedly without issue while the VM is running. Everything works as expected here.
However, exactsize yes is only supposed to be temporarily set for migrationโฆ
On the flipside, creating a new disk image for a running VM backed by LINSTOR with exactsize no presents an issue. Trying to move a running VMโs disk from LINSTOR โ LVM at this stage results in:
TASK ERROR: storage migration failed: block job (mirror) error: drive-virtio2: Source and target image have different sizes (io-status: ok)
So, when prepping for migration and toggling exactsize yes in /etc/pve/storage.cfg, and also ensuring that the current resource definition is adjusted (linstor rd set-property <res_id> DrbdOptions/ExactSize yes), migration still fails in Proxmox:
TASK ERROR: storage migration failed: block job (mirror) error: drive-virtio2: Source and target image have different sizes (io-status: ok)
The workaround is to detach the disk, re-attach and then attempt live migration once more. Power cycling the virtual machine also allows the migration to happen, and of course, offline migration works without issue.
Iโm guessing the background DRBD adjust command either needs to do some extra operations for this to work, or DRBD has a technical reason it needs to be demoted to Secondary (inactive) when DrbdOptions/ExactSize yes is toggled from no to yes.
Thanks for powering through this one, Iโll comment on the GitHub issue with the findings above.