Home Linux & Systems Cybersecurity Cloud & DevOps Networks & Infrastructure SIEM & Monitoring DFIR & Threat Intel Development & Other All categories Projects About Tools

Basic Pacemaker Cluster Commands

Leer en espanol
Basic Pacemaker Cluster Commands

Table of contents

See the status of the clus ===

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:

text
pcs cluster status

View the status of resources

text
pcs status resources

Start a resource

Syntax:

text
pcs resource start <Cluster IP>

Example:

text
pcs resource start clusterIP

It can also be done using the command: crm_resource

text
crm_resource start clusterbd

Stop a resource

text
pcs resource stop clusterIP

It can also be done using the command: crm_resource

text
crm_resource stop clusterbd

Move resources

text
pcs resource move <RECURSO>  <NODO>

Example:

text
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

text
crm_resource  –resource clusterIP –move –node node02

Force the resource to move 

text
crm_resource –force –resource clusterIP –move –node node02   –quiet

*NOTE: After always moving the resource, you must execute:

text
pcs resource clear clusterbd

Eliminate errors

text
pcs resource cleanup

Consult the constraints

text
pcs constraint location –full
Location Constraints:
Resource: clusterIP
Enabled on: nodo02 (score:INFINITY) (id:location-clusterIP-nodo02-INFINITY)

Show only location constraint:

text
pcs constraint location –full
Location Constraints:
Resource: clusterbd
Enabled on: nodo02 (score:INFINITY) (id:location-clusterIP-nodo02-INFINITY)

Put a node into maintenance

text
pcs cluster standby <NODO>

Remove a node from maintenance mode

text
pcs node unstandby <NODO>

All the best.

Comments