Chapter 1: Starting Services


In this chapter we will examine the basic boot procedure used on a Linux server and how to disable or enable a service. This chapter includes a list of services normally found on a Linux server and describes how these services are used on the nodes inside a cluster.

How do Cluster Services Get Started?

In a cluster environment, a daemon or service is started:

  • By the init daemon when the system boots or enters a runlevel.

  • By Heartbeat when it first starts or needs to take ownership of a resource.

  • By xinetd when a network request comes in.

  • Using some other non-standard method (such as the Daemontools[1] package).

Note 

For the moment, we are leaving batch jobs out of this discussion (because batch jobs are normally not considered "cluster services" that are offered to client computers). To learn more about batch jobs in a cluster environment, see Chapter 18.

Which of these methods should be used depends on the answers to the following questions:

  1. Should the service run at all times or only when network requests come in?

  2. Should the service failover to a backup server when the primary server crashes?

  3. Should the service be restarted automatically if it stops running or ends abnormally?

If the service needs to run only as a result of an incoming network request (telnet and pop are good examples of this type of service), then it should be started by xinetd. However, the majority of services running on a Linux server, and on the nodes inside a cluster, will run all the time and should therefore be started by init when the system first boots (hence the name "init").

If a service should continue to run even when the system it is running on crashes (the LPRng lpd printing daemon running on a print server, for example), then the Heartbeat program should start the service (described in Part II of this book).

In this chapter I'll focus on how init works and later, in Part II, I'll describe how to start services using Heartbeat. Experienced Linux and Unix system administrators will find the first part of this chapter to be a repeat of concepts they are already familiar with and may want to skip to the section titled "Using the Red Hat init Scripts on Cluster Nodes."

[1]The Daemontools package is described in Chapter 8.



The Linux Enterprise Cluster. Build a Highly Available Cluster with Commodity Hardware and Free Software
Linux Enterprise Cluster: Build a Highly Available Cluster with Commodity Hardware and Free Software
ISBN: 1593270364
EAN: 2147483647
Year: 2003
Pages: 219
Authors: Karl Kopper

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net