C. Configuring the High Availability Option for Red Hat Cluster Suite : How to Set Up a Cluster Service for an Ingres Database
 
Share this page                  
How to 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:
1. 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>
<copy /etc/init.d/iimgmtsvc<INSTANCE> to other node>
2. 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.
Note:  If you want to use the Management Server (iimgmtsvr) for Actian Director in the cluster, the iimgmtsvc script must be in the same failover domain and be included in the wrapper script.
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