Block replication driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I'm working on supporting a new FT/HA solution for qemu called COLO
(http://wiki.qemu.org/Features/COLO). The part that is currently being focused 
on for libvirt integration is Block Replication
(http://wiki.qemu.org/Features/BlockReplication) which enables guest state
synchronization for disks.

Right now there are three issues that I'd like to get your input on:

1.
As you can see on the block replication wiki-page we need to reference the
secondary disk id.

Example from the wiki:
-drive if=none,driver=raw,file.filename=1.raw,id=colo1 \
-drive if=xxx,driver=replication,mode=secondary,\
     ...
     file.backing.backing=colo1

My initial thought was to manually set the alias of the
disk and add a new reference element to the backingStore:
<disk type='file' device='disk'>
  ...
  <alias name='colo1'/>
</disk>
<disk type='file' device='disk'>
  ...
  <backingStore type='file'>
    ...
    <reference name='colo1'/>
  </backingStore>
</disk>

Though, I quickly realized that setting the alias is only done by the
hypervisor and is therefore not an option with the current code.

Would it be bad letting the user set the alias, and if so, do you have any
ideas of how to solve the referencing?


2.
The format of the disk and the driver type currently shares the same
attribute in libvirt (the type attribute on driver XML element). However, with
the new replication disk driver you need to be able to set both the disk format
and also the driver name.

Example from the wiki:
-drive if=xxx,driver=replication,mode=secondary,\
         file.file.filename=active_disk.qcow2,\
         file.driver=qcow2,\
         ...

I saw that there was a function in libvirt called virStorageFileProbeFormat
that could let us get the format of the disk without stating it in the XML. But
as I'm sure you know, it's strongly advised not to be used since you can trick
the function by modifying the disk file.


3.
When using the replication driver the secondary disk is supposed to be added
but not attached.
Example from the wiki:
-drive if=none,driver=raw,file.filename=1.raw,id=colo1 \
-drive if=xxx,driver=replication,mode=secondary,\
    ...

Clearly, trying to setup a disk without a target is not allowed at the moment.
Is there any better way of doing it?



Any comments and insights in general are also greatly appreciated!

/Simon
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]