[DRBD-user] Pacemaker, Xen and temporary dual primary

Digimer lists at alteeve.ca
Fri Jul 5 16:38:02 CEST 2013

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On 05/07/13 06:14, Jarno Elonen wrote:
> Hi,
>
> I've got a very nicely running DRBD setup with Pacemaker and XEN, and
> would next like to add some live migration to the soup.
>
> 1) Is there a Pacemaker script (ocf?) that could do Xen live migration
> through *temporary* dual primary mode?
>
> 2) Is there a way to check if a resource currently allows two
> primaries? (Thinking about shell scripting here.)
>
> The current DRBD 8.4 documentation suggest configuring the resources
> permanently as "allow-two-primaries=yes" for live migration, but I'd
> rather avoid that (to prevent accidents like multiple xen startup).
>
> -Jarno

So far as I know, no. It's a planned feature for DRBD 9, but as I 
understand it, the only way to make DRBD 8 dual-primary is to enable to 
enable dual-primary in the configuration.

Personally, I use dual-primary and clustered LVM with each LV being 
dedicated to a VM. I copy the VM's XML to a shared directory (on gfs2 in 
my case), then I undefine the VM (I use KVM, not sure if this maps to Xen).

This means that the nodes can't see that the VMs exist, preventing 
accidental out-of-cluster booting of the VMs. I point the resource 
manager (I use rgmanager, but I expect it's the same in pacemaker) to 
the XML definition on the shared directory so the cluster knows how to 
boot the VM.

Lastly, I use robust fencing. So if the nodes lose touch with one 
another, one of them will be powered off. This prevents split-brains and 
makes it nearly impossible for a VM to be started on both nodes at once. 
So dual-primary is safe in this setup.

hope this helps... not sure how clear this is... still need my first 
coffee. :)

-- 
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without 
access to education?



More information about the drbd-user mailing list