zeldor.biz

Linux, programming and more

Copyright © 2023
Log in

HA cluster on openSUSE

December 13, 2018 by Igor Drobot Leave a Comment

Pacemaker LogoThe Corosync Cluster Engine is a Group Communication System with additional features for implementing high availability within applications.

A kind of masterpiece for high availability solutions and redundant systems with special requirement.
This stack is able to accept challenges in datacenter area to provide infrastructure high availability also across multiple different fire protection zones and over miles.

Firewall, load balancer, webservers, VPN-Concepts, doesn’t matter, sound like a swiss knife. Try and simplify your life.

All this was written for openSUSE 15.0 with a default 4.12 kernel.

Install required cluster stack packages, all dependencies will be automatically installed:

1
zypper in corosync pacemaker

zypper in corosync pacemaker

Enable autostart for pacemaker service:

systemctl enable pacemaker.service

systemctl enable pacemaker.service

Example configuration for corosync cames automatically by the installation:

cp /etc/corosync/corosync.conf.example /etc/corosync/corosync.conf

cp /etc/corosync/corosync.conf.example /etc/corosync/corosync.conf

Configure corosync:

/etc/corosync/corosync.conf
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
totem {
	version: 2
	crypto_cipher: none
	crypto_hash: none
	clear_node_high_bit: yes
 
	interface {
		ringnumber: 0
		bindnetaddr: 172.18.20.91
		mcastaddr: 239.255.3.1
		mcastport: 5415
		ttl: 1
	}
}
 
logging {
        fileline: off
        to_stderr: no
        logfile: /var/log/cluster/corosync.log
        to_syslog: yes
        debug: off
        timestamp: on
        logger_subsys {
                subsys: QUORUM
                debug: off
        }
}
 
quorum {
	provider: corosync_votequorum
}
 
 
nodelist {
           node {
               ring0_addr: 172.18.20.91
           }
           node {
               ring0_addr: 172.18.20.92
           }
       }

totem { version: 2 crypto_cipher: none crypto_hash: none clear_node_high_bit: yes interface { ringnumber: 0 bindnetaddr: 172.18.20.91 mcastaddr: 239.255.3.1 mcastport: 5415 ttl: 1 } } logging { fileline: off to_stderr: no logfile: /var/log/cluster/corosync.log to_syslog: yes debug: off timestamp: on logger_subsys { subsys: QUORUM debug: off } } quorum { provider: corosync_votequorum } nodelist { node { ring0_addr: 172.18.20.91 } node { ring0_addr: 172.18.20.92 } }

bindnetaddr is a static ip address if your node and should be unique on each cluster node!
mcastaddr do not reuse multicast addresses across different corosync clusters! The same applies mcastport option.

A separate log directory was defined in the configuration to split the logs from the default system messages;
So create the directory before starting the corosync.service:

mkdir /var/log/corosync

mkdir /var/log/corosync

Start cluster stack on both nodes:

1
systemctl start pacemaker.service

systemctl start pacemaker.service

It will take some seconds and they will see each other and join to pair
[TOTEM] A new membership (172.18.20.92:8) was formed. Members joined: 167845468

1
2
3
4
5
6
7
8
9
10
crm configre show
node 167845467: node01
node 167845468: node02
property cib-bootstrap-options: \
        default-resource-stickiness=INFINITY \
        no-quorum-policy=ignore \
        cluster-recheck-interval=3min \
        dc-version=1.1.12-1.1.12.git20140904.266d5c2 \
        cluster-infrastructure=corosync \
        stonith-enabled=false

crm configre show node 167845467: node01 node 167845468: node02 property cib-bootstrap-options: \ default-resource-stickiness=INFINITY \ no-quorum-policy=ignore \ cluster-recheck-interval=3min \ dc-version=1.1.12-1.1.12.git20140904.266d5c2 \ cluster-infrastructure=corosync \ stonith-enabled=false

Make sure everything you do, reaches all cluster members. This is the main rule to have a stable and synchronous cluster-system of multiple nodes.

If this is your first Cluster experience, take a look into the hawk project, which basically provides a web GUI for your cluster.
Interface can help you to make the first steps and get in touch with the cluster. Attention: don’t use it in production environment.

For more deeper information take a look into this post.

Sources:
– http://clusterlabs.org
– https://github.com/ClusterLabs/hawk

Filed Under: Linux Tagged With: Cluster, Corosync, HA, hawk, hawk2, Pacemaker

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *