This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] Debian, Xen and DRBD: Enabling true server redundancy

To: "Tom Hibbert" <tom@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Debian, Xen and DRBD: Enabling true server redundancy
From: "Michael Paesold" <mpaesold@xxxxxx>
Date: Wed, 15 Jun 2005 09:04:31 +0200
Delivery-date: Wed, 15 Jun 2005 07:03:36 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <31F19452BA8B2042A359D849B74B1BF005BCA2@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Tom Hibbert wrote:

Hello again Xenophiles,

I have a strong case for Xen clustering, and I'm knee deep in the dead
with builds at the moment, but I thought I'd post a bit about where
I'm at.

I am one of those trying to use Xen with drbd. Right now I'm still struggling with Xen and Cent-OS 3, so if anyone has good/bad experience with building a stable kernel for that distribution I would appreciate any hints.

What debian version do you recommend? Especially with regards to /lib/tls? Is it possible to disable tls in debian 3.1 without ill effects?

A comment on your setup:

For /etc/ha.d/resource.d/xendomains, the stop command is rather brutal, isn't it? You do an "exec xm destroy $RES", this is virtually pulling the plug, as I understand it. What about creating another drbd disk that will be mounted in dom0 on the primary and then do "xm save $RES /save-vms/$RES"? The start command could than look into /saved-vms and if a file exists for the domain, then do xm restore, otherwise xm start.

I have created a block-drbd script that allows xen to automatically make a drbd device primary when starting a vm (attached). It has some limitations, i.e. the name of the drbd resource must match the device node. The file goes into /etc/xen/scripts.

Then modify xend-config.sxp and add:
# Setup script for drbd-backed block devices
(block-drbd block-drbd)

Now you can use it in the domain configuration, e.g.:
disk = [ 'drbd:drbd0,hda1,w' ]

Xend will now automatically do "drbdadm primary drbd0" before start, and fail if that does not work. It will "drbdadm secondary drbd0" after shutdown or destroy. Comes in quite handy.

Please note: this works for me but I don't know if this is correctly done. Provided as-is. So please comment.

Best Regards,
Michael Paesold

Attachment: block-drbd
Description: Binary data

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>