I have two servers on Mageia2. I want to make a cluster whith this two servers, but there isn't heartbeat package on Mageia2 and compilation not work.
I decided to use pacemaker and corosync (recommanded by the Wiki).
I found a tuto here:
http://kaivanov.blogspot.fr/2012/01/bui ... maker.html
but [root@node1 ~]# /etc/init.d/corosync start doesn't exists.
Can I configure a cluster on Mageia2 servers ?
srv01 - 192.168.56.201
srv02 - 192.168.56.202
future node cluster - 192.168.56.200
Help ?
- Code: Select all
[root@srv01 ~]# cat /etc/corosync/service.d/pcmk
service {
# Load the Pacemaker Cluster Resource Manager
name: pacemaker
ver: 1
}
END
- Code: Select all
[root@srv01 ~]# cat /etc/corosync/corosync.conf
# Please read the corosync.conf.5 manual page
totem {
version: 2
# cypto_cipher and crypto_hash: Used for mutual node authentication.
# If you choose to enable this, then do remember to create a shared
# secret with "corosync-keygen".
crypto_cipher: none
crypto_hash: none
# interface: define at least one interface to communicate
# over. If you define more than one interface stanza, you must
# also set rrp_mode.
interface {
# Rings must be consecutively numbered, starting at 0.
ringnumber: 0
# This is normally the *network* address of the
# interface to bind to. This ensures that you can use
# identical instances of this configuration file
# across all your cluster nodes, without having to
# modify this option.
bindnetaddr: 192.168.56.0
# However, if you have multiple physical network
# interfaces configured for the same subnet, then the
# network address alone is not sufficient to identify
# the interface Corosync should bind to. In that case,
# configure the *host* address of the interface
# instead:
# bindnetaddr: 192.168.1.1
# When selecting a multicast address, consider RFC
# 2365 (which, among other things, specifies that
# 239.255.x.x addresses are left to the discretion of
# the network administrator). Do not reuse multicast
# addresses across multiple Corosync clusters sharing
# the same network.
mcastaddr: 226.94.1.1
# Corosync uses the port you specify here for UDP
# messaging, and also the immediately preceding
# port. Thus if you set this to 5405, Corosync sends
# messages over UDP ports 5405 and 5404.
mcastport: 4000
# Time-to-live for cluster communication packets. The
# number of hops (routers) that this ring will allow
# itself to pass. Note that multicast routing must be
# specifically enabled on most network routers.
ttl: 1
}
}
logging {
# Log the source file and line where messages are being
# generated. When in doubt, leave off. Potentially useful for
# debugging.
fileline: off
# Log to standard error. When in doubt, set to no. Useful when
# running in the foreground (when invoking "corosync -f")
to_stderr: no
# Log to a log file. When set to "no", the "logfile" option
# must not be set.
to_logfile: yes
logfile: /var/log/cluster/corosync.log
# Log to the system log daemon. When in doubt, set to yes.
to_syslog: yes
# Log debug messages (very verbose). When in doubt, leave off.
debug: off
# Log messages with time stamps. When in doubt, set to on
# (unless you are only logging to syslog, where double
# timestamps can be annoying).
timestamp: on
logger_subsys {
subsys: QUORUM
debug: off
}
}
quorum {
# Enable and configure quorum subsystem (default: off)
# see also corosync.conf.5 and votequorum.5
#provider: corosync_votequorum
}
- Code: Select all
[root@srv01 ~]# cat /etc/hosts
# generated by drakconnect
127.0.0.1 srv01
127.0.0.1 localhost
192.168.56.201 srv01
192.168.56.202 srv02
- Code: Select all
[root@srv01 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:6F:A9:B2
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3716 errors:0 dropped:0 overruns:0 frame:0
TX packets:2043 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:3294737 (3.1 MiB) TX bytes:129927 (126.8 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:01:78:F7
inet adr:192.168.56.201 Bcast:192.168.56.255 Masque:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:44683 errors:0 dropped:0 overruns:0 frame:0
TX packets:49746 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:12051365 (11.4 MiB) TX bytes:12141238 (11.5 MiB)
lo Link encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:60795 errors:0 dropped:0 overruns:0 frame:0
TX packets:60795 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:6361744 (6.0 MiB) TX bytes:6361744 (6.0 MiB)
- Code: Select all
[root@srv02 init.d]# cat /etc/hosts
# generated by drakconnect
127.0.0.1 srv02
127.0.0.1 localhost
192.168.56.202 srv02
192.168.56.201 srv01
- Code: Select all
[root@srv02 init.d]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:BB:1F:B1
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:24586 errors:0 dropped:0 overruns:0 frame:0
TX packets:12869 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:21699955 (20.6 MiB) TX bytes:739329 (722.0 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:3C:0A:22
inet adr:192.168.56.202 Bcast:192.168.56.255 Masque:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:48752 errors:0 dropped:0 overruns:0 frame:0
TX packets:47413 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:12567115 (11.9 MiB) TX bytes:11844533 (11.2 MiB)
lo Link encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:64203 errors:0 dropped:0 overruns:0 frame:0
TX packets:64203 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:6710173 (6.3 MiB) TX bytes:6710173 (6.3 MiB)