[Pacemaker] Proper way to migrate multistate resource?

Chet Burgess cfb at liquidreality.org
Tue Feb 7 18:44:52 UTC 2012


OK that makes sense. I will give that a try. Thank you.

--
Chet Burgess
cfb at liquidreality.org



On Feb 7, 2012, at 5:08 , Lars Ellenberg wrote:

> On Tue, Feb 07, 2012 at 02:03:32PM +0100, Michael Schwartzkopff wrote:
>>> On Mon, Feb 06, 2012 at 04:48:26PM -0800, Chet Burgess wrote:
>>>> Greetings,
>>>> 
>>>> I'm some what new to pacemaker and have been playing around with a
>>>> number of configurations in a lab. Most recently I've been testing a
>>>> multistate resource using the ofc:pacemaker:Stateful example RA.
>>>> 
>>>> While I've gotten the agent to work and notice that if I shutdown or
>>>> kill a node the resources migrate I can't seem to figure out the
>>>> proper way to migrate the resource between nodes when they are both
>>>> up.
>>>> 
>>>> For regular resources I've used "crm resource migrate <rsc>" without
>>>> issue. However when I try this with a multistate resource it doesn't
>>>> seem to work. When I run the command it just puts the slave node into
>>>> a stopped state. If I try and tell it to migrate specifically to the
>>>> slave node it claims to already be running their (which I suppose in a
>>>> sense it is).
>>> 
>>> the crm shell does not support roles for the "move" or "migrate" command
>>> (yet; maybe in newer versions. Dejan?).
>>> 
>>> What you need to do is set a location constraint on the role.
>>> * force master role off from one node:
>>> 
>>> 	location you-name-it resource-id \
>>> 		rule $role=Master -inf: \
>>> 		#uname eq node-where-it-should-be-slave
>>> 
>>> * or force master role off from all but one node,
>>>   note the double negation in this one:
>>> 
>>> 	location you-name-it resource-id \
>>> 		rule $role=Master -inf: \
>>> 		#uname ne node-where-it-should-be-master
>> 
>> These constraints would prevent the MS resource to run in Master state even on 
>> that node. Even in case the preferred node is not available any more. This 
>> might be not what Chet wanted.
> 
> Well, it is just what crm resource migrate does, otherwise.
> 
> After migration, you obviously need to "unmigrate",
> i.e. delete that constraint again.
> 
> 
> -- 
> : 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.
> 
> _______________________________________________
> 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





More information about the Pacemaker mailing list