These are the basic commands to control a Red Hat Cluster from command line. View Cluster status, start/stop/restart/move resources and services, etc.
View cluster status:
text
pcs cluster statusView the status of resources
text
pcs status resourcesStart or stop a resource
text
crm_resource start/stop <GRUPO>Example:
text
crm_resource start redorbitaclusMove resources
text
pcs resource move <RECURSO> <NODO>Example:
text
pcs resource move redorbitaclus redorbitaclus01 restartNOTE: After always moving the resource, you must execute:
text
pcs resource clear redorbitaclusMove resources (Force resource)
text
crm_resource –force –resource redorbitaclus –move redorbitaclus01 –node –quietNOTE: After always moving the resource, you must execute:
text
pcs resource clear redorbitaclusEliminate errors
text
pcs resource cleanupConsult the constraints
text
pcs constraint location –full
Location Constraints:
Resource: redorbitaclus
Enabled on: redorbitaclus02.redorbita.com (score:INFINITY) (id:location-redorbitaclus -redorbitaclus02.redorbita.com-INFINITY)
Mostrar solo las location constraint:
pcs constraint location –full
Location Constraints:
Resource: redorbitaclus
Enabled on: redorbitaclus02.redorbita.com (score:INFINITY) (id:location-redorbitaclus -redorbitaclus02.redorbita.com-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