public
Last active

Sample PCS configuration session

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
Run the following commands on all three nodes in the cluster (nodes are named f1, f2 and f3). This will create the corosync.conf files for the cluster.
 
[root@f1 pcs]# ./pcs cluster configure my_cluster_name f1 f2 f3
 
[root@f2 pcs]# ./pcs cluster configure my_cluster_name f1 f2 f3
 
[root@f3 pcs]# ./pcs cluster configure my_cluster_name f1 f2 f3
 
Then run the following command on all three nodes in the cluster, to start corosync and pacemaker.
 
[root@f1 pcs]# ./pcs cluster start
Starting Cluster
 
[root@f2 pcs]# ./pcs cluster start
Starting Cluster
 
[root@f3 pcs]# ./pcs cluster start
Starting Cluster
 
You can get cluster status...
 
[root@f1 pcs]# ./pcs status
Cluster Status:
Last updated: Mon May 14 16:49:29 2012
Last change: Mon May 14 16:39:16 2012 via crmd on f1
Stack: corosync
Current DC: f2 (2) - partition with quorum
Version: 1.1.7-2.fc17-ee0730e13d124c3d58f00016c3376a1de5323cff
3 Nodes configured, unknown expected votes
0 Resources configured.
 
Resources:
 
Nodes:
Online: f3 f1 f2
 
Disable stonith...
 
[root@f1 pcs]# ./pcs property set stonith-enabled=false
 
Create a resource...
[root@f1 pcs]# ./pcs resource create ClusterIP IPaddr2 ip=192.168.122.99 cidr_netmask=32 op monitor interval=30s
 
[root@f1 pcs]# ./pcs resource list
ClusterIP (ocf::heartbeat:IPaddr2) Started
 
 
[root@f1 pcs]# ping 192.168.122.99
PING 192.168.122.99 (192.168.122.99) 56(84) bytes of data.
64 bytes from 192.168.122.99: icmp_req=1 ttl=64 time=0.017 ms

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.