pcs [-f file] [-h] [commands]...
Control and configure pacemaker and corosync.
Example: Create a new resource called 'VirtualIP' with IP address 192.168.0.99, netmask of 32, monitored everything 30 seconds, on eth2: pcs resource create VirtualIP ocf:heartbeat:IPaddr2 ip=192.168.0.99 cidr_netmask=32 nic=eth2 op monitor interval=30s
--ipv6 will configure corosync to use ipv6 (instead of ipv4). This option is not supported on CMAN clusters.
--token <timeout> sets time in milliseconds until a token loss is declared after not receiving a token (default 1000 ms; 10000 ms for CMAN clusters)
--token_coefficient <timeout> sets time in milliseconds used for clusters with at least 3 nodes as a coefficient for real token timeout calculation (token + (number_of_nodes - 2) * token_coefficient) (default 650 ms) This option is not supported on CMAN clusters.
--join <timeout> sets time in milliseconds to wait for join messages (default 50 ms)
--consensus <timeout> sets time in milliseconds to wait for consensus to be achieved before starting a new round of membership configuration (default 1200 ms)
--miss_count_const <count> sets the maximum number of times on receipt of a token a message is checked for retransmission before a retransmission occurs (default 5 messages)
--fail_recv_const <failures> specifies how many rotations of the token without receiving any messages when messages should be received may occur before a new configuration is formed (default 2500 failures)
--encryption 0|1 disables (0) or enables (1) corosync communication encryption (default 0)
Configuring Redundant Ring Protocol (RRP)
When using udpu specifying nodes, specify the ring 0 address first followed by a ',' and then the ring 1 address.
Example: pcs cluster setup --name cname nodeA-0,nodeA-1 nodeB-0,nodeB-1
When using udp, using --addr0 and --addr1 will allow you to configure rrp mode for corosync. It's recommended to use a network (instead of IP address) for --addr0 and --addr1 so the same corosync.conf file can be used around the cluster. --mcast0 defaults to 239.255.1.1 and --mcast1 defaults to 239.255.2.1, --mcastport0/1 default to 5405 and ttl defaults to 1. If --broadcast is specified, --mcast0/1, --mcastport0/1 & --ttl0/1 are ignored.
Example:
pcs cluster cib > original.xml
cp original.xml new.xml
pcs -f new.xml constraint location apache prefers node2
pcs cluster cib-push new.xml diff-against=original.xml
WARNING: This command permanently removes any cluster configuration that has been created. It is recommended to run 'pcs cluster stop' before destroying the cluster.
WARNING: If this node is not actually powered off or it does have access to shared resources, data corruption/cluster failure can occur. To prevent accidental running of this command, --force or interactive user response is required in order to proceed.
NOTE: It is not checked if the specified node exists in the cluster in order to be able to work with nodes not visible from the local cluster partition.
WARNING: Cluster has to be restarted in order to apply these changes.
Example of enabling SBD in cluster with watchdogs on node1 will be /dev/watchdog2, on node2 /dev/watchdog1, /dev/watchdog0 on all other nodes, device /dev/sdb on node1, device /dev/sda on all other nodes and watchdog timeout will bet set to 10 seconds:
pcs stonith sbd enable --watchdog=/dev/watchdog2@node1 --watchdog=/dev/watchdog1@node2 --watchdog=/dev/watchdog0 --device=/dev/sdb@node1 --device=/dev/sda SBD_WATCHDOG_TIMEOUT=10
WARNING: Cluster has to be restarted in order to apply these changes.
WARNING: All content on device(s) will be overwritten.
WARNING: If you want to change "host" option of qdevice model net, use "pcs quorum device remove" and "pcs quorum device add" commands to set up configuration properly unless old and new host is the same machine.
WARNING: If the nodes are not actually powered off or they do have access to shared resources, data corruption/cluster failure can occur. To prevent accidental running of this command, --force or interactive user response is required in order to proceed.
Various pcs commands accept the --force option. Its purpose is to override some of checks that pcs is doing or some of errors that may occur when a pcs command is run. When such error occurs, pcs will print the error with a note it may be overridden. The exact behavior of the option is different for each pcs command. Using the --force option can lead into situations that would normally be prevented by logic of pcs commands and therefore its use is strongly discouraged unless you know what you are doing.
http://clusterlabs.org/doc/
corosync_overview(8), votequorum(5), corosync.conf(5), corosync-qdevice(8), corosync-qdevice-tool(8), corosync-qnetd(8), corosync-qnetd-tool(8)
crmd(7), pengine(7), stonithd(7), crm_mon(8), crm_report(8), crm_simulate(8)