Guest User

Untitled

a guest
Dec 27th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. #New host
  2.  
  3. #Create a bank LV the same size as the source
  4. lvcreate -L 400G -n kvm133_img vm_vg
  5.  
  6. #Old Host
  7.  
  8. #Creat a snapshot to stop any new data being written to the 400G LV, All changes get written to the snap lv now
  9. lvcreate --snapshot -L10G -n kvm133-snap /dev/4tb_raid_vg/kvm133_img
  10.  
  11. #Copy the data from the source lv to the new hosts blank lv
  12. dd if=/dev/4tb_raid_vg/kvm133_img bs=1M | pv -ptrb -s 400G | ssh [email protected] 'dd of=/dev/vm_vg/kvm133_img'
  13. # Relax and have a drink
  14.  
  15. # Wait
  16.  
  17. # Tap your foot and wait some more
  18.  
  19.  
  20. #Shut down vm the on the old host
  21. virsh shutdown kvm133
  22.  
  23. #Then lastly Sync the data that was changed in the vps while the 400g was copied, should only take 1 minute
  24. lvmsync /dev/4tb_raid_vg/kvm133-snap [email protected]:/dev/vm_vg/kvm133_img
  25.  
  26. #Solusvm master
  27. /scripts/vm-migrate 77 8
  28.  
  29. #Then boot the vm up on the new node, don't forget to remove the source LV once your sure everything went well
Advertisement
Add Comment
Please, Sign In to add comment