Configuring the High Availability Option for Red Hat Cluster Suite
This appendix describes how to configure the Ingres High Availability Option for the Red Hat Cluster Suite. It assumes you have read Configuring and Managing a Cluster of the RedHat Cluster Suite documentation and the Ingres Installation Guide.
A Database Service
A database service can serve highly-available data to an Ingres database application. The application can then provide network access to database client systems. If the service fails over, the application accesses the shared database data through the new cluster system. A network-accessible database service is usually assigned an IP address, which is failed over along with the service to maintain transparent access for clients.
How You Set Up a Cluster Service for an Ingres Database
This section provides an example of setting up a cluster service for an Ingres database. Although the variables used in the service scripts depend on the specific Ingres configuration, the example may aid in setting up a service for individual environments.
In the example that follows:
- The service includes one IP address for the Ingres clients to use.
- The service has two mounted file systems, one for the Ingres software (/gfs-a/) and the other for the Ingres database (/gfs-b/), which are set up before the service is added.
- A unique cluster name ingrescluster is attributed to the cluster. This allows shared Ingres software instances across the failover cluster.
- The Ingres instance ID for the installed packages is II.
To set up an Ingres service, follow these steps:
- Export the cluster name before installing, then install the Ingres software. For example:
export II_HOSTNAME=ingrescluster
<Install according to the Ingres Installation Guide>
<copy /etc/init.d/ingres<INSTANCE> to other node>
<copy /home/ingres/.ing<INSTANCE>bash to other node>
- The Ingres service example uses a wrapper script, ha_ingres, which is used to start, stop, and query the Ingres service. This script calls the Ingres init scripts installed above. The ha_ingres script must be placed in /etc/init.d, owned by root and executable (chmod +x). Specify this script when you add the service.
Here is an example of the ha_ingres script:
#!/bin/sh
#
# Cluster service script to start, stop, and check status of Ingres
#
export II_HOSTNAME=ingrescluster
export II_INSTANCE=II
case $1 in
status)
. /home/ingres/.ing${II_INSTANCE}bash
echo "\q"|sql iidbdb &> /dev/null
rc=$?
test $rc -eq 0 && echo "Running" || echo "Not Running"
;;
*)
/etc/init.d/ingres${II_INSTANCE} $@
rc=$?
;;
esac
exit $rc
|

|

|
Add an Ingres Service
After the service is set up, you must add it using the Cluster Configuration Tool.
To add an Ingres service using the Cluster Configuration Tool
- Choose Main Menu, System Settings, Server Settings, Cluster, or type redhat-config-cluster at a shell prompt.
The Cluster Status Tool appears by default.
- Choose Cluster, Configure from the Cluster Status Tool menus.
The Cluster Configuration Tool is started.
- Click the Services tab to add the Ingres service:
- Click New.
The Service dialog appears.
- Enter a Service Name for the Ingres service (that is, ha_ingres).
- Select a Failover Domain or leave it as None (see Red Hat Cluster documentation).
- Type an interval (in seconds) to check the health of the Ingres service through the status function of the init script.
- Enter a User Script, such as /etc/init.d/ha_ingres, and then click OK.
- (Optional) Add an IP address for the Ingres service (only if you want to host a virtual IP address on the cluster):
- Select the Ingres service and click Add Child.
- Select Add Service IP Address and click OK.
The Service IP Address dialog appears.
- Enter an IP Address.
- Enter a Netmask, or leave it as None.
- Enter a Broadcast Address, or leave it as None, and then click OK.
- Add a device for the Ingres service and administrative files:
- Select the Ingres service and click Add Child.
- Select Add Device and click OK.
The Device dialog appears.
- Enter the Device Special File (for example, /dev/sdb5).
- In the Mount Point field, enter /gfs-a.
- Select the file system type in FS Type or leave it blank.
- Enter any mount point Options, including rw (read-write), and then click OK.
- Add a device for the Ingres database files:
- Select the Ingres service and click Add Child.
- Select Add Device and click OK.
The Device dialog appears.
- Enter the Device Special File (for example, /dev/sdb6).
- In the Mount Point field, enter /gfs-b.
- Select the file system type in FS Type or leave it blank.
- Enter any mount point Options, including rw (read-write).
- Check or uncheck Force Unmount, and then click OK.
- Choose File, Save.
The Ingres service is saved.
© 2007 Ingres Corporation.
All rights reserved.