[pve-devel] Storage migration: online design solution

Michael Rasmussen mir at datanom.net
Thu Jan 10 10:23:23 CET 2013


I more or less have a complete solution. Need some more tests, though. I have discovered a potential problem. When a disk is migrated due to the fact that a new disk is created the UUID is changed.

Alexandre DERUMIER <aderumier at odiso.com> wrote:

>for the uri, you can do 
>
>#info block
>
>in monitor, this is the file=  part.
>
>you can use proxmox sub path to generate it
>
>my path = PVE::Storage::path($storecfg, $dst_volid);
>
>
>
>
>migration part should be something like
>
>$drive = "virtio0";
>my $targetpath = PVE::Storage::path($storecfg, $dst_volid);
>PVE::QemuServer::vm_mon_cmd($vmid, "drive-mirror", device =>
>"drive-$drive", target => $targetpath);
>
>while{
>  PVE::QemuServer::vm_mon_cmd($vmid, "block-migrate-status");
>}
>      
>PVE::QemuServer::vm_mon_cmd($vmid, "block-job-complete", device =>
>"drive-$drive");
>
>----- Mail original ----- 
>
>De: "Michael Rasmussen" <mir at datanom.net> 
>À: pve-devel at pve.proxmox.com 
>Envoyé: Mercredi 9 Janvier 2013 22:12:47 
>Objet: Re: [pve-devel] Storage migration: online design solution 
>
>On Wed, 9 Jan 2013 22:01:42 +0100 
>Michael Rasmussen <mir at datanom.net> wrote: 
>
>> On Wed, 09 Jan 2013 12:05:05 +0100 (CET) 
>> Alexandre DERUMIER <aderumier at odiso.com> wrote: 
>> 
>> > 
>> > #drive_mirror -n -f drive-virtio0
>sheepdog:127.0.0.1:7000:vm-144-disk-1 
>> > 
>> # info block 
>> drive-virtio2: removable=0 io-status=ok 
>> file=/dev/pve-storage1_vg/vm-102-disk-1 ro=0 drv=raw encrypted=0
>bps=0 
>> bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0 
>> 
>> # drive_mirror -f drive-virtio2 pve-storage2_lvm:vm-102-disk-2 
>> Invalid block format 'raw' 
>> 
>> Is raw only supported for destinations other than LVM? 
>> 
>Found out that it has to be a URI: /dev/pve-storage2_vg/vm-102-disk-1 
>works:-) 
>
>-- 
>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 
>-------------------------------------------------------------- 
>Mieux vaut tard que jamais! 
>
>[ Better late than never ] 
>
>_______________________________________________ 
>pve-devel mailing list 
>pve-devel at pve.proxmox.com 
>http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 
>
>!DSPAM:50ee64de75081063085530!

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20130110/68077bf9/attachment.htm>


More information about the pve-devel mailing list