Useful Corosync and Pacemaker Commands

From Integrics Wiki
Revision as of 16:07, 5 April 2018 by Vlasis (talk | contribs)
Jump to: navigation, search

List of useful commands for Corosync and Pacemaker clusters.

  • View the real-time status of nodes and resources:
crm_mon
  • View one-off status of nodes and resources:
crm status
  • View cluster configuration:
crm configure show
  • Set a node to standby mode (can also be used to simulate a node becoming unavailable):
crm node standby <node name>
  • Set a node's status from standby to online:
crm node online <node name>
  • Start a resource or a resource group:
crm resource start <resource name>
  • Stop a resource or a resource group:
crm resource stop <resource name>
  • Edit a resource, which allows its reconfiguration:
crm configure edit <resource name>
  • Delete a resource (must be stopped before it is deleted):
crm configure delete <resource name>
  • Migrate a resource to another node:
crm resource migrate <resource name> <node name>
  • Configuring a cluster to not manage a resource:
crm_resource --resource <resource name> --set-parameter is-managed --meta --parameter-value false
  • Clear a resource that is stuck in "(unmanaged) FAILED" state, e.g. due to a failed stop action:
crm_resource -P
crm resource cleanup <resource name>
  • List resource agents by type:
crm ra list lsb
crm ra list systemd
crm ra list ocf heartbeat
crm ra list ocf pacemaker