lxc migration - lost data

Leo David

Well-Known Member
Apr 25, 2017
115
6
58
46
Hi everyone,
I'm in process of upgrading cluster nodes from pve4 to pve5.
All went good, until i've migrated 3 lxc's from node1(pve4) to node2 (pve5).
Those lxc's filesystems where on local lvm, just a separated hdd

LV Path /dev/data/vm-117-disk-1
LV Name vm-117-disk-1


On the destination node, the lvm storage was not yet created, but still the migration finnished:

Oct 13 10:08:45 starting migration of CT 115 to node 'pmx5' (10.10.6.115)
Oct 13 10:08:45 volume 'ssd-data:vm-115-disk-1' is on shared storage 'ssd-data'
Oct 13 10:08:46 start final cleanup
Oct 13 10:08:47 migration finished successfully (duration 00:00:02)
TASK OK

Now, of course the containers are not starting because the lvm storage doesn't exists on the new node.
The problem is that the lxc's images disapeard from pve4 node, and i just don't know how to get them back. Migration from pve5 to pve4 seems not to be possible though...
Maybe some check needs to be done before migration, to see if the storage actually exists on the destination node.
Do you have any ideea how can i get those lxc disks back ?
Thank you very much !
 
you marked your storage as shared, even though it isn't. move the config file back, and configure your storages correctly, then migration will copy local disks from source to target node.
 
Thank you,
But seems i can't copy/move the config files from pve5 node back to pve4 node:
root@pmx5:/etc/pve/lxc# scp 115.conf pmx4:/etc/pve/lxc/
scp: /etc/pve/lxc//115.conf: File exists
 
you need to move it locally from /etc/pve/nodes/NODE1/lxc/ to /etc/pve/nodes/NODE2/lxc (/etc/pve is synced in a cluster).