> 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. Perhaps it would be easier if you give the resource some points if it runs in Master state on the preferred node: location name-of-your-constraint resource-id \ rule $role=Master 100: \ #uname eq name-of-the-preferred-node -- Dr. Michael Schwartzkopff Guardinistr. 63 81375 München Tel: (0163) 172 50 98 Fax: (089) 620 304 13
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Pacemaker mailing list: Pacemaker@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