This is the first of a series of articles that will demonstrate how to create a Linux cluster using Red Hat/CentOS  5.5 distribution. When we  created our first cluster at the office, we were searching for some Red Hat cluster setup information on the internet. To my surprise, we could not find a lot of  article or user experience on that topic. So I hope, this series of articles will benefit to the community of users trying or wanting to create their own cluster.

The cluster hardware

Our cluster will have 3 HP servers, they will all have 4GB of memory, 36GB of mirrored internal disks, one Qlogic fiber card connected to our SAN system, 2 network cards and for our fencing device we will use the on-board HP ILO (Integrated Light Out). This is my setup, yours does not need to be the same.  You do not need to use HP server to build a cluster, you do not need to have mirrored disks (although recommended) and you do not need to have to use a SAN infrastructure either (NFS share can also be used). One thing I would recommend is a fencing device, on the HP server there is a network port on the back of each server called “ILO”.  This will allow the cluster software to power on, power off or restart a server remotely. Red Hat cluster package allow you to use a lot of similar fencing devices. This part of the cluster is important because this will prevent at one point some nodes in the cluster to write to a non-shareable file-system and create data corruption. If you do not have a fencing device, you can always use the manual fencing method it works, but it not supported.

The Setup

Our cluster will be contains 3 servers, we will have 2 actives servers and one passive. For our example, we will have one server running an HTTP service, the second server will be an FTP server. The third server will be use as a fail-over server, if the first or second server have network, SAN, or hardware problem, the service it is running will move the third server.

Although not required, having a passive server offer some advantage, first it make sure that if one server have problem the passive server will be able to handle the load of any of your server. If we did  not have that passive server we would need to make sure that either of the server would be capable of handling the load of the two servers on one server.

Clustering environment offer some other advantage when time come to do hardware update on a server. Let say we need to add memory to the first server, we could move the HTTP service from one server to the passive node, add memory to the first server and then move back to the service on the original node when ready. Another advantage of having a passive server is that you can update the OS of your node one by one without affecting the service (if reboot is necessary).

So the name of our node will be “bilbo” the will host the http service, “gollum” the will host the FTP service and “gandalf” will be our passive node.

Click on image to view it enlarge.

As you can see above, each server use 3 network cards.

The first NIC (eth0), is use to offer the service HTTP and FTP to the users and it is the host main network card.

The second network card (eth1) is used by cluster software for his heartbeat. In a corporate environment, this network should be isolated from the rest of your network. There will be a lot of  broadcast on it and the response time is important.

The ILO network will be used by the cluster software to remotely poweron/poweroff server in our cluster, when a problem arise.

So out /etc/hosts file look like this :

#       localhost.localdomain   localhost
# Host Real IP       gandalf        gollum         bilbo
# Service Virtual IP           ftp           www
# HeartBeat IP Address     hbgandalf      hbgollum       hbbilbo
# HP ILO IP Address   ilo_gandalf    ilo_gollum     ilo_bilbo


We should define all the ip address that our cluster need to function properly in your /etc/hosts. Of course they should also be define in your DNS, but in case your DNS does not respond, the /etc/hosts will assure you that the cluster will continue to work properly. We will use the domain name “¨ through out these articles.

In our second article, we will be installing the cluster software and begin the configuration of the cluster.




Part 1 – Creating a Linux ReadHat/CentOS cluster

Part 2 – Creating a Linux ReadHat/CentOS cluster

Part 3 – Creating a Linux ReadHat/CentOS cluster

Part 4 – Creating a Linux ReadHat/CentOS cluster

Part 5 – Creating a Linux ReadHat/CentOS cluster