WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

RE: [Xen-users] Xen and drbd after reboot

To: "Rainer Sokoll" <rainer@xxxxxxxxxx>, <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-users] Xen and drbd after reboot
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Tue, 6 Apr 2010 19:36:39 +1000
Cc:
Delivery-date: Tue, 06 Apr 2010 02:37:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100406081617.GB4502@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <20100406081617.GB4502@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcrVYbbdxPd5dDh3SfiXrOFWr5c3TQACobMA
Thread-topic: [Xen-users] Xen and drbd after reboot
> 
> Hi,
> 
> sometimes, especially after a kernel upgrade, I need to reboot the xen
> host.
> All the VM's are mirrored to another machine by using drbd.
> If the machine comes back after a reboot, the drbd devices are all in
> secondary mode, and therefore, the VM's cannot start. I have to issue
a
> "drbdadm primary" for every VM first. (I cannot use "drdadm primary
> all")
> Of course , I could write a little script that does the job for me,
but
> I wonder if there is a more generic way to work around my little
> "problem"?
> Or should I better ask on the drbd mailing list?
> 

The drbd: disk config option handles this (assuming you have the xen
drbd script installed). Eg if you have a resource named virt-win2003r2-0
you could use drbd:virt-win2003r2-0 instead of
phy:/dev/drbd/by-res/virt-win2003r2-0.

As per my post about a few hours before yours to the -devel list, it
doesn't work properly under HVM though, although with the patch I posted
it would work in multiple primary mode (qemu tries to access the device
before it is made primary by the looks of it...). I want the protection
of not allowing a device to be primary on more than one node though.

James

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>