[pve-devel] Storage migration: online design solution

Alexandre DERUMIER aderumier at odiso.com
Wed Jan 9 18:35:24 CET 2013


>>I cannot see why it is required to migrate the VM also? Maybe libvirt 
>>is having another agenda than my proposal?

Maybe I don't understand what you want to do ??? 

I see 2 cases:

case1: migrate a drive from a storage to another storage, both storage attached to host
---------------------------------------------------------------------------------------
we have a vm, on host1, with a drive on localstorage1 
-------                        
|host1|  vm                        
------   |                       
  [  |  disk                         
  [  |
  |  ----------------------|                          
---------------      --------------- 
local storage 1|     |local storage 2|
----------------      ----------------

we mirror the disk to local storage2 (qmp drive-mirror, target is a file or local block device, no need to nbd)

-------                        
|host1|  vm                        
------   |                       
  [  |  disk------mirror--->disk2                         
  [  |
  |  ----------------------|                          
---------------      --------------- 
local storage 1|     |local storage 2|
----------------      ----------------

then, mirror is finished:

block-job-complete, the vm on host2 switch disk1 with disk2.


-------                        
|host1|  vm                        
------   |                       
  [  |   ------------->disk2                         
  [  |
  |  ----------------------|                          
---------------      --------------- 
local storage 1|     |local storage 2|
----------------      ----------------

migration done


case 2 : migrate drive to a storage attached to a host2, and not attached with host1)
-------------------------------------------------------------------------------------
we have a vm, on host1, with a drive on localstorage1 

-------                         -------
|host1|  vm                         |host2|
------   |                       ------
  [      |                          |
  [     disk                        |
---------------                 --------------- 
local storage 1|                |local storage 2|
----------------                ----------------


So you want to mirror the vm disk, to local storage2 on host2

-------                         -------
|host1|  vm                         |host2|
------   |                       ------
  [      |                          |
  [     disk------mirror-->nbd:disk2|
---------------                 --------------- 
local storage 1|                |local storage 2|
----------------                ----------------

then, mirror is finished:

block-job-complete, the vm on host2 switch disk1 with disk2.

-------                           -------
|host1|  vm------------           |host2|
------                 |          ------
  [                    |             |
  [                    |--->nbd:disk2|
---------------                 --------------- 
local storage 1|                |local storage 2|
----------------                ----------------


So, If we dont migrate the vm to host2, we'll have vm running on host1 with disk2 attached through nbd...



so, we need to migrate the vm to host2




-------                           -------
|host1|                       vm  |host2|
------                        |   ------
  [                           |     |
  [                         disk2   |
---------------                 --------------- 
local storage 1|                |local storage 2|
----------------                ----------------

(note that I don't know how switch from nbd after the vm migration, I need to read libvirt code)





Note that this is the same with vmware vsphere 5.1
http://www.vmware.com/products/datacenter-virtualization/vsphere/vmotion.html

you can do vmotion + storage vMotion into one process.

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

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

On Wed, 09 Jan 2013 09:24:15 +0100 (CET) 
Alexandre DERUMIER <aderumier at odiso.com> wrote: 

> 
> 
> Maybe I'm wrong, but I don't think we need nbd for storage migrate on the same host. (just use new device/file as target option of qmp mirror) 
> 
That was also what I ment. NBD is only required if you need to migrate 
to another host. 

> start ndb server on remote server 
> Launch drive-mirror on remote nbd, 
> at the end of block mirror,the vm run on source server with remote storage on target server through nbd socket 
> the migrate vm to the target server 
> then rattach the target volume to the vm (drive-reopen (?)) 
> stop nbdserver 
> 
> This is the way is implemented in libvirt 
> 
I cannot see why it is required to migrate the VM also? Maybe libvirt 
is having another agenda than my proposal? 

-- 
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 
-------------------------------------------------------------- 
Avoid contact with eyes. 

_______________________________________________ 
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