Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
This document will teach you the installation and configuration of Apache Cluster with GFS2 file system For RedHat or Centos 6
Choose eth0 then enter Now you need to assign management IP address for HP VSA storage.
Please note, you should use static IP for management your virtual storage.
Now we need to assign management group for administrate HP VSA storage. At the localhost.localdomain section right click on it, then choose add new management group. Please check the below photo
Now we need to assign name for this management group. Write whatever you need I used vsan
After that we need to create administrator user and assign password for this user Please check the following photo
Now we need to assign NTP, DNS and SMTP server for VSA storage Please note we will use NTP only here. At production system you should use DNS and SMTP
At the above photo its telling you that which valid VIP you can use. After write the VIP and subnet mask press OK
Ill create 2 GB partition with full provisioning. Then press finish. Now your HP VSA storage configured and ready to connect with your system.
After that go to TC1 and TC2 and run the following command iscsiadm -m discovery -t sendtargets -p 192.168.37.132 (VIP of VSA storage) it will start ISCSI service and show you the initiator name
Please note don't forget to run chkconfig iscsi on at both server We need to verify our configuration by the following command lsscsi to show you which iscsi hard drive connected to your system.
Important note: if the TC2 and TC2 running under VMware work station or ESXi you should add iscsi device from edit virtual machine settings. Please check the following photos
then press finish and back to settings again select Genric ISCSI then at Virtual device node choose SCSI 0:0 Generic SCSI (SCSI 0:0) from Menu
at TC2 choose SCSI 0:1 Generic SCSI (SCSI 0:1) from Menu at Virtual Device Node
Conga Pre-configuration
Set the password for ricci ( run the following commands at both servers) passwd ricci Changing password for user ricci. New password: configure the cluster services for auto startup chkconfig ricci on | service ricci start chkconfig luci on | service luci start (head node only) chkconfig cman on | chkconfig clvmd on | chkconfig rgmanager on chkconfig modclusterd on chkconfig NetworkManager off | service NetworkManager stop Regarding the NetworkManager service you should edit the following file /etc/sysconfig/network-scripts/ifcfg-eth0 on both server and configure it like the following photos
Please note i didn't use bond interface because it's not production server now add the IP of both server with Hostname at /etc/hosts of both servers please check the following photos
The ISCSI hard drive is /dev/sdc. Run fdisk /dev/sdc to create /dev/sdc1 partition We need to create GFS2 file system for this partition via the following command mkfs.gfs2 -p lock_dlm -t cls(cls here its my cluster name):datafs1 -j (The number of journals for gfs2_mkfs to create. You need at least one journal per machine that will mount the filesystem. If this option is not specified, one journal will be created) 8 /dev/sdc1
For the cluster name as we mention before our cluster name is cls. You can check Use the Same Password for All Nodes if all root password is same Node name it will be based on command hostname ############################################ [root@tc1 ~]# hostname tc1.local [root@tc1 ~]# [root@tc2 ~]# hostname tc2.local [root@tc2 ~]# ################################################ In case it's first time for building cluster I would recommend use Download packages Check enable shared storage support Please check the following photo
For Fence Devices i wont create it, because its not production system.
Go to failover domains then press add 2- For fail over section add the name of your fail over then check each of prioritized and no failback At member section check both servers and for priority for tc1.local set 1 and tc2.local set 2
3- Go to Resources section and press on add. We will add the following as resources A IP address (VIP) B F ile system (GFS2) C - Script (Apache init script for start and stop Apache) Please check the following photos
Adding file system Please note ISCSI device (/dev/sdc1) should be the same at both servers.
Create recourse script. We will use http init script for Apache. For name section you can use httpd or whatever you need.
4- After pressing submit, we need to create service from service group section
Press on add A- For service name section write your service name B- enable Automatically Start for this Service C- For failover domain choose your failover domain name or leave it none
5- the most important step add resource After pressing on add resource bottom we should add all resources we created it before. Please check the following photos
After pressing on submit bottom you will have Apache Cluster with GFS2 file system. To verify configuration 1- for GFS2 file system please run mount command at TC1
For Apache go to your web browser and write the vip (http://192.168.37.139)
we need to check failover whether is working or not we need to reboot TC1 and check logs at TC2. At TC2 log file you will got notification that the TC1 went down and TC2 will handle the cluster check the following photos