[DRBD-user] Three node cluster?

Lars Ellenberg lars.ellenberg at linbit.com
Wed Apr 18 21:33:52 CEST 2012

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


On Sun, Apr 15, 2012 at 10:05:30PM +0200, Björn Enroth wrote:
> Guys,
> I am looking for information of how to deal with a KVM three node cluster
> with DRBD
> 
> I have a "baby machine" ubuntu 11.10 pacemaker/drbd cluster with two nodes,
> local disks with drbd setup in between. This is working flawless.
> 
> My challenge now is that I want to add a third node with the same setup.
> How do I handle drbd in this setup? I'd like to have all nodes active, to
> be able to migrate resources, mainly kvm virtual guests, around the cluster
> as I see fit.

What you can do with DRBD right now is a "stacked" setup.  If you do it
right, you should then be able to even live migrate between four nodes.
The setup is a bit tricky, and we have not written a guide about that
setup yet, sorry.

Basica idea is

 [DRBD Primary, unused,        ]    [DRBD Primary, used,   ]
 [potential target of migration]----[current location of VM]
 [active on Node A OR B        ]    [active on Node C OR D ]
    |                 .               |                  .
    |                 .               |                  .
 [lower DRBD]____[lower DRBD]       [lower DRBD]____[lower DRBD]
 [node A    ]    [node B    ]       [node C    ]    [node D    ]


---- and ___ denote replication,
 | is stacked upper to lower local submission of IO
 . is where that stacked upper to lower can move to.

You may of course do that with three nodes as well,
just leave off "D".

The stacked upper DRBD instances can move freely between
two nodes each, which means the data is available on all
nodes, but actively accessible only on two at a time.

Live migration from C to A works just so.

If you want to live migrate from C to B,
but your other stacked instance is currently active on A,
you'd first need to move that from A to B,
then you can live migrate from C to B.

Live migration between C and D
(nodes of the lower instances of the same upper instance)
is more involved, and may need to take some detours.

> I'd also like pacemaker to be able to dynamically handle the load.

That is a different thing altogether.
Currently, I think, pacemaker can not do that all by itself,
but would need a bit help from some external entity
which would trigger migrations by updating constraints
or scores.

> I've been surfing' around for a while... Either I am not able to find the
> right information, or it is so obvious how to handle this so I am missing
> the point somewhere. Or, in worst case, this is not possible and I need to
> enter another route to make this work as I want.

As others have posted already, you want to look into glusterfs,
or into iSCSI (which may again be on top of DRBD).
Use the best tool for the job, where "best" is probably whatever you
feel most comfortable with.

Cheers,
	

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.



More information about the drbd-user mailing list