Building a Two-Node Linux Cluster with Heartbeat

C T shows you how to set up a two-node Linux cluster with Heartbeat.
Commercial Products

Commercial products from Red Hat, TurboLinux and PolyServe use the same concept of IP aliasing. When the primary server goes down, the backup server will pick up the same aliasing IP so that high availability can be achieved.

The cluster product from PolyServe is very sophisticated. It has support on SAN (server area network) and is capable of more than two nodes. It is very easy to install and easy to configure. I successfully configured the trial version without reading any documentation through a windows monitoring client. However, sophistication comes with a price tag, and the software costs more than a thousand dollars for a two-node cluster. The 30-day trial version cluster will stop after two hours, and it is not much fun for testing.

The cluster product from TurboLinux needs some fine-tuning. The installation documentation is confusing (or maybe they simply don't want people to do-it-themselves). The web configuration tool is unstable; the cgi script will crash whenever the user clicks the reload or refresh button. And of course, as a commercial product, it comes with a high price tag.

Linux is very stable and reliable, and it is quite common to have our servers up and running for a few hundred days at a time. Heartbeat works fine in my tests, and if you are looking for a product with higher availability for a small business or education institution, Heartbeat is definitely a perfect option.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: defrag?

Anonymous's picture

I have never even heard of running defrag for a windows disk problem and no one I know has ever run defrag for that purpose. Defrag is for consolidating data not fixing errors. Why would you even suggest doing this???? Scandisk is the standard tool that everyone uses and runs automatically most times you have a lockup or improper shutdown.

Please for anyone reading the above message do NOT run defrag if you are getting disk errors. Run scandisk. If you continue to have problems your disk may be going bad.

Re: defrag?

Anonymous's picture

I try not to use Windows, but the last time I ran defrag (win98), scandisk was first invoked automatically.

I also thought this article would be about clusters (a la Beowolf), at least based on the title. Anyway, It was easy to read and I learned something new!

(linux.com wouldn't let me log in)

apache cluster on san

gops's picture

hi,

ok heartbeat works great - really appreciated ! and
i am amazed the way it worked perfectly.
how do we mount the san partition for that IP service in active-active apache cluster.
do i make an entry in /etc/fstab or is that a sin ?
I mea i need to mount /var/www/html on /dev/sdc1 . so i do i mak a entry in fstab file ?

gops

apache cluster on san

gops's picture

hi,

ok heartbeat works great - really appreciated ! and
i am amazed the way it worked perfectly.
how do we mount the san partition for that IP service in active-active apache cluster.
do i make an entry in /etc/fstab or is that a sin ?

gops

No Separate Storage?

Data Sheet's picture

Hi,
so it means I have two Linux computers, I can have Cluster installed. So I do not need any separate storage device right?

How shared storage work in this case?

Thanks,
Data Sheet

Mistaken config

Anonymous's picture

Why do you assign in hosts file "node1" and "node2" if you will use "atm1" and "cluster1" ?

if you choose this way "auth errors" will happen, all clusters will be in master role, it is conflict, so assign as below

in ha.cf on both clusters
node node1
node node2

in haresources on both clusters (if you want node1 to be master)

node1 virtualaddress httpd

and you must set authkeys files the same on all clusters otherwise it will not start.

auth 1
1 md5 "mysecret"

and for professional HA cluster we need null modem cable, on NIC perspective SPOFs will load extra bandwidth. For storage networks that is not permittable.

Thanks,

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState