[Pacemaker] Integrating Xen with Pacemaker and DRBD

emmanuel segura emi2fast at gmail.com
Sun Oct 27 04:45:00 EDT 2013


>From drbd site DOCS

13.4. Using DRBD VBDs

In order to use a DRBD resource as the virtual block device, you must add a
line like the following to your Xen domU configuration:

disk = [ 'drbd:<resource>,xvda,w' ]

This example configuration makes the DRBD resource named
*resource*available to the domU as
/dev/xvda in read/write mode ( w).

Of course, you may use multiple DRBD resources with a single domU. In that
case, simply add more entries like the one provided in the example to the
disk option, separated by commas.


13.5. Starting, stopping, and migrating DRBD-backed domU’s

*Starting the domU. *Once you have configured your DRBD-backed domU, you
may start it as you would any other domU:

xm create <domU>
Using config file "+/etc/xen/<domU>+".
Started domain <domU>

In the process, the DRBD resource you configured as the VBD will be
promoted to the primary role, and made accessible to Xen as expected.

*Stopping the domU. *This is equally straightforward:

xm shutdown -w <domU>
Domain <domU> terminated.

Again, as you would expect, the DRBD resource is returned to the secondary
role after the domU is successfully shut down.

*Migrating the domU. *This, too, is done using the usual Xen tools:

xm migrate --live <domU> <destination-host>

In this case, several administrative steps are automatically taken in rapid
succession: . The resource is promoted to the primary role on *
destination-host*. . Live migration of *domU* is initiated on the local
host. . When migration to the destination host has completed, the resource
is demoted to the secondary role locally.

The fact that both resources must briefly run in the primary role on both
hosts is the reason for having to configure the resource in dual-primary
mode in the first place


http://www.drbd.org/users-guide/s-xen-internal.html


2013/10/26 georg at riseup.net <georg at riseup.net>

> Hi all,
>
> The drbd documentation [1] regarding integration of Xen and pacemaker
> and drbd reads: "You may configure a Xen domU as a Pacemaker resource,
> and automate resource failover. To do so, use the Xen OCF resource
> agent. If you are using the drbd Xen device type described in this
> chapter, you will not need to configure any separate drbd resource for
> use by the Xen cluster resource. Instead, the block-drbd helper script
> will do all the necessary resource transitions for you."
>
> - Is this the 'correct' way to go?
> - If so, should the drbd initscript be used to handle the initial state
>   of the drbd device?
>
> Thanks,
> Georg
>
>
> [1] http://www.drbd.org/users-guide/s-xen-pacemaker.html
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
>



-- 
esta es mi vida e me la vivo hasta que dios quiera
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20131027/329c298f/attachment-0002.html>


More information about the Pacemaker mailing list