VM migration from shared to local storage

kia0

New Member
Mar 6, 2024
4
0
1
Hello
We have Proxmox VE 8.3 cluster with some nodes used shared SAN storage while some nodes have only local disks. I needed to stop one node with local storage to do a hardware maintenance. So I migrated VM's to another node with shared storage, this passed online w/o problems. Now I try to migrate VM's back from shared storage node back to local storage node but it seems problematic. In web GUI in migration form I do not see target storage selection item, just nodes list. If I try to use qm command line, I receive error:
root@hypervm3:/home/sysadm# qm migrate 207 gate3 --bwlimit 50000 --online yes --targetstorage gate3-local --with-local-disks yes
2025-02-24 12:08:45 ERROR: migration aborted (duration 00:00:00): storage 'elev' is not available on node 'gate3'
migration aborted
'elev' is name of the shared LVM storage while 'gate3' node have only 'gate3-local' LVM storage. The error looks strange as different previous local-to-local, local-to-shared and shared-to-shared storage online migrations passed successfully.

Any ideas to put my VM's back to local storage node?

Regards, Ivan
 
Hi!

What is the output of cat /etc/pve/storage.cfg | sed -n '/\(elev\|gate3-local\)/,/^$/p' - (shows the configuration for the elev and gate3-local storage)?
 
Code:
lvm: elev
        vgname elev
        content images,rootdir
        nodes hypervm1,hypervm2,hypervm3
        shared 1

lvm: gate3-local
        vgname gate3-vg
        content images,rootdir
        nodes gate3
        saferemove 0
        shared 0
The shared storage node I have problem with is 'hypervm3'. storage.cfg is identical on all cluster nodes
 
Could you try to set the shared property to 0 (or uncheck it in the WebUI) for the elev storage for the migration from elev to gate3-local?
 
Will it be safe? There are a number of other active VM's on shared storage nodes
AFAIK it's currently a rather unsupported setup to have shared storages in a cluster, which are available only on a subset of the cluster's nodes. It seems like that the "shared" flag here is treated as "is currently shared on all nodes", see e.g. [0] for a related bug report. You can chime in to the bug report if you want to see this feature realized as I can see a benefit to support this.

For now, it should be safe to disable the "shared" option, as it is only considered when a new action is taken (e.g. starting a VM, changing VM configs, etc.), but won't do actions on its own. Another way to circumvent this currently would be to first migrate the VM to a local storage on hypervm3 and then migrate the VM to the local storage of gate3.

[0] https://bugzilla.proxmox.com/show_bug.cgi?id=3229#c4