move KVMs from local storage server 1 to server 2 connected to SAN, 1 and 2 not clstr

yaboc

Renowned Member
Nov 13, 2012
91
3
73
Hi what would be the best approach to transfer 4 KVMs on local storage on server 1 to server 2 connected to SAN storage (with LVM over it).

command on server 2 with SAN

pvs

PV VG Fmt Attr PSize PFree
/dev/sda2 pve lvm2 a-- 297.59g 16.00g
/dev/sdb SANGROUP lvm2 a-- 1.17t 1.14t

vgs

VG #PV #LV #SN Attr VSize VFree
SANGROUP 1 2 0 wz--n- 1.17t 1.14t
pve 1 3 0 wz--n- 297.59g 16.00g

lvs

LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
vm-100-disk-1 SANGROUP -wi-a--- 31.00g
vm-333-disk-1 SANGROUP -wi-a--- 3.00g
data pve -wi-ao-- 200.09g
root pve -wi-ao-- 74.50g
swap pve -wi-ao-- 7.00g

can i backup restore directly from server 1 to server 2 without sharing the SAN ?

Thanks for any info in advance
 
Re: move KVMs from local storage server 1 to server 2 connected to SAN, 1 and 2 not c

well im not sure if im doing it the right way but im using dd with combination of netcat

on server 1 i shutdown the KVM i want to dd
on the server 2 with SAN i create in GUI KVM same size/options (MAC GB ETH IDE) (of course i used SAN STORAGE for Storage) as on server 1 and then on server 2 (target) execute

nc -l -p 7000 | dd of=/dev/SANGROUP/vm-1xx-disk-1

and on the server 1 (source) i use

dd if=/var/lib/vz/images/1xx/vm-1xx-disk-1.raw | nc <ip-of-target> 7000 -q 10

one the command finishes on server 1 (source) i'm able to start the KVM on server 2.

I'm not sure if this is the right way to do it, please let me know if this is OK. Thanks