3
zypper in zypper in corosync pacemaker
5
zypper ar http://download.opensuse.org/repositories/devel:/languages:/ruby:/extensions/openSUSE_13.1/devel:languages:ruby:extensions.repo
6
zypper in pcs-0.9.139-csa.noarch.rpm
8
passwd hacluster [on all nodes]
11
systemctl enable corosync
12
systemctl enable pacemaker
17
pcs cluster auth -u hacluster 192.168.26.131 192.168.26.132 192.168.26.135
18
pcs cluster setup --name cluster_nfs 192.168.26.131 192.168.26.132
19
pcs cluster start --all
21
pcs property set stonith-enabled=false [ Disable STONOTH which is killing unexpected nodes to prevent data corruption ]
22
pcs property set no-quorum-policy=ignore [ Disables qourum which ensures that bigger part of cluster is working and smaller
26
When the cluster looses connectivity, the data corruption may happen as each node
27
thinks he is only alive.
28
quorum - is the concept used to select which nodes are part of active cluster and which are not.
29
if 'total_nodes < 2 * active_nodes', then this part of cluster have a quorum and continues
30
to operate while if number of active nodes is less, then the part is considered disconnected
31
and stops. However, this is not working for 2 node clusters. In this case, the qorum checking
32
can be (and should be) disabled with:
33
pcs property set no-quorum-policy=ignore
34
stonith - is concept to ensure what services are stopped once node is disconnected from
35
cluster. For simpler clusters this can be disabled with
36
pcs property set stonith-enabled=false
40
pcs resource create nfs_ip ocf:heartbeat:IPaddr2 ip=192.168.26.150 cidr_netmask=24 op monitor interval=15s
41
pcs resource create webserver ocf:heartbeat:apache configfile=/etc/httpd/conf/httpd.conf statusurl="http://localhost/server-status" op monitor interval=1min
43
pcs resource delete nfs_ip
45
Listing available types of resources
46
pcs resource standards
47
pcs resource providers
48
pcs resource agents ocf:glusterfs
49
pcs resource agents ocf:heartbeat
54
There is two parameters:
55
prefers - the service will be run on the system with higher value of prefers
56
stickness - unless prefers is also above stickness, the service will not be migrated to new system with higher prefers.
59
pcs resource meta nfs_ip resource-stickiness=100
60
pcs constraint location nfs_ip prefers 192.168.26.132=200
62
Restricting 2 services to run on the same node
63
pcs constraint colocation add webserver virtual_ip INFINITY
65
Specifying the order of execution
66
pcs constraint order virtual_ip then webserver
68
Checking currently set constraits
71
Simulating resource allocation
74
Also stickiness may be set while creating of the resource [using default or excplicitely]
75
pcs resource defaults resource-stickiness=100
76
pcs resource create nfs_ip ocf:heartbeat:IPaddr2 ip=192.168.26.150 cidr_netmask=24 op monitor interval=15s meta resource-stickiness=5O
82
corosync-cmapctl | grep members
89
pcs cluster stop node1 [just stops a single node for cehcking]
94
- if one node is out corosync starts to use memory and shortly gets a lot of it and many logs...
95
- can we somehow provide a 3rd (4th,5th) verification nodes in the cluster to use it only for qourom checking?