An affinity between resource groups restricts on which nodes the resource groups may be brought online simultaneously. In each affinity, a source resource group declares an affinity for a target resource group or several target resource groups. To create an affinity between resource groups, set the RG_affinities resource group property of the source as follows:
-p RG_affinities=affinity-list |
Specifies a comma-separated list of affinities between the source resource group and a target resource group or several target resource groups. You may specify a single affinity or more than one affinity in the list.
Specify each affinity in the list as follows:
operator target-rg |
Do not include a space between operator and target-rg.
Specifies the type of affinity that you are creating. For more information, see Table 2–2.
Specifies the resource group that is the target of the affinity that you are creating.
Operator |
Affinity Type |
Effect |
---|---|---|
+ |
If possible, the source is brought online on a node or on nodes where the target is online or starting. However, the source and the target are allowed to be online on different nodes. |
|
++ |
The source is brought online only on a node or on nodes where the target is online or starting. The source and the target are not allowed to be online on different nodes. |
|
- |
If possible, the source is brought online on a node or on nodes where the target is not online or starting. However, the source and the target are allowed to be online on the same node. |
|
-- |
The source is brought online only on a node or on nodes where the target is not online. The source and the target are not allowed to be online on the same node. |
|
+++ |
Same as strong positive, except that an attempt by the source to fail over is delegated to the target. For more information, see Delegating the Failover or Switchover of a Resource Group. |
Weak affinities take precedence over Nodelist preference ordering.
The current state of other resource groups might prevent a strong affinity from being satisfied on any node. In this situation, the resource group that is the source of the affinity remains offline. If other resource groups' states change to enable the strong affinities to be satisfied, the resource group that is the source of the affinity comes back online.
Use caution when declaring a strong affinity on a source resource group for more than one target resource group. If all declared strong affinities cannot be satisfied, the source resource group remains offline.