PaceMaker Cluster Command Cheat Sheet

PaceMaker Cluster Command Cheat Sheet

This article contains all pacemaker cluster administration commands to manage a PaceMaker cluster. You can refer to the command sheet to manage any PaceMaker cluster.


Topic

  • How to manage PaceMaker cluster?
  • PaceMaker cluster command cheat sheet
  • PaceMaker cluster reference cheat sheet


Solution


PaceMaker cluster Important Configuration Files and Directories

  • /var/lib/pacemaker/cib/cib.xml: Cluster configuration file
  • /var/log/cluster/corosync.log: Corosync log file
  • /etc/sysconfig/pacemaker: Pacemaker configuration file
  • /var/log/pacemaker.log: Pacemaker log file
  • /usr/lib/ocf/resource.d/heartbeat: Directory where all the cluster resource scripts are available


PaceMaker Cluster administration Commands

  • PaceMaker cluster command to view cluster nodes status.
# pcs cluster status

  • PaceMaker cluster command to view detailed status of the cluster nodes and resources.

# pcs status --full

  • PaceMaker cluster command to view status of the cluster nodes and resources.

# crm_mon -r1

  • PaceMaker cluster command to view real time status of the cluster nodes and resources.

# crm_mon r

  • PaceMaker cluster command to view status of all cluster resources and resource groups.

# pcs resource show

  • PaceMaker cluster command to put the cluster node on standby mode.

# pcs cluster standby <Cluster node name>

  • PaceMaker cluster command to remove the cluster node from standby mode.

# pcs cluster unstandby <Cluster node name>:

  • PaceMaker cluster command to move the cluster resource from one node to another node.

# pcs resource move <resource name> <node name>

  • PaceMaker cluster command to restart the cluster resource on the running node.

# pcs resource restart <resource name>

  • PaceMaker cluster command to start the cluster resource on current node.

# pcs resource enable <resource name> 

  • PaceMaker cluster command to stop cluster resource on running node.

# pcs resource disable <resource name>:   

  • PaceMaker cluster command to start debug cluster resource. You can use the switch --full for more verbose output.

# pcs resource debug-start <Resource Name>

  • PaceMaker cluster command to stop debugging cluster resource. You can use the switch --full for even more verbose output.

# pcs resource debug-stop <Resource Name> 

  • PaceMaker cluster command to monitor cluster resource debuging. You can use the switch --full for even more verbose output.

# pcs resource debug-monitor <Resource Name>

  • PaceMaker cluster command to list available cluster resource agents.

# pcs resource agents

  • PaceMaker cluster command to list available cluster resource agents with more information.

# pcs resource list

  • PaceMaker cluster command to view detailed infirmotation about cluster resource agents and their configuration or settings.

# pcs resource describe <Resource Agents Name>    

  • PaceMaker cluster command to create a cluster resource.

# pcs resource create <Reource Name> <Reource Agent Name> options

  • PaceMaker cluster command to view cluster configuration settings of a perticular resource.

# pcs resource show <Resource Name>   

  • PaceMaker cluster command to update specific cluster resource configuration.

# pcs resource update <Resource Name> options

  • PaceMaker cluster command to delete specific cluster resource.

# pcs resource delete <Resource Name>

  • PaceMaker cluster command to cleanup specific cluster resource.

# pcs resource cleanup <Resource Name>

  • PaceMaker cluster command to list available cluster fence agents.

# pcs stonith list

  • PaceMaker cluster command to view detail cluster configuration settings for fence agent.

# pcs stonith describe <Fence Agent Name>

  • PaceMaker cluster command to create PaceMaker cluster stonith agent.

# pcs stonith create <Stonith Name> <Stonith Agent Name> options

  • Display PaceMaker cluster configured settings of stonith agent.

# pcs stonith show <Stonith Name>

  • Update PaceMaker cluster stonith configuration.

# pcs stonith update <Stonith Name> options   

  • PaceMaker cluster command to delete stonith agent.

# pcs stonith delete <Stonith Name>   

  • PaceMaker cluster command to cleanup stonith agent failures.

# pcs stonith cleanup <Stonith Name>

  • PaceMaker cluster command to check cluster configuration.

# pcs config

  • PaceMaker cluster command to check cluster property.

# pcs property list

  • PaceMaker cluster command to get more details about cluster property.

# pcs property list --all

  • PaceMaker cluster command to check cluster Configuration with XML format.

# pcs cluster cib   

  • PaceMaker cluster command to check cluster node status.

# pcs status nodes 

  • PaceMaker cluster command to start cluster service on current node.

# pcs cluster start

  • PaceMaker cluster command to start cluster service on all the nodes.

# pcs cluster start --all

  • PaceMaker cluster command to stop cluster service on current node.

# pcs cluster stop

  • PaceMaker cluster command to stop cluster service on all the nodes.

# pcs cluster stop --all

  • PaceMaker cluster command to sync corosync.conf file.

# pcs cluster sync

  • PaceMaker cluster command to destroy cluster.

# pcs cluster destroy <Cluster Name>

  • PaceMaker cluster command to create new cluster configuration file. This file will be created on current location, you can add multiple cluster resource into this configuration file and apply them by using cib-push command.

# pcs cluster cib <new config name>

  • PaceMaker cluster command to apply the resource created in configuration file into cluster.

# pcs cluster cib-push <new config name>

  • PaceMaker cluster command to view cluster resource group list.

# pcs resource group list

  • PaceMaker cluster command to view corosync configuration output.

# pcs cluster corosync

  • PaceMaker cluster command to check the cluster resource order.

# pcs constraint list

  • PaceMaker cluster command to ignore quorum policy.

# pcs property set no-quorum-policy=ignore

  • PaceMaker cluster command to disable stonith.

# pcs property set stonith-enabled=false

  • PaceMaker cluster command to set cluster default stickiness value.

# pcs resource defaults resource-stickiness=100


You May Also Like

About the Author: Andrew Joseph

1 Comment

  1. I’m extremely impressed together with your writing skills as smartly as with the structure for your weblog. Is this a paid topic or did you modify it yourself? Anyway stay up the excellent high quality writing, it’s uncommon to look a nice weblog like this one nowadays.

Leave a Reply

Your email address will not be published. Required fields are marked *