Sun Cluster 2.2 Software Installation Guide

7.2.5 How to Set Up Sun Cluster HA for Informix

These are the high-level steps to set up Sun Cluster HA for Informix:

These are the detailed steps to set up Sun Cluster HA for Informix.

  1. Update the /var/opt/informix/inftab file with $ONCONFIG information.

    You must include entries for all $ONCONFIG files associated with your databases in the /var/opt/informix/inftab file on all nodes running Sun Cluster HA for Informix. You must keep this file current on all nodes running Sun Cluster HA for Informix for a failover to succeed. Update the file manually as database servers are added or removed.

    Entries in the /var/opt/informix/inftab file have the following format:

    $ONCONFIG:$INFORMIXDIR

    $ONCONFIG is the name of the ONCONFIG file. $INFORMIXDIR is the path to the Informix installation directory. For example, the inftab file might look similar to the following:

    onconfig.node1:/export/home/informix
  2. Activate the Informix data service.

    Log in as user informix and invoke the oninit command, which formats or "cooks" the raw disk or UFS filespace assigned in the $ONCONFIG file as specified by the ROOTPATH variable.

    # oninit -iy
    
  3. Create entries in the /etc/hosts.equiv file or the ~informix/.rhosts file that grant permissions to the informix user to access the database from other cluster nodes.

    These entries have the following format:

    hostname informix
    

    where hostname is the name of the other cluster nodes and informix is the user name.

  4. Enable access for the user and password to be used for fault monitoring.

    Invoke the dbaccess dbname command and add the following lines to the appropriate dbaccess screen.

    # dbaccess dbname -
    ...
     grant connect to root;
     grant resource to root;
     grant dba root;
     grant select on sysprofile to root;

    The database to be probed by the HA fault monitor is identified by the database name (dbname). If that dbname is not defined as sysmaster, use the dbaccess dbname command to add the following line to the appropriate dbaccess screen:

    create synonym sysprofile for sysmaster:informix_owner.sysprofile;
  5. Shut down the Informix database.

    As user informix, use the onmode command to shut down the Informix database:

    # onmode -ky
    
  6. Verify that Sun Cluster is installed and running on all nodes that will run Sun Cluster HA for Informix.

    As root, verify the configuration with the hastat command:

    # hastat
    

    If the cluster nodes are not running already, start them. The first node must be started using the scadmin startcluster command and all other nodes are then started using the scadmin startnode command. Refer to the scadmin(1M) man page for more information on starting the cluster.

  7. Register and activate the Informix data service by using the hareg(1M) command.

    Run the hareg(1M) command on only one host.

    If the Informix data service is not yet registered, use the hareg(1M) command to register it. To register the data service only on the logical host, include the -h option and logical host name:

    # hareg -s -r informix [-h logicalhost]

    If the cluster is running already, use the hareg(1M) command to activate the Informix data service:

    # hareg -y informix
    
  8. Bring Informix under control of Sun Cluster HA for Informix.

    Run the following command so that the instance will be monitored by Sun Cluster.

    # hainformix insert $ONCONFIG logicalhost 60 10 120 300 \
     dbname $INFORMIXSERVER
    

    The above command line includes the following:

    • hainformix insert - Command and subcommand

    • $ONCONFIG - Name of the Informix configuration file

    • logicalhost - Logical host serving $ONCONFIG (not the physical host)

    • -60 -10 -120 -300 - Parameters which specify a probe cycle time of 60 seconds, a connectivity probe cycle count of 10, a probe time out of 120 seconds, and a restart delay of 300 seconds

    • dbname - Name of the database that Sun Cluster 2.2 is to monitor

    • $INFORMIXSERVER - Name of the Informix server

    See the hainformix(1M) man page for details on all options to hainformix(1M).

  9. Bring the Sun Cluster HA for Informix database into service.

    Bring the Sun Cluster HA for Informix database into service by using the hainformix(1M)command.

    # hainformix start $ONCONFIG
    

    Note -

    If you did not start the Informix OnLine server before this step, then Sun Cluster will start the Informix OnLine Server for you when you issue the hainformix start command.