Instructions for PCS - Pacemaker/Corosync configuration system on Debian ======================================================================== 1. Adding PCS to an existing cluster ------------------------------------ These instructions assume you wish to install PCS on a running Pacemaker/Corosync cluster already configured using crmsh. First of all, install pcs package on all cluster nodes and check that pcsd service is running on each of the nodes: # service pcsd status * pcsd.service - PCS GUI and remote configuration interface Loaded: loaded (/lib/systemd/system/pcsd.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2016-12-11 18:54:48 UTC; 8min ago Service pcsd uses TCP port 2224 so make sure this port is open for access by all cluster nodes. Next, set a password for hacluster user on all cluster nodes: # passwd hacluster Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Finally, authenticate the cluster nodes by running only on one of them: # pcs cluster auth Username: hacluster Password: node1: Authorized node2: Authorized Cluster is now fully operational and both crm and pcs commands can be used to manage cluster resources: # pcs cluster status Cluster Status: Stack: corosync Current DC: node1 (version 1.1.16-94ff4df) - partition with quorum Last updated: Sun Dec 11 19:10:26 2016 Last change: Sun Dec 11 18:55:45 2016 by hacluster via crmd on node1 2 nodes configured 1 resource configured PCSD Status: node1: Online node2: Online 2. Initializing a new cluster using PCS --------------------------------------- These instructions assume you wish to create a new Pacemaker/Corosync cluster using PCS. WARNING: Do not run the commands from this section on a working cluster as they will delete the existing cluster configuration and therefore influence running cluster resources. First of all, install pcs package on all cluster nodes. After package installation cluster services (corosync, pacemaker and pcsd) should be running on all nodes with default configuration. As PCS expects Corosync and Pacemaker to be in unconfigured state, the following command needs to be executed on all cluster nodes to stop the services and delete their default configuration: # pcs cluster destroy Shutting down pacemaker/corosync services... Killing any remaining services... Removing all cluster configuration files... Next, set a password for hacluster user on all cluster nodes: # passwd hacluster Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Then authenticate the cluster nodes by running only on one of them: # pcs cluster auth node1 node2 Username: hacluster Password: node1: Authorized node2: Authorized Finally, the cluster is configured and started by running on one of the nodes: # pcs cluster setup --start --name debian node1 node2 Destroying cluster on nodes: node1, node2... node1: Stopping Cluster (pacemaker)... node2: Stopping Cluster (pacemaker)... node1: Successfully destroyed cluster node2: Successfully destroyed cluster Sending cluster config files to the nodes... node1: Succeeded node2: Succeeded Synchronizing pcsd certificates on nodes node1, node2... node1: Success node2: Success Restarting pcsd on the nodes in order to reload the certificates... node1: Success node2: Success -- Valentin Vidic Sun, 11 Dec 2016 20:49:18 +0100