[pve-devel] Storage migration: online design solution

Alexandre DERUMIER aderumier at odiso.com
Wed Jan 9 03:55:22 CET 2013


some infos here for libvirt implementation:
http://permalink.gmane.org/gmane.comp.emulators.libvirt/67772

"1) User invokes libvirt's migrate functionality.

2) libvirt checks that no block jobs are active on the source.

3) libvirt starts the destination QEMU and sets up the NBD server using the
nbd-server-start and nbd-server-add commands.

4) libvirt starts drive-mirror with a destination pointing to the remote NBD
server, for example nbd:host:port:exportname=diskname (where diskname is the
-drive id specified on the destination).

5) once all mirroring jobs reach steady state, libvirt invokes the migrate
command.

6) once migration completed, libvirt invokes the nbd-server-stop command on the
destination QEMU.
"

so vm migrate must occur after drive-mirror, 
maybe after drive-reopen ?
But before ndb server stop



----- 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 03:49:21 
Objet: Re: [pve-devel] Storage migration: online design solution 

one other question: 

I'm reading the qmp doc 

# @drive-mirror 
# 
# Start mirroring a block device's writes to a new destination. 
# 
# @device: the name of the device whose writes should be mirrored. 
# 
# @target: the target of the new image. If the file exists, or if it 
# is a device, the existing file/device will be used as the new 
# destination. If it does not exist, a new file will be created. 
# 
# @format: #optional the format of the new destination, default is the 
# format of the source 

target can be file or device, (So I think it's for migrate between 2 storages available on same host) 


So, if you use ndb server as target, is it for migrate storage between 2 differents host ? (From 1 local storage on 1 host to another local storage on different host by example) 
If yes, I think we need to migrate also the vm on the new host ? 




----- 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