How to set DrbdOptions/ExactSize property?

I am trying to live move one disk of a Proxmox VM from Linstor to another storage.

It fails with the error:

TASK ERROR: storage migration failed: block job (mirror) error: drive-scsi2: Source and target image have different sizes (io-status: ok)

I found this forum post and this github issue where I learned that I should set the DrbdOptions/ExactSize property to true. So I tried that, but I get:

# linstor resource-definition set-property pm-3f00aa01 DrbdOptions/ExactSize true
ERROR:
Description:
    The property 'DrbdOptions/ExactSize' cannot be set to True while there are currently deployed resources(3).
Details:
    Resource definition: pm-3f00aa01

What is the recommended procedure to set this property?

You should edit /etc/pve/storage.cfg and add:

exactsize yes

example:

drbd: drbdpool
content images
controller 172.16.20.50
resourcegroup pve-rg
exactsize yes

But only do this with VM you want to migrate from local storage to drbd storage, when done migrating do no forget to remove this settings or as I did add a hashtag.

Now I see you already tried moving it but you are stuck at this moment, so I am guessing your VM is still using it’s local storage duo to the error you’ve seen?

If that answer is yes then you should - in my opinion - delete pm-3f00aa01 and try again when you have enabled the above setting.

Please continue with caution and first create a back-up of your VM!

Hello Steven,

Thank you for your reply.

Please note that I do not want to migrate from local storage to drbd/linstor, but the other way around. My VM disk in already in Linstor.

Aha sorry! my mistake.
Never tried this before as well, but I have a test environment so i’ll check out too.

Coming back on this one:

linstor resource-definition list
linstor resource-definition set-property <resource_name> DrbdOptions/ExactSize yes

also in /etc/pve/storage.cfg set exactsize on your drbd volume.
I can do a live move of the storage, i encountered the same issue as you.

I did also test without exactsize in the storage.cfg file while the VM was off, and then started it again after setting the above settings, so if you have a VM with a lots of data you can certainly live move after a reboot of your VM.

I hope this helps!

I have added exactsize yes to /etc/pve/storage.cfg, shut the VM down, started it again and tried to move the disk but i get the same error.

If the VM’s are stopped it works fine, but this is a 20TB disk and it will take a long time to move, so I would prefer to do a live move.

Did you also set this one:
linstor resource-definition set-property <resource_name> DrbdOptions/ExactSize yes

I tried but it returns an error (as explained in my original post):

ERROR:
Description:
    The property 'DrbdOptions/ExactSize' cannot be set to True while there are currently deployed resources(3).
Details:
    Resource definition: pm-3f00aa01

What versions are you using ?
I do not have this issue