I have some Proxmox 4.2 nodes with different hardware configuration. Nodes are not in the clusters, but have common NFS storage for backup and migration. Of course, migration without cluster downtime is inevitable.
For migration from node A to node B:
It's OK, but I have some LXC VM with small and large bind mounts, mp0, mp1, ...
Bind mounts not included into backup container. I use rsync:
Because bind mounts paths are different I add -mpN option into restore command:
Suddenly receive error: mountpoints configured, but 'rootfs' not set - aborting
Hmm. Add -rootfs option:
Another error: unable to parse volume ID 'local-lvm'
Add size for rootfs:
OK, restored!
I have different sizes, some with 4Gb, some else. I can get rootfs size from source node:
Maybe someone knows a better solution? It maybe better to unset all bind mounts before dump on node A and set again on node B after restore?
For migration from node A to node B:
Code:
nodeA:/# pct shutdown $VM
nodeA:/# vzdump $VM --storage transfer --quiet 1 --compress lzo --mode stop
nodeB:/# pct restore $VM /mnt/pve/transfer/dump/vzdump-lxc-$VM-*.lzo \
-storage local-lvm
nodeB:/# pct start $VM
nodeA:/# pct destroy $VM
Bind mounts not included into backup container. I use rsync:
Code:
nodeA:/# rsync -ar --numeric-ids /mnt/xxx/binds/$VM/home \
--rsh=ssh $nodeB:/mnt/yyy/binds/$VM/home
Code:
nodeB:/# pct restore $VM /mnt/pve/transfer/dump/vzdump-lxc-$VM-*.lzo \
-storage local-lvm \
-mp0 mp=/home,/mnt/yyy/binds/$VM/home
Hmm. Add -rootfs option:
Code:
nodeB:/# pct restore $VM /mnt/pve/transfer/dump/vzdump-lxc-$VM-*.lzo \
-storage local-lvm \
-mp0 mp=/home,/mnt/yyy/binds/$VM/home \
-rootfs local-lvm
Add size for rootfs:
Code:
nodeB:/# pct restore $VM /mnt/pve/transfer/dump/vzdump-lxc-$VM-*.lzo \
-storage local-lvm \
-mp0 mp=/home,/mnt/yyy/binds/$VM/home \
-rootfs local-lvm:4
I have different sizes, some with 4Gb, some else. I can get rootfs size from source node:
Code:
nodeA:/# pct config $VM | grep 'rootfs: ' | cut -f 2 -d = | cut -f 1 -d G
Maybe someone knows a better solution? It maybe better to unset all bind mounts before dump on node A and set again on node B after restore?