I have first written to xen-devel with this question, but this list is
probably more appropriate.
----- previous message
What I want to do is to use xen with a drbd device as root for a domU
and then be able to migrate the domU between two host systems. I have
already read the documenation on xen and some papers and searched
through the archives about drbd/xen usage. Unfortunatly my questions are not
covered anywhere, so I hope you can help me.
drbd would run in the domain 0 to replicate a block device,
say /dev/drbd0 on host A and host B. Xen would be set up on both hosts.
On host A I would create a new VM with /dev/drbd0 as root.
drbd will now sync /dev/drbd0 from host A to host B and keep those two
consistent. Nevertheless in a drbd setup only on host can be primary and
only one host may access a device (read/write).
So a live migration of a VM from host A to B would have to look like
suspend VM on A
--> on A: drbdadm secondary drbd0 # make A secondary for /dev/drbd0
--> on B: drbdadm primary drbd0 # make B primary for /dev/drbd0
resume VM on B
(with the root now pointing to the local /dev/drbd0 device)
Is there a way to do this with xen 2.0 or 3.0?
----- previous message end
Now what I have found going through the source/example files is that the
block- scripts could be used to setup drbd. I would have to create a
block-drbd script supporting bind/unbind of a drbd device.
Does this sound resonable with the requirements described above?
Btw. I am willing to help provide documentation for xen/drbd if this works
out for me. This could help other people, too.