These are the basic commands to control a Pacemaker cluster from command line. View Cluster status, start/stop/restart/move resources and services, etc.
View cluster status:
pcs cluster statusView the status of resources
pcs status resourcesStart a resource
Syntax:
pcs resource start <Cluster IP>Example:
pcs resource start clusterIPIt can also be done using the command: crm_resource
crm_resource start clusterbdStop a resource
pcs resource stop clusterIPIt can also be done using the command: crm_resource
crm_resource stop clusterbdMove resources
pcs resource move <RECURSO> <NODO>Example:
pcs resource move clusterbd node02*NOTE: After always moving the resource, you must execute:
pcs resource clear <ClusterIP>
It can also be done using the command: crm_resource
crm_resource –resource clusterIP –move –node node02Force the resource to move
crm_resource –force –resource clusterIP –move –node node02 –quiet*NOTE: After always moving the resource, you must execute:
pcs resource clear clusterbdEliminate errors
pcs resource cleanupConsult the constraints
pcs constraint location –full
Location Constraints:
Resource: clusterIP
Enabled on: nodo02 (score:INFINITY) (id:location-clusterIP-nodo02-INFINITY)Show only location constraint:
pcs constraint location –full
Location Constraints:
Resource: clusterbd
Enabled on: nodo02 (score:INFINITY) (id:location-clusterIP-nodo02-INFINITY)Put a node into maintenance
pcs cluster standby <NODO>Remove a node from maintenance mode
pcs node unstandby <NODO>All the best.
Comments