Red hat linux

Pacemaker Cheat Sheet

File and Directory Locations

LOCATION DESCRIPTION
/var/lib/pacemaker/cib/cib.xml Primary cluster configuration file
/var/log/cluster/corosync.log Primary cluster log file
/usr/lib/ocf/resource.d/heartbeat/ Directory where resource scripts are located

Check Cluster Status

COMMAND DESCRIPTION
pcs cluster status Display status of cluster nodes
pcs status –full (double dashes) Display detailed cluster status of nodes and resources
pcs resource Display status of all resources and resource groups

Modify Cluster Nodes

COMMAND DESCRIPTION
pcs cluster standby Place node in standby mode
pcs cluster unstandby Remove node from standby mode

Managing Running Resources

COMMAND DESCRIPTION
pcs resource move [resource_name] node name Move resource to another node
pcs resource restart [resource_name] Restart resource on current node
pcs resource enable [resource_name] Start resource on current node
pcs resource disable [resource_name] Stop resource on current node

Debugging Resources

COMMAND DESCRIPTION
pcs resource debug-start [source_name] Force resource to start on node where command is executed showing debug information. Use --full for even more verbose output.
pcs resource debug-stop [source_name] Force resource to stop on node where command is executed showing debug information. Use --full for even more verbose output.
pcs resource debug-monitor [source_name] Force resource to be monitored on node where command is executed showing debug information. Use --full for even more verbose output.

Creating and Modifying Resources

COMMAND DESCRIPTION
pcs resource agents List available resource agents
pcs resource describe [resource] List configuration setting for resource
pcs resource create [resource id][resource] options… Create resource
pcs resource show [resource id] Display currently configured setting of resource
pcs resource update [resource id] options…. Update resource configuration
pcs resource delete [resource id] Delete resource
pcs resource cleanup [resource id] Cleanup resource failures

Creating and Modifying Stonith Resources

COMMAND DESCRIPTION
pcs stonith list List available fence agents
pcs stonith describe [fence agent] List configuration settings for fence agent
pcs stonith describe [stonith_id] List configuration setting for stonith agent
pcs stonith create [stonith_id][resource] options… Create stonith agent
pcs stonith show [stonith_id] Display currently configured setting of stonith agent
pcs stonith update [stonith_id] options…. Update stonith configuration
pcs stonith delete [stonith_id] Delete stonith agent
pcs stonith cleanup [stonith_id] Cleanup stonith agent failures

Leave a Reply

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