To configure and manage cluster resources, either use the graphical user interface (the Pacemaker GUI) or the crm command line utility. For the GUI approach, refer to Section 6.0, Configuring and Managing Cluster Resources (GUI).
This chapter introduces crm, the command line tool and covers an overview of this tool, how to use templates, and mainly configuring and managing cluster resources: creating basic and advanced types of resources (groups and clones), configuring constraints, specifying failover nodes and failback nodes, configuring resource monitoring, starting, cleaning up or removing resources, and migrating resources manually.
NOTE: User Privileges
Sufficient privileges are necessary to manage a cluster. The crm command and its subcommands have to be run either as root user or as the CRM owner user (typically the user hacluster).
However, the user option allows you to run crm and its subcommands as a regular (unprivileged) user and to change its ID using sudo whenever necessary. For example, with the following command crm will use hacluster as the privileged user ID:
crm options user hacluster
Note that you need to set up /etc/sudoers so that sudo does not ask for a password.