Johnny, See below for my answers: > 1) Assume that there is a 2-node cluster, with nodes A & B in. And there > are 2 resource groups RG1 & RG2 registered in the cluster. Now we want > to let RG1 automatically start on node A and RG2 automatically start on > node B when these 2 nodes are both health. However, when one of the > nodes run into an error, the resource group on the unhealthy node should > fail-over to another node. > > I've browsed around the man page of rg_properties and rs_properties, but > unable to find any option to set so. Would you please give me some > suggestions of how to achieve? >
One simple way to do it is to set the nodelist of RG1 to {A,B} and the nodelist of RG2 to {B,A}. The commands would look something like this: clrg set -n A,B RG1 clrg set -n B,A RG2 The nodes in each node list are ordered by priority. Another way to do it is to give each RG a weak negative affinity for the other RG: clrg set -p rg_affinities=-RG2 RG1 clrg set -p rg_affinities=-RG1 RG2 This means that each RG will "try" to run on a different node from the other RG; but if only one node is available, they will both run on it. In this case, you don't have to change the node list. With either of these approaches, you can choose whether to set Failback. Suppose that node A dies and RG1 fails over to node B. If node A then reboots, you can choose whether RG1 should automatically switch back to node A. If you set the Failback property of each RG to TRUE, they will automatically switch-back onto their more-preferred node when it joins the cluster: clrg set -p failback=TRUE RG1 RG2 If Failback is FALSE (the default), then both RGs would remain on node B after the reboot of node A. You could manually switch RG1 back to node A: clrg switch -n A RG1 or you can tell both RGs to go to their most-preferred node by using the remaster subcommand: clrg remaster RG1 RG2 > 2) As a resource rs2 in RG2 depends on a resource rs1 in RG1, I've set > the RG_dependencies property of RG2 to "RG1". However other resources of > RG2 do not depend on any resource in RG1, in order to speed up the start > up process, could I just set rs2 of RG2 to depend on resource rs1 of > RG1? How? Do you have any idea of that? > You can declare dependencies of one resource upon another resource. In fact, the resource dependency feature has mostly superseded the RG_dependencies feature. In your example, you simply enter this command: clresource set -p resource_dependencies=rs1 rs2 We support four different flavors of resource dependency: weak, strong, restart, and offline-restart. For further information, see the clresource(1CL) man page, or this blog article: http://blogs.sun.com/SC/entry/resource_dependencies --Marty > > Thank you very much! > > > - > Regards, > Johnny > > > _______________________________________________ > ha-clusters-discuss mailing list > ha-clusters-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/ha-clusters-discuss >