[pve-devel] Storage migration: online design solution

Alexandre DERUMIER aderumier at odiso.com
Wed Jan 9 12:05:05 CET 2013


full working migration
----------------------
vm is use rbd storage, virtio0
destination drive is a sheepdog volume (that I have create before)

#info block

drive-virtio0: removable=0 io-status=ok file=/var/lib/vz/images/147/vm-147-disk-1.raw ro=0 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0

#drive_mirror -n -f drive-virtio0 sheepdog:127.0.0.1:7000:vm-144-disk-1

# info block-jobs
Type mirror, device drive-virtio0: Completed 1073741824 of 1073741824 bytes, speed limit 0 bytes/s

# block_job_complete drive-virtio0

# info block

drive-virtio0: removable=0 io-status=ok file=sheepdog:127.0.0.1:7000:vm-144-disk-1 ro=0 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0

----- Mail original ----- 

De: "Alexandre DERUMIER" <aderumier at odiso.com> 
À: "Michael Rasmussen" <mir at datanom.net> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Mercredi 9 Janvier 2013 12:00:08 
Objet: Re: [pve-devel] Storage migration: online design solution 

>>Phase 5) "drive-reopen", "data": {"device": "ide-hd0", 
>>"new-image-file": "new block device", 

"drive-reopen" has been removed in qemu 1.3 

we should use "block-job-complete" qmp command 


----- Mail original ----- 

De: "Michael Rasmussen" <mir at datanom.net> 
À: pve-devel at pve.proxmox.com 
Envoyé: Mercredi 9 Janvier 2013 02:23:11 
Objet: [pve-devel] Storage migration: online design solution 

Hi all, 

Doing online storage migration will involve the following phases: 
Phase 1) Create remote block device 
Phase 2) Connect this block device to NBD (nbd_server_add [-w] device) 
Phase 3) Start nbd_server (nbd_server_start [-a] [-w] host:port) 
Phase 4) "drive-mirror", "arguments": {"device": "ide-hd0", 
"target": "nbd:host:port", 
"sync": "full", 
"format": "(qcow2|raw)" } 
Phase 5) "drive-reopen", "data": {"device": "ide-hd0", 
"new-image-file": "new block device", 
"format": "(qcow2|raw)"} 
Phase 6) Stop nbd_server (nbd_server_stop) 
Phase 7) Remove old block device 

Have I missed something? 

PS. I am struggling with this '"device": "ide-hd0"'. What is the 
correct way of specifying a block device in proxmox given the following 
configuration: virtio2: pve-storage1_lvm:vm-102-disk-1,size=2G 

-- 
Hilsen/Regards 
Michael Rasmussen 

Get my public GnuPG keys: 
michael <at> rasmussen <dot> cc 
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E 
mir <at> datanom <dot> net 
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C 
mir <at> miras <dot> org 
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917 
-------------------------------------------------------------- 
There is nothing stranger in a strange land than the stranger who comes 
to visit. 

_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 
_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 



More information about the pve-devel mailing list