> FYI, commands that "move" a resource do so by adding location > constraints. The ID of these constraints will start with "cli-". They > override the normal behavior of the cluster, and stay in effect until > you explicitly remove them. (With pcs, you can remove them with "pcs > resource clear".)
Agree :) > Note that colocation constraints only specify that the resources must > run together. It does not imply any order in which they must be started. > If Web and/or MTA should be started after clusterdataClone, configure > explicit ordering constraints for that. > Agree. So far I haven't created any ordering constraints because it isn't important to me, YET, the order for starting services. However I have a question... if I don't have any ordering constraints at all, am I still able to activate resources no matter the order? >> These are the commands I run to create the master/slave resource and >> its contraints: >> >> # pcs cluster cib myfile >> # pcs -f myfile resource create clusterdata ocf:linbit:drbd >> drbd_resource=clusterdb op monitor interval=30s role=Master op monitor >> interval=31s role=Slave >> # pcs -f myfile resource master clusterdataClone clusterdata >> master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 >> notify=true >> # pcs -f myfile constraint location clusterdataClone rule >> score=INFINITY \#uname eq nodo1 or \#uname eq nodo2 > > The above constraint as currently worded will have no effect. It says > that clusterdataClone must be located on either nodo1 or nodo2. Since > those are your only nodes, it doesn't really constrain anything. Ok, the last command (location with rule) was created to allow clusterdataClone start at both nodes, because without this rule the resource was always in "stopped" status in both nodes. Once I added this rule my clusterdataClone resource started automatically but I don't understand why it choosed a node to run as Master and the other one as Slave. Is it random? > > If you want to prefer one node for the master role, you want to add > role=master, take out the node you don't want to prefer, and set score > to something less than INFINITY. Well, I could add a rule to prefer nodo1 over nodo2 to run the Master role (in fact, I think I already did it) but what I want it's something different: I would like the Master role to follow IPService, I mean, clusterdataClone become Master where IPService was previously activated. Is this possible? Or the only way to configure constraints is that my resources (IPService, Web, MTA) follow the Master role of clusterdataClone? _______________________________________________ Users mailing list: Users@clusterlabs.org http://clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org