SQL Server 2017 AlwaysOn on Linux configuration and maintenance (12)
2.4.1 Manual failover
Mobile AG resources
Manually fail over the AG resource ag_cluster to the cluster node nodeName2:
Sudo pcs resource move ag_cluster-master nodeName2-master
Delete position constraint
First look at the location constraints of the resources added on the new target node:
Sudo pcs constraint list-full
For example:
Enabled on: Node1 (score:INFINITY) (role: Master) (id:cli-prefer-ag_cluster-master)
Cli-prefer-ag_cluster-master is the constraint ID that needs to be deleted.
Perform the deletion:
Sudo pcs constraint remove cli-prefer-ag_cluster-master
Note: automatic failover does not add positional constraints, so cleanup is not required.