redhat cluster cento6 improved
[root@localhost Desktop]# yum groupinstall 'High Availability' 'resilient storage'
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Group Process
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* centos-sclo-rh: centos.excellmedia.net
* centos-sclo-sclo: centos.excellmedia.net
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
Warning: Group luci does not exist.
Resolving Dependencies
--> Running transaction check
---> Package ccs.x86_64 0:0.16.2-87.el6 will be installed
---> Package cman.x86_64 0:3.0.12.1-84.el6 will be installed
--> Processing Dependency: ricci >= 0.15.0-4 for package: cman-3.0.12.1-84.el6.x86_64
--> Processing Dependency: openais >= 1.1.1-1 for package: cman-3.0.12.1-84.el6.x86_64
--> Processing Dependency: fence-virt >= 0.2.3-1 for package: cman-3.0.12.1-84.el6.x86_64
--> Processing Dependency: fence-agents >= 3.1.5-1 for package: cman-3.0.12.1-84.el6.x86_64
--> Processing Dependency: libSaCkpt.so.3(OPENAIS_CKPT_B.01.01)(64bit) for package: cman-3.0.12.1-84.el6.x86_64
--> Processing Dependency: libSaCkpt.so.3()(64bit) for package: cman-3.0.12.1-84.el6.x86_64
---> Package gfs2-utils.x86_64 0:3.0.12.1-84.el6 will be installed
---> Package lvm2-cluster.x86_64 0:2.02.143-12.el6_9.1 will be installed
---> Package omping.x86_64 0:0.0.4-1.el6 will be installed
---> Package rgmanager.x86_64 0:3.0.12.1-33.el6 will be installed
--> Processing Dependency: resource-agents >= 3.9.1-1 for package: rgmanager-3.0.12.1-33.el6.x86_64
--> Running transaction check
---> Package fence-agents.x86_64 0:4.0.15-13.el6_9.2 will be installed
--> Processing Dependency: sg3_utils for package: fence-agents-4.0.15-13.el6_9.2.x86_64
--> Processing Dependency: python-suds for package: fence-agents-4.0.15-13.el6_9.2.x86_64
--> Processing Dependency: pexpect for package: fence-agents-4.0.15-13.el6_9.2.x86_64
--> Processing Dependency: perl-Net-Telnet for package: fence-agents-4.0.15-13.el6_9.2.x86_64
--> Processing Dependency: perl(Net::Telnet) for package: fence-agents-4.0.15-13.el6_9.2.x86_64
--> Processing Dependency: net-snmp-utils for package: fence-agents-4.0.15-13.el6_9.2.x86_64
--> Processing Dependency: gnutls-utils for package: fence-agents-4.0.15-13.el6_9.2.x86_64
--> Processing Dependency: /usr/bin/virsh for package: fence-agents-4.0.15-13.el6_9.2.x86_64
--> Processing Dependency: /usr/bin/ipmitool for package: fence-agents-4.0.15-13.el6_9.2.x86_64
---> Package fence-virt.x86_64 0:0.2.3-24.el6 will be installed
---> Package openais.x86_64 0:1.1.1-7.el6 will be installed
---> Package openaislib.x86_64 0:1.1.1-7.el6 will be installed
---> Package resource-agents.x86_64 0:3.9.5-46.el6 will be installed
---> Package ricci.x86_64 0:0.16.2-87.el6 will be installed
--> Running transaction check
---> Package gnutls-utils.x86_64 0:2.12.23-22.el6 will be installed
---> Package ipmitool.x86_64 0:1.8.15-2.el6 will be installed
---> Package libvirt-client.x86_64 0:0.10.2-64.el6_10.2 will be installed
--> Processing Dependency: nc for package: libvirt-client-0.10.2-64.el6_10.2.x86_64
--> Processing Dependency: libyajl.so.1()(64bit) for package: libvirt-client-0.10.2-64.el6_10.2.x86_64
---> Package net-snmp-utils.x86_64 1:5.5-60.el6 will be installed
---> Package perl-Net-Telnet.noarch 0:3.03-11.el6 will be installed
---> Package pexpect.noarch 0:2.3-6.el6 will be installed
---> Package python-suds.noarch 0:0.4.1-3.el6 will be installed
---> Package sg3_utils.x86_64 0:1.28-13.el6 will be installed
--> Running transaction check
---> Package nc.x86_64 0:1.84-24.el6 will be installed
---> Package yajl.x86_64 0:1.0.7-3.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
ccs x86_64 0.16.2-87.el6 base 57 k
cman x86_64 3.0.12.1-84.el6 base 454 k
gfs2-utils x86_64 3.0.12.1-84.el6 base 329 k
lvm2-cluster x86_64 2.02.143-12.el6_9.1 base 529 k
omping x86_64 0.0.4-1.el6 base 34 k
rgmanager x86_64 3.0.12.1-33.el6 base 189 k
Installing for dependencies:
fence-agents x86_64 4.0.15-13.el6_9.2 base 193 k
fence-virt x86_64 0.2.3-24.el6 base 39 k
gnutls-utils x86_64 2.12.23-22.el6 base 109 k
ipmitool x86_64 1.8.15-2.el6 base 465 k
libvirt-client x86_64 0.10.2-64.el6_10.2 updates 4.1 M
nc x86_64 1.84-24.el6 base 57 k
net-snmp-utils x86_64 1:5.5-60.el6 base 177 k
openais x86_64 1.1.1-7.el6 base 192 k
openaislib x86_64 1.1.1-7.el6 base 82 k
perl-Net-Telnet noarch 3.03-11.el6 base 56 k
pexpect noarch 2.3-6.el6 base 147 k
python-suds noarch 0.4.1-3.el6 base 218 k
resource-agents x86_64 3.9.5-46.el6 base 389 k
ricci x86_64 0.16.2-87.el6 base 633 k
sg3_utils x86_64 1.28-13.el6 base 498 k
yajl x86_64 1.0.7-3.el6 base 27 k
Transaction Summary
================================================================================
Install 22 Package(s)
Total download size: 8.8 M
Installed size: 28 M
Is this ok [y/N]: y
Downloading Packages:
(1/22): ccs-0.16.2-87.el6.x86_64.rpm | 57 kB 00:00
(2/22): cman-3.0.12.1-84.el6.x86_64.rpm | 454 kB 00:02
(3/22): fence-agents-4.0.15-13.el6_9.2.x86_64.rpm | 193 kB 00:01
(4/22): fence-virt-0.2.3-24.el6.x86_64.rpm | 39 kB 00:00
(5/22): gfs2-utils-3.0.12.1-84.el6.x86_64.rpm | 329 kB 00:02
(6/22): gnutls-utils-2.12.23-22.el6.x86_64.rpm | 109 kB 00:00
(7/22): ipmitool-1.8.15-2.el6.x86_64.rpm | 465 kB 00:03
(8/22): libvirt-client-0.10.2-64.el6_10.2.x86_64.rpm | 4.1 MB 00:31
(9/22): lvm2-cluster-2.02.143-12.el6_9.1.x86_64.rpm | 529 kB 00:03
(10/22): nc-1.84-24.el6.x86_64.rpm | 57 kB 00:00
(11/22): net-snmp-utils-5.5-60.el6.x86_64.rpm | 177 kB 00:01
(12/22): omping-0.0.4-1.el6.x86_64.rpm | 34 kB 00:00
(13/22): openais-1.1.1-7.el6.x86_64.rpm | 192 kB 00:01
(14/22): openaislib-1.1.1-7.el6.x86_64.rpm | 82 kB 00:00
(15/22): perl-Net-Telnet-3.03-11.el6.noarch.rpm | 56 kB 00:00
(16/22): pexpect-2.3-6.el6.noarch.rpm | 147 kB 00:01
(17/22): python-suds-0.4.1-3.el6.noarch.rpm | 218 kB 00:03
(18/22): resource-agents-3.9.5-46.el6.x86_64.rpm | 389 kB 00:05
(19/22): rgmanager-3.0.12.1-33.el6.x86_64.rpm | 189 kB 00:01
(20/22): ricci-0.16.2-87.el6.x86_64.rpm | 633 kB 00:03
(21/22): sg3_utils-1.28-13.el6.x86_64.rpm | 498 kB 00:02
(22/22): yajl-1.0.7-3.el6.x86_64.rpm | 27 kB 00:00
--------------------------------------------------------------------------------
Total 115 kB/s | 8.8 MB 01:18
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : openaislib-1.1.1-7.el6.x86_64 1/22
Installing : openais-1.1.1-7.el6.x86_64 2/22
Installing : gnutls-utils-2.12.23-22.el6.x86_64 3/22
Installing : nc-1.84-24.el6.x86_64 4/22
Installing : ricci-0.16.2-87.el6.x86_64 5/22
Installing : yajl-1.0.7-3.el6.x86_64 6/22
Installing : libvirt-client-0.10.2-64.el6_10.2.x86_64 7/22
Installing : pexpect-2.3-6.el6.noarch 8/22
Installing : resource-agents-3.9.5-46.el6.x86_64 9/22
Installing : perl-Net-Telnet-3.03-11.el6.noarch 10/22
Installing : 1:net-snmp-utils-5.5-60.el6.x86_64 11/22
Installing : sg3_utils-1.28-13.el6.x86_64 12/22
Installing : python-suds-0.4.1-3.el6.noarch 13/22
Installing : fence-virt-0.2.3-24.el6.x86_64 14/22
Installing : ipmitool-1.8.15-2.el6.x86_64 15/22
Installing : fence-agents-4.0.15-13.el6_9.2.x86_64 16/22
Stopping kdump:[ OK ]
Starting kdump:[ OK ]
Installing : cman-3.0.12.1-84.el6.x86_64 17/22
Installing : rgmanager-3.0.12.1-33.el6.x86_64 18/22
Installing : lvm2-cluster-2.02.143-12.el6_9.1.x86_64 19/22
Installing : omping-0.0.4-1.el6.x86_64 20/22
Installing : ccs-0.16.2-87.el6.x86_64 21/22
Installing : gfs2-utils-3.0.12.1-84.el6.x86_64 22/22
Verifying : rgmanager-3.0.12.1-33.el6.x86_64 1/22
Verifying : gfs2-utils-3.0.12.1-84.el6.x86_64 2/22
Verifying : ipmitool-1.8.15-2.el6.x86_64 3/22
Verifying : libvirt-client-0.10.2-64.el6_10.2.x86_64 4/22
Verifying : fence-virt-0.2.3-24.el6.x86_64 5/22
Verifying : python-suds-0.4.1-3.el6.noarch 6/22
Verifying : sg3_utils-1.28-13.el6.x86_64 7/22
Verifying : openais-1.1.1-7.el6.x86_64 8/22
Verifying : openaislib-1.1.1-7.el6.x86_64 9/22
Verifying : 1:net-snmp-utils-5.5-60.el6.x86_64 10/22
Verifying : ccs-0.16.2-87.el6.x86_64 11/22
Verifying : perl-Net-Telnet-3.03-11.el6.noarch 12/22
Verifying : fence-agents-4.0.15-13.el6_9.2.x86_64 13/22
Verifying : resource-agents-3.9.5-46.el6.x86_64 14/22
Verifying : gnutls-utils-2.12.23-22.el6.x86_64 15/22
Verifying : cman-3.0.12.1-84.el6.x86_64 16/22
Verifying : omping-0.0.4-1.el6.x86_64 17/22
Verifying : pexpect-2.3-6.el6.noarch 18/22
Verifying : lvm2-cluster-2.02.143-12.el6_9.1.x86_64 19/22
Verifying : yajl-1.0.7-3.el6.x86_64 20/22
Verifying : ricci-0.16.2-87.el6.x86_64 21/22
Verifying : nc-1.84-24.el6.x86_64 22/22
Installed:
ccs.x86_64 0:0.16.2-87.el6 cman.x86_64 0:3.0.12.1-84.el6
gfs2-utils.x86_64 0:3.0.12.1-84.el6 lvm2-cluster.x86_64 0:2.02.143-12.el6_9.1
omping.x86_64 0:0.0.4-1.el6 rgmanager.x86_64 0:3.0.12.1-33.el6
Dependency Installed:
fence-agents.x86_64 0:4.0.15-13.el6_9.2
fence-virt.x86_64 0:0.2.3-24.el6
gnutls-utils.x86_64 0:2.12.23-22.el6
ipmitool.x86_64 0:1.8.15-2.el6
libvirt-client.x86_64 0:0.10.2-64.el6_10.2
nc.x86_64 0:1.84-24.el6
net-snmp-utils.x86_64 1:5.5-60.el6
openais.x86_64 0:1.1.1-7.el6
openaislib.x86_64 0:1.1.1-7.el6
perl-Net-Telnet.noarch 0:3.03-11.el6
pexpect.noarch 0:2.3-6.el6
python-suds.noarch 0:0.4.1-3.el6
resource-agents.x86_64 0:3.9.5-46.el6
ricci.x86_64 0:0.16.2-87.el6
sg3_utils.x86_64 0:1.28-13.el6
yajl.x86_64 0:1.0.7-3.el6
Complete!
[root@localhost Desktop]# yum install luci pacemaker
[root@localhost ~]# rpm -qa | egrep "ricci|luci|modc|cluster|ccs|cman"
ricci-0.16.2-87.el6.x86_64
ccs-0.16.2-87.el6.x86_64
modcluster-0.16.2-35.el6.x86_64
cluster-snmp-0.16.2-35.el6.x86_64
lvm2-cluster-2.02.143-12.el6_9.1.x86_64
clusterlib-3.0.12.1-84.el6.x86_64
cman-3.0.12.1-84.el6.x86_64
luci-0.26.0-93.el6.centos.x86_64
[root@redhat Desktop]# iptables -I INPUT -m state --state NEW -m multiport -p udp -s 192.168.0.0/24 -d 192.168.0.0/24 --dports 5404,5405 -j ACCEPT
[root@redhat Desktop]# iptables -I INPUT -m addrtype --dst-type MULTICAST -m state --state NEW -m multiport -p udp -s 192.168.0.0/24 --dports 5404,5405 -j ACCEPT
[root@redhat Desktop]# iptables -I INPUT -m state --state NEW -p tcp -s 192.168.0.0/24 -d 192.168.0.0/24 --dport 21064 -j ACCEPT
[root@redhat Desktop]# iptables -I INPUT -m state --state NEW -p tcp -s 192.168.0.0/24 -d 192.168.0.0/24 --dport 11111 -j ACCEPT
[root@redhat Desktop]# iptables -I INPUT -m state --state NEW -p tcp -s 192.168.0.0/24 -d 192.168.0.0/24 --dport 16851 -j ACCEPT
[root@redhat Desktop]# iptables -I INPUT -m state --state NEW -p tcp -s 192.168.0.0/24 -d 192.168.0.0/24 --dport 8084 -j ACCEPT
[root@redhat Desktop]# iptables -I INPUT -p igmp -j ACCEPT
[root@redhat Desktop]# service iptables save ; service iptables restart
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]
[root@redhat Desktop]# service corosync start
Starting Corosync Cluster Engine (corosync): [ OK ]
[root@redhat Desktop]# service cman startStarting cluster:
Checking if cluster has been disabled at boot... [ OK ]
Checking Network Manager... [ OK ]
Global setup... [ OK ]
Loading kernel modules... [ OK ]
Mounting configfs... [ OK ]
Starting cman... [ OK ]
Waiting for quorum... [ OK ]
Starting fenced... [ OK ]
Starting dlm_controld... [ OK ]
Tuning DLM kernel config... [ OK ]
Starting gfs_controld... [ OK ]
Unfencing self... [ OK ]
Joining fence domain... [ OK ]
[root@node1 Desktop]# service luci status
No PID file /var/run/luci/luci.pid
[root@node1 Desktop]# service luci start
Start luci... [ OK ]
Point your web browser to https://node1.example.com:8084 (or equivalent) to access luci
[root@node1 Desktop]# cat /etc/cluster/cluster.conf
<?xml version="1.0"?>
<cluster config_version="2" name="wall">
<clusternodes>
<clusternode name="node1.example.com" nodeid="1"/>
<clusternode name="node2.example.com" nodeid="2"/>
</clusternodes>
<cman expected_votes="1" two_node="1"/>
</cluster>
[root@node1 Desktop]#
[root@node1 Desktop]# clustat
Cluster Status for wall @ Wed Oct 16 10:08:10 2019
Member Status: Quorate
Member Name ID Status
------ ---- ---- ------
node1.example.com 1 Online, Local
node2.example.com 2 Online
[root@node1 Desktop]#
https://docs.google.com/document/d/e/2PACX-1vR3zzkLxKDuoxoF_wW9VxSBD4VOk6kTPIGnDOgxnusFNqYnx9lL5OASYNY9HFfmVKrq62iDxUoj7IBv/pub
client
[root@localhost network-scripts]# cat /etc/cluster/cluster.conf
<?xml version="1.0"?>
<cluster config_version="2" name="wall">
<clusternodes>
<clusternode name="node1.example.com" nodeid="1"/>
<clusternode name="node2.example.com" nodeid="2"/>
</clusternodes>
<cman expected_votes="1" two_node="1"/>
</cluster>
[root@localhost network-scripts]#
add resource apache
[root@node1 Desktop]# clustat
Cluster Status for wall @ Wed Oct 16 10:43:44 2019
Member Status: Quorate
Member Name ID Status
------ ---- ---- ------
node1.example.com 1 Online, Local, rgmanager
node2.example.com 2 Online, rgmanager
Service Name Owner (Last) State
------- ---- ----- ------ -----
service:httpd node1.example.com started
[root@node1 Desktop]#
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Group Process
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* centos-sclo-rh: centos.excellmedia.net
* centos-sclo-sclo: centos.excellmedia.net
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
Warning: Group luci does not exist.
Resolving Dependencies
--> Running transaction check
---> Package ccs.x86_64 0:0.16.2-87.el6 will be installed
---> Package cman.x86_64 0:3.0.12.1-84.el6 will be installed
--> Processing Dependency: ricci >= 0.15.0-4 for package: cman-3.0.12.1-84.el6.x86_64
--> Processing Dependency: openais >= 1.1.1-1 for package: cman-3.0.12.1-84.el6.x86_64
--> Processing Dependency: fence-virt >= 0.2.3-1 for package: cman-3.0.12.1-84.el6.x86_64
--> Processing Dependency: fence-agents >= 3.1.5-1 for package: cman-3.0.12.1-84.el6.x86_64
--> Processing Dependency: libSaCkpt.so.3(OPENAIS_CKPT_B.01.01)(64bit) for package: cman-3.0.12.1-84.el6.x86_64
--> Processing Dependency: libSaCkpt.so.3()(64bit) for package: cman-3.0.12.1-84.el6.x86_64
---> Package gfs2-utils.x86_64 0:3.0.12.1-84.el6 will be installed
---> Package lvm2-cluster.x86_64 0:2.02.143-12.el6_9.1 will be installed
---> Package omping.x86_64 0:0.0.4-1.el6 will be installed
---> Package rgmanager.x86_64 0:3.0.12.1-33.el6 will be installed
--> Processing Dependency: resource-agents >= 3.9.1-1 for package: rgmanager-3.0.12.1-33.el6.x86_64
--> Running transaction check
---> Package fence-agents.x86_64 0:4.0.15-13.el6_9.2 will be installed
--> Processing Dependency: sg3_utils for package: fence-agents-4.0.15-13.el6_9.2.x86_64
--> Processing Dependency: python-suds for package: fence-agents-4.0.15-13.el6_9.2.x86_64
--> Processing Dependency: pexpect for package: fence-agents-4.0.15-13.el6_9.2.x86_64
--> Processing Dependency: perl-Net-Telnet for package: fence-agents-4.0.15-13.el6_9.2.x86_64
--> Processing Dependency: perl(Net::Telnet) for package: fence-agents-4.0.15-13.el6_9.2.x86_64
--> Processing Dependency: net-snmp-utils for package: fence-agents-4.0.15-13.el6_9.2.x86_64
--> Processing Dependency: gnutls-utils for package: fence-agents-4.0.15-13.el6_9.2.x86_64
--> Processing Dependency: /usr/bin/virsh for package: fence-agents-4.0.15-13.el6_9.2.x86_64
--> Processing Dependency: /usr/bin/ipmitool for package: fence-agents-4.0.15-13.el6_9.2.x86_64
---> Package fence-virt.x86_64 0:0.2.3-24.el6 will be installed
---> Package openais.x86_64 0:1.1.1-7.el6 will be installed
---> Package openaislib.x86_64 0:1.1.1-7.el6 will be installed
---> Package resource-agents.x86_64 0:3.9.5-46.el6 will be installed
---> Package ricci.x86_64 0:0.16.2-87.el6 will be installed
--> Running transaction check
---> Package gnutls-utils.x86_64 0:2.12.23-22.el6 will be installed
---> Package ipmitool.x86_64 0:1.8.15-2.el6 will be installed
---> Package libvirt-client.x86_64 0:0.10.2-64.el6_10.2 will be installed
--> Processing Dependency: nc for package: libvirt-client-0.10.2-64.el6_10.2.x86_64
--> Processing Dependency: libyajl.so.1()(64bit) for package: libvirt-client-0.10.2-64.el6_10.2.x86_64
---> Package net-snmp-utils.x86_64 1:5.5-60.el6 will be installed
---> Package perl-Net-Telnet.noarch 0:3.03-11.el6 will be installed
---> Package pexpect.noarch 0:2.3-6.el6 will be installed
---> Package python-suds.noarch 0:0.4.1-3.el6 will be installed
---> Package sg3_utils.x86_64 0:1.28-13.el6 will be installed
--> Running transaction check
---> Package nc.x86_64 0:1.84-24.el6 will be installed
---> Package yajl.x86_64 0:1.0.7-3.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
ccs x86_64 0.16.2-87.el6 base 57 k
cman x86_64 3.0.12.1-84.el6 base 454 k
gfs2-utils x86_64 3.0.12.1-84.el6 base 329 k
lvm2-cluster x86_64 2.02.143-12.el6_9.1 base 529 k
omping x86_64 0.0.4-1.el6 base 34 k
rgmanager x86_64 3.0.12.1-33.el6 base 189 k
Installing for dependencies:
fence-agents x86_64 4.0.15-13.el6_9.2 base 193 k
fence-virt x86_64 0.2.3-24.el6 base 39 k
gnutls-utils x86_64 2.12.23-22.el6 base 109 k
ipmitool x86_64 1.8.15-2.el6 base 465 k
libvirt-client x86_64 0.10.2-64.el6_10.2 updates 4.1 M
nc x86_64 1.84-24.el6 base 57 k
net-snmp-utils x86_64 1:5.5-60.el6 base 177 k
openais x86_64 1.1.1-7.el6 base 192 k
openaislib x86_64 1.1.1-7.el6 base 82 k
perl-Net-Telnet noarch 3.03-11.el6 base 56 k
pexpect noarch 2.3-6.el6 base 147 k
python-suds noarch 0.4.1-3.el6 base 218 k
resource-agents x86_64 3.9.5-46.el6 base 389 k
ricci x86_64 0.16.2-87.el6 base 633 k
sg3_utils x86_64 1.28-13.el6 base 498 k
yajl x86_64 1.0.7-3.el6 base 27 k
Transaction Summary
================================================================================
Install 22 Package(s)
Total download size: 8.8 M
Installed size: 28 M
Is this ok [y/N]: y
Downloading Packages:
(1/22): ccs-0.16.2-87.el6.x86_64.rpm | 57 kB 00:00
(2/22): cman-3.0.12.1-84.el6.x86_64.rpm | 454 kB 00:02
(3/22): fence-agents-4.0.15-13.el6_9.2.x86_64.rpm | 193 kB 00:01
(4/22): fence-virt-0.2.3-24.el6.x86_64.rpm | 39 kB 00:00
(5/22): gfs2-utils-3.0.12.1-84.el6.x86_64.rpm | 329 kB 00:02
(6/22): gnutls-utils-2.12.23-22.el6.x86_64.rpm | 109 kB 00:00
(7/22): ipmitool-1.8.15-2.el6.x86_64.rpm | 465 kB 00:03
(8/22): libvirt-client-0.10.2-64.el6_10.2.x86_64.rpm | 4.1 MB 00:31
(9/22): lvm2-cluster-2.02.143-12.el6_9.1.x86_64.rpm | 529 kB 00:03
(10/22): nc-1.84-24.el6.x86_64.rpm | 57 kB 00:00
(11/22): net-snmp-utils-5.5-60.el6.x86_64.rpm | 177 kB 00:01
(12/22): omping-0.0.4-1.el6.x86_64.rpm | 34 kB 00:00
(13/22): openais-1.1.1-7.el6.x86_64.rpm | 192 kB 00:01
(14/22): openaislib-1.1.1-7.el6.x86_64.rpm | 82 kB 00:00
(15/22): perl-Net-Telnet-3.03-11.el6.noarch.rpm | 56 kB 00:00
(16/22): pexpect-2.3-6.el6.noarch.rpm | 147 kB 00:01
(17/22): python-suds-0.4.1-3.el6.noarch.rpm | 218 kB 00:03
(18/22): resource-agents-3.9.5-46.el6.x86_64.rpm | 389 kB 00:05
(19/22): rgmanager-3.0.12.1-33.el6.x86_64.rpm | 189 kB 00:01
(20/22): ricci-0.16.2-87.el6.x86_64.rpm | 633 kB 00:03
(21/22): sg3_utils-1.28-13.el6.x86_64.rpm | 498 kB 00:02
(22/22): yajl-1.0.7-3.el6.x86_64.rpm | 27 kB 00:00
--------------------------------------------------------------------------------
Total 115 kB/s | 8.8 MB 01:18
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : openaislib-1.1.1-7.el6.x86_64 1/22
Installing : openais-1.1.1-7.el6.x86_64 2/22
Installing : gnutls-utils-2.12.23-22.el6.x86_64 3/22
Installing : nc-1.84-24.el6.x86_64 4/22
Installing : ricci-0.16.2-87.el6.x86_64 5/22
Installing : yajl-1.0.7-3.el6.x86_64 6/22
Installing : libvirt-client-0.10.2-64.el6_10.2.x86_64 7/22
Installing : pexpect-2.3-6.el6.noarch 8/22
Installing : resource-agents-3.9.5-46.el6.x86_64 9/22
Installing : perl-Net-Telnet-3.03-11.el6.noarch 10/22
Installing : 1:net-snmp-utils-5.5-60.el6.x86_64 11/22
Installing : sg3_utils-1.28-13.el6.x86_64 12/22
Installing : python-suds-0.4.1-3.el6.noarch 13/22
Installing : fence-virt-0.2.3-24.el6.x86_64 14/22
Installing : ipmitool-1.8.15-2.el6.x86_64 15/22
Installing : fence-agents-4.0.15-13.el6_9.2.x86_64 16/22
Stopping kdump:[ OK ]
Starting kdump:[ OK ]
Installing : cman-3.0.12.1-84.el6.x86_64 17/22
Installing : rgmanager-3.0.12.1-33.el6.x86_64 18/22
Installing : lvm2-cluster-2.02.143-12.el6_9.1.x86_64 19/22
Installing : omping-0.0.4-1.el6.x86_64 20/22
Installing : ccs-0.16.2-87.el6.x86_64 21/22
Installing : gfs2-utils-3.0.12.1-84.el6.x86_64 22/22
Verifying : rgmanager-3.0.12.1-33.el6.x86_64 1/22
Verifying : gfs2-utils-3.0.12.1-84.el6.x86_64 2/22
Verifying : ipmitool-1.8.15-2.el6.x86_64 3/22
Verifying : libvirt-client-0.10.2-64.el6_10.2.x86_64 4/22
Verifying : fence-virt-0.2.3-24.el6.x86_64 5/22
Verifying : python-suds-0.4.1-3.el6.noarch 6/22
Verifying : sg3_utils-1.28-13.el6.x86_64 7/22
Verifying : openais-1.1.1-7.el6.x86_64 8/22
Verifying : openaislib-1.1.1-7.el6.x86_64 9/22
Verifying : 1:net-snmp-utils-5.5-60.el6.x86_64 10/22
Verifying : ccs-0.16.2-87.el6.x86_64 11/22
Verifying : perl-Net-Telnet-3.03-11.el6.noarch 12/22
Verifying : fence-agents-4.0.15-13.el6_9.2.x86_64 13/22
Verifying : resource-agents-3.9.5-46.el6.x86_64 14/22
Verifying : gnutls-utils-2.12.23-22.el6.x86_64 15/22
Verifying : cman-3.0.12.1-84.el6.x86_64 16/22
Verifying : omping-0.0.4-1.el6.x86_64 17/22
Verifying : pexpect-2.3-6.el6.noarch 18/22
Verifying : lvm2-cluster-2.02.143-12.el6_9.1.x86_64 19/22
Verifying : yajl-1.0.7-3.el6.x86_64 20/22
Verifying : ricci-0.16.2-87.el6.x86_64 21/22
Verifying : nc-1.84-24.el6.x86_64 22/22
Installed:
ccs.x86_64 0:0.16.2-87.el6 cman.x86_64 0:3.0.12.1-84.el6
gfs2-utils.x86_64 0:3.0.12.1-84.el6 lvm2-cluster.x86_64 0:2.02.143-12.el6_9.1
omping.x86_64 0:0.0.4-1.el6 rgmanager.x86_64 0:3.0.12.1-33.el6
Dependency Installed:
fence-agents.x86_64 0:4.0.15-13.el6_9.2
fence-virt.x86_64 0:0.2.3-24.el6
gnutls-utils.x86_64 0:2.12.23-22.el6
ipmitool.x86_64 0:1.8.15-2.el6
libvirt-client.x86_64 0:0.10.2-64.el6_10.2
nc.x86_64 0:1.84-24.el6
net-snmp-utils.x86_64 1:5.5-60.el6
openais.x86_64 0:1.1.1-7.el6
openaislib.x86_64 0:1.1.1-7.el6
perl-Net-Telnet.noarch 0:3.03-11.el6
pexpect.noarch 0:2.3-6.el6
python-suds.noarch 0:0.4.1-3.el6
resource-agents.x86_64 0:3.9.5-46.el6
ricci.x86_64 0:0.16.2-87.el6
sg3_utils.x86_64 0:1.28-13.el6
yajl.x86_64 0:1.0.7-3.el6
Complete!
[root@localhost Desktop]# yum install luci pacemaker
[root@localhost ~]# rpm -qa | egrep "ricci|luci|modc|cluster|ccs|cman"
ricci-0.16.2-87.el6.x86_64
ccs-0.16.2-87.el6.x86_64
modcluster-0.16.2-35.el6.x86_64
cluster-snmp-0.16.2-35.el6.x86_64
lvm2-cluster-2.02.143-12.el6_9.1.x86_64
clusterlib-3.0.12.1-84.el6.x86_64
cman-3.0.12.1-84.el6.x86_64
luci-0.26.0-93.el6.centos.x86_64
Configure Cluster in Linux
1. As the first step for setting up the cluster, you need to start the ricci service on all available servers.
# service ricci start
OR
# /etc/init.d/ricci start
[root@localhost vmware-tools-distrib]# service ricci start
Starting oddjobd: [ OK ]
generating SSL certificates... done
Generating NSS database... done
Starting ricci: [ OK ]
[root@localhost vmware-tools-distrib]#
[root@localhost vmware-tools-distrib]# service ricci status
ricci (pid 41279) is running...
[root@localhost vmware-tools-distrib]#
root@localhost vmware-tools-distrib]# passwd ricci
Changing password for user ricci.
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost vmware-tools-distrib]#
firewall chanages
firewall chanages
[root@redhat Desktop]# iptables -I INPUT -m state --state NEW -m multiport -p udp -s 192.168.0.0/24 -d 192.168.0.0/24 --dports 5404,5405 -j ACCEPT
[root@redhat Desktop]# iptables -I INPUT -m addrtype --dst-type MULTICAST -m state --state NEW -m multiport -p udp -s 192.168.0.0/24 --dports 5404,5405 -j ACCEPT
[root@redhat Desktop]# iptables -I INPUT -m state --state NEW -p tcp -s 192.168.0.0/24 -d 192.168.0.0/24 --dport 21064 -j ACCEPT
[root@redhat Desktop]# iptables -I INPUT -m state --state NEW -p tcp -s 192.168.0.0/24 -d 192.168.0.0/24 --dport 11111 -j ACCEPT
[root@redhat Desktop]# iptables -I INPUT -m state --state NEW -p tcp -s 192.168.0.0/24 -d 192.168.0.0/24 --dport 16851 -j ACCEPT
[root@redhat Desktop]# iptables -I INPUT -m state --state NEW -p tcp -s 192.168.0.0/24 -d 192.168.0.0/24 --dport 8084 -j ACCEPT
[root@redhat Desktop]# iptables -I INPUT -p igmp -j ACCEPT
[root@redhat Desktop]# service iptables save ; service iptables restart
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]
[root@redhat Desktop]# service corosync start
Starting Corosync Cluster Engine (corosync): [ OK ]
[root@redhat Desktop]# service cman startStarting cluster:
Checking if cluster has been disabled at boot... [ OK ]
Checking Network Manager... [ OK ]
Global setup... [ OK ]
Loading kernel modules... [ OK ]
Mounting configfs... [ OK ]
Starting cman... [ OK ]
Waiting for quorum... [ OK ]
Starting fenced... [ OK ]
Starting dlm_controld... [ OK ]
Tuning DLM kernel config... [ OK ]
Starting gfs_controld... [ OK ]
Unfencing self... [ OK ]
Joining fence domain... [ OK ]
[root@node1 Desktop]# service luci status
No PID file /var/run/luci/luci.pid
[root@node1 Desktop]# service luci start
Start luci... [ OK ]
Point your web browser to https://node1.example.com:8084 (or equivalent) to access luci
[root@node1 Desktop]# cat /etc/cluster/cluster.conf
<?xml version="1.0"?>
<cluster config_version="2" name="wall">
<clusternodes>
<clusternode name="node1.example.com" nodeid="1"/>
<clusternode name="node2.example.com" nodeid="2"/>
</clusternodes>
<cman expected_votes="1" two_node="1"/>
</cluster>
[root@node1 Desktop]#
[root@node1 Desktop]# clustat
Cluster Status for wall @ Wed Oct 16 10:08:10 2019
Member Status: Quorate
Member Name ID Status
------ ---- ---- ------
node1.example.com 1 Online, Local
node2.example.com 2 Online
[root@node1 Desktop]#
https://docs.google.com/document/d/e/2PACX-1vR3zzkLxKDuoxoF_wW9VxSBD4VOk6kTPIGnDOgxnusFNqYnx9lL5OASYNY9HFfmVKrq62iDxUoj7IBv/pub
client
[root@localhost network-scripts]# cat /etc/cluster/cluster.conf
<?xml version="1.0"?>
<cluster config_version="2" name="wall">
<clusternodes>
<clusternode name="node1.example.com" nodeid="1"/>
<clusternode name="node2.example.com" nodeid="2"/>
</clusternodes>
<cman expected_votes="1" two_node="1"/>
</cluster>
[root@localhost network-scripts]#
[root@localhost network-scripts]# clustat
Cluster Status for wall @ Wed Oct 16 10:08:24 2019
Member Status: Quorate
Member Name ID Status
------ ---- ---- ------
node1.example.com 1 Online
node2.example.com 2 Online, Local
add resource apache
[root@node1 Desktop]# clustat
Cluster Status for wall @ Wed Oct 16 10:43:44 2019
Member Status: Quorate
Member Name ID Status
------ ---- ---- ------
node1.example.com 1 Online, Local, rgmanager
node2.example.com 2 Online, rgmanager
Service Name Owner (Last) State
------- ---- ----- ------ -----
service:httpd node1.example.com started
[root@node1 Desktop]#
Comments
Post a Comment