A resource will automatically fail back to its original node when that node is back online and in the cluster. If you want to prevent a resource from failing back to the node it was running on prior to a failover, or if you want to specify a different node for the resource to fail back to, you must change its resource stickiness value. You can specify resource stickiness when you are creating a resource, or after.
To specify resource stickiness for a resource after it has been created:
Start the HA Management Client and log in to the cluster as described in Section 4.1, “Graphical HA Management Client”.
Select the desired resource or group, click the tab, then click .
In the field, type resource_stickiness.
In the field, specify a value between
-100,000 and 100,000.
Consider the following when specifying a resource stickiness value:
0:This is the default. The resource will be placed optimally in the system. This may mean that it is moved when a “better” or less loaded node becomes available. This option is almost equivalent to automatic failback, except that the resource may be moved to a node that is not the one it was previously active on.
0:The resource will prefer to remain in its current location, but may be moved if a more suitable node is available. Higher values indicate a stronger preference for a resource to stay where it is.
0:The resource prefers to move away from its current location. Higher absolute values indicate a stronger preference for a resource to be moved.
100,000:The resource will always remain in its current location unless forced off because the node is no longer eligible to run the resource (node shutdown, node standby, or configuration change). This option is almost equivalent to completely disabling automatic failback, except that the resource may be moved to other nodes than the one it was previously active on.
-100,000:The resource will always move away from its current location.
See also the crm_failcount command: crm_failcount(8).