You are on page 1of 22

Configure Cluster & failover with RHEL5.

4 for Web Server        
Compiled By: Alamgir Talukdar          
Date: 30th December 2010 Time: 0130 
=============================================================================== 
1. Hardware Details: 
HP BL320 (Half height) Blade Server. 
Processor: 
RAM: 
NIC: 
HDD: 
RAID: 
SAN: 
Power: 
 
2. OS Details 
Summary:  Red Hat Enterprise Linux (v. 5 for 64‐bit AMD64 / Intel64 Server) 
Red Hat Enterprise Linux ‐ Server core components (v. 5 for 64‐bit 
Description: 
AMD64 / Intel64) 
Label:  rhel‐x86_64‐server‐5 
Last Modified:  2010‐12‐17 03:27:05 IOT 
Channel Entitlement 
Red Hat Enterprise Linux (core server) 
Name: 
Parent Channel:  (none) 
Architecture:  x86_64 
Packages:  10310 
Checksum Method:  SHA1 
RPM Checksum 
MD5 
Method: 
Systems Subscribed:  2 
 
3. Following step need to do for both nodes: 
1. Install RHEL5.4 with GUI (Run level 5) Supported. 
2. Enable licenses (See Licenses Enable Documents). 
3. Update bug removal & Security updated package. 
4. Install following packages to do Cluster & Failover: 
 
i) [root@OBL‐EMS1 mnt]# yum install perl‐* 
ii) [root@OBL‐EMS1 mnt]# yum install cluster* 
iii) [root@OBL‐EMS1 mnt]# yum install system‐config‐cluster 
iv) [root@OBL‐EMS1 mnt]# yum install Cluster_Administration‐en* 
v) [root@OBL‐EMS1 mnt]# yum install lvm* 
vi) [root@OBL‐EMS1 mnt]# yum install lvm2* 
vii) [root@OBL‐EMS1 mnt]# yum install gfs* 
viii) [root@OBL‐EMS1 mnt]# yum install cman* 
ix) [root@OBL‐EMS1 mnt]# yum install rgmanager* 
x) [root@OBL‐EMS1 mnt]# yum install httpd* 
 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 1 of 22 
5. Disable ACPI: 
i) [root@OBL‐EMS1 grub]# vi /etc/grub.conf 
Add:    acpi=off 
ii) [root@OBL‐EMS1 grub]# chkconfig ‐‐list acpid 
acpid           0:off   1:off   2:on    3:on    4:on    5:on    6:off 
iii) [root@OBL‐EMS1 grub]# chkconfig ‐‐level 2345 acpid off 
 
6. Hostname & IP Planning: 
 
IP: Private only for hard bite 
=============================================== 
10.10.10.7/24      OBL‐EMS1        OBL‐EMS1 
10.10.10.8/24      OBL‐EMS2        OBL‐EMS2 
 
IP: Public only for Server. 
=============================================== 
10.156.0.53/24     OBL‐EMS1        OBL‐EMS1 
10.156.0.54/24     OBL‐EMS2        OBL‐EMS2 
 
IP: Virtual Public IP , only for access Server from outside. 
=============================================== 
10.156.0.55/24  
 
IP: Management & Fencing device IP for Hp ILO2  
=============================================== 
10.156.0.216/24     ilo‐ems1        ilo‐ems1 
10.156.0.217/24     ilo‐ems2        ilo‐ems2 
=============================================== 
 
7. Setup Network parameter & hostname : 
i) vi  /etc/sysconfig/network‐script/ifcfg‐eth0 
 
DEVICE=eth0
HWADDR=78:e7:d1:59:8e:78
ONBOOT=yes
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=10.156.0.53
GATEWAY=10.156.0.1
TYPE=Ethernet
 
ii) [root@OBL‐EMS1 mnt]# vi  /etc/sysconfig/network‐script/ifcfg‐eth1 
 
DEVICE=eth1
HWADDR=78:e7:d1:59:8e:7c
ONBOOT=yes
BOOTPROTO=none
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=10.10.10.7 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 2 of 22 
iii) [root@OBL‐EMS1 mnt]# vi  /etc/sysconfig/network 
 
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=OBL-EMS1
 
iv) [root@OBL‐EMS1 mnt]# vi  /etc/sysconfig/hosts 
 
#127.0.0.1 OBL-EMS1
#::1 localhost6.localdomain6 localhost6
10.10.10.7 OBL-EMS1 OBL-EMS1-HA
10.10.10.8 OBL-EMS2 OBL-EMS2-HA
10.156.0.53 OBL-EMS1 OBL-EMS1
10.156.0.54 OBL-EMS2 OBL-EMS2
10.156.0.216 ilo-ems1 ilo-ems1
10.156.0.217 ilo-ems2 ilo-ems2
 
v) Disable selinux Security but enable later after successful cluster configuration. 
[root@OBL‐EMS1 mnt]# setenforce  0 
 
vi) Disable iptables but configure later after successful cluster configuration. 
[root@OBL‐EMS1 mnt]# service iptables stop 
 
8. Configure web server to test the failover: 
vii) [root@OBL‐EMS1 mnt]# service httpd start 
viii) [root@OBL‐EMS1 mnt]# chkconfig ‐‐level 2345 httpd on 
ix) [root@OBL‐EMS1 mnt]# vi /var/www/html/index.html 
Add: Node‐1 
For node 2 same but just change index.html, add Node‐2. 
 
9. Hp‐ilo2 Configure to work as a fencing device 
 

 
 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 3 of 22 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Fig: HP Blade Server Enclosure Front View and Rear View. 
 
 
10. Before start test network from both node‐1 & node‐2: 
 
[root@OBL‐EMS1 mnt]#ping 10.156.0.55 
[root@OBL‐EMS1 mnt]#ping 10.156.0.53

[root@OBL‐EMS1 mnt]# ping 10.10.10.7


[root@OBL‐EMS1 mnt]# ping 10.10.10.8
 
[root@OBL‐EMS1 mnt]# ping 10.156.0.216 
[root@OBL‐EMS1 mnt]# ping 10.156.0.217 
 
[root@OBL‐EMS1 mnt]# ping obl-ems1 
[root@OBL‐EMS1 mnt]# ping obl-ems2 
 
[root@OBL‐EMS1 mnt]# ping ilo-ems1 
[root@OBL‐EMS1 mnt]# ping ilo-ems2 
 
 
11. Before start Need to start following cluster services: 
 
[root@OBL‐EMS1 mnt]# service cman start
[root@OBL‐EMS1 mnt]# service clvmd start 
[root@OBL‐EMS1 mnt]# service gfs start 
[root@OBL‐EMS1 mnt]# service rgmanager start 
 
 
12. Now need to login to GUI mode: 
 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 4 of 22 
13. Need to Follow bellow steps: 
 
(a)  [root@OBL‐EMS1 mnt]# system-config-cluster
(b) Click on Cluster -> Add a cluster name
(c) Add node 1 as name OBL‐EMS1  
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 5 of 22 
Add Second Node as name OBL‐EMS2 
 

 
 
 
 
 
 
 
 
 
 
 
 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 6 of 22 
Adding Fencing Device  
 
(a) Add Hp‐ilo Fencing Device for node1: 
 

 
 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 7 of 22 
(b) Add Hp‐ilo Fencing Device for node2: 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 8 of 22 
 
(c) Add Fence level in node1: 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 9 of 22 
 
(d) Add Fence level in node2: 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 10 of 22 
 
(e) Create a failover domain first create for http service: 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 11 of 22 
 
(f) IP resource for virtual IP 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 12 of 22 
 
(g) Create another script Failover Domain for httpd service : 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 13 of 22 
 
(h) Resource configuration for web service: 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 14 of 22 
 
(i) Resource configuration for http service script: 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 15 of 22 
 
(j) Resource configuration for virtual IP resource: 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 16 of 22 
 
(k) Service configuration for auto failover IP & http service: 
 

 
 
 
NB: If running server failed then standalone server will woke up and change virtual IP & http service. 
 
 
 
 
 
 
 
 
 
 
 
 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 17 of 22 
 
(l) Need to test with different combination with Relocate & Disable: 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 18 of 22 
 
(m) After configure node‐1 then we just need to save & then click on Send to Cluster button to 
send the cluster configuration file to node‐2. 
 

 
 
 
(n) Need to stop & start following Cluster services for both node: 
Stop Services: 
 [root@OBL‐EMS1 mnt]# service rgmanager stop 
[root@OBL‐EMS1 mnt]# service gfs stop 
[root@OBL‐EMS1 mnt]# service clvmd stop 
[root@OBL‐EMS1 mnt]# service cman stop
 
Start Services: 
 
[root@OBL‐EMS1 mnt]# service cman start
[root@OBL‐EMS1 mnt]# service clvmd start 
[root@OBL‐EMS1 mnt]# service gfs start 
[root@OBL‐EMS1 mnt]# service rgmanager start 
 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 19 of 22 
(o) After restart then see the Cluster Management ,it shows the status of the  
Running cluster services and failover mode 
 

 
 
(p) From the CLI it possible to see the status of cluster & failover. 
 

 
 
(q) End of configure. 
 
 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 20 of 22 
 
14. Testing Cluster & failover: 
 
a. Shutdown node‐1: OBL‐EMS1 then vip and http service will be change & go 
through node‐2: OBL‐EMS2. 
b. Start node‐1: OBL‐EMS1 then Shutdown node‐2: OBL‐EMS2 then vip and http 
service will be change & go through node‐1: OBL‐EMS1. 
c. Stop httpd service running failover server but within very short time  
the httpd will be start. 
d. More Test with different Aspect. 
15. Need to Consider: 
a. Need to add SAN storage with both node support ext3 file system. 
b. Need to add SAN storage with both node support gfs file system. 
c. Need to add SAN storage with both node support LVM file system. 
d. Need support oracle services. 
 
16. Problem Found & Solution: 
a. If I restart network services then total server goes to restart. 
17. Problem not yet solved: 
a. If I restart network services then total server goes to restart. 
 
18. Future Planning: 
a. Clustering with conga. 
b. Work with Piranha & Ultra monkey 
19. Troubleshooting: 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 21 of 22 
 
2.RHN Licincing 

Configure Cluster & failover with RHEL5.4 for Web Server       Compiled By: Alamgir Talukdar         Page 22 of 22 

You might also like