This chapter provides information about configuring the IRIS FailSafe INFORMIX database option for use on an IRIS FailSafe system. The major sections in this chapter are as follows:
The required software for INFORMIX failover is as follows:
INFORMIX database software
See the Informix Installation Guide Version 7.1 for UNIX Products for installation instructions.
base IRIS FailSafe software
See the section “Installing the IRIS FailSafe Software” in Chapter 2 of the IRIS FailSafe Administrator's Guide for a complete list of required base software.
IRIS FailSafe INFORMIX software
The software subsystem is ha_ ifmx.sw.base.
The subsections below discuss choosing the location of key INFORMIX files and INFORMIX databases. They also describe an example configuration of INFORMIX files and the IRIS FailSafe configuration parameters for this configuration.
In configuring INFORMIX on an IRIS FailSafe cluster, consider the locations of these components:
INFORMIX software (installed in $INFORMIXDIR, for example /usr/informix)
the INFORMIX configuration file (specified by $ONCONFIG)
INFORMIX databases
You have the flexibility to use different copies of each component, for example INFORMIX software, for each database server (the INFORMIX software must be identical on both nodes). In addition, the INFORMIX configuration file for one database server can be different on each node. For example, if the two nodes have different amounts of memory, you may want different parameter values in the INFORMIX configuration file on the two nodes. However, the two configuration files must have identical pathnames.
To plan an IRIS FailSafe configuration for INFORMIX, you must answer these questions:
What is the primary node of each database server?
Do all of the database servers use the same INFORMIX software or not?
Is the INFORMIX configuration file identical on each node for each database server or different?
After answering all of the questions above, follow these guidelines for each database server to decide whether to use shared or non-shared disks for each of the INFORMIX components for that server:
INFORMIX databases must be on one or more XFS filesystems or XLV logical volumes that are on shared disks.
If the INFORMIX configuration file is identical on each node, it can be on a shared disk or replicated on a non-shared disk on each node.
If the INFORMIX configuration file is different on each node, it must be on non-shared disks on each node.
INFORMIX software can be on a shared disk or replicated on non-shared disks (it must be identical on each node).
For a simple INFORMIX configuration with one database server called INFORMIX1 whose primary node is xfs-ha2, an example configuration is as follows:
INFORMIX software |
| |
INFORMIX configuration file |
| |
INFORMIX database |
|
Table 2-1 lists the label and configuration parameters for the INFORMIX database in the configuration described in the previous section, “Example INFORMIX Configuration.”
Table 2-1. INFORMIX Configuration Parameters
Label or Parameter | Example Value | Comments |
---|---|---|
database label | INFORMIX1 | Database server name. |
release-dir | /usr/informix | This value is the value of $INFORMIXDIR. |
master-db-fs | /xfs-ha2fs | The value is the label of the filesystem that is used by the rootdbs for this database server. |
sa-user | informix | Database user name. |
config-file | onconfig.1 | This value is the value of $ONCONFIG. |
Table 2-2 shows the configuration parameters that control monitoring. They are specified per database instance, so you can choose different monitoring for each database.
Table 2-2. Configuration Parameters for Monitoring
Parameter | Possible Values | Comment |
---|---|---|
monitoring-level | 1 | If the value is 1, the onstat command is used for monitoring. If the value is 2, an SQL query is used. |
running-indicator- | “string|string” | The value must begin and end with a double quote (“). It can contain one string or multiple strings separated by an “or” symbol (|). See below for examples of strings. |
An example of the parameter running-indicator-strings is
running-indicator-strings = "On-Line|Recovery" |
For this example, the IRIS FailSafe INFORMIX database agent determines that the database is running if the output contains the string On-Line or the string Recovery. For example:
# onstat INFORMIX-OnLine Version 7.12.UC1 -- On-Line -- Up 00:01:27 -- 9584 Kbytes ... # onstat INFORMIX-OnLine Version 7.12.UC1 -- Fast Recovery -- Up 00:00:10 -- 9584 ... |
The procedure for creating a configuration file that includes INFORMIX configuration information is described below. The procedure assumes that a configuration file that doesn't include INFORMIX has been created, installed, and tested as described in the IRIS FailSafe Administrator's Guide . Using the procedure, you add information to a copy of the configuration file. Installing the configuration file as /var/ha/ha.conf on both nodes is described in the section “Installing the Configuration File” in this chapter.
Copy the file /var/ha/ha.conf to any directory on one of the nodes in the cluster.
Add all of the volumes that will be used for INFORMIX to the copy of ha.conf if they are not already specified in ha.conf. Be sure to specify the devname-owner, devname-group, and devname-mode parameters for volumes used as raw devices for INFORMIX database data. See the sections “Logical Volume Configuration” in Chapter 2 and “Volume Blocks” in Chapter 4 of the IRIS FailSafe Administrator's Guide for more information.
Add all of the filesystems that will be used for INFORMIX to the copy of ha.conf if they are not already specified in ha.conf. See the section “Filesystem Blocks” in Chapter 4 of the IRIS FailSafe Administrator's Guide for more information.
Append a copy of /var/ha/templates/ha.conf.informix to the end of the copy of the configuration file.
Complete the block called “application-class informix.” See the section “INFORMIX Application-Class Block” in Chapter 3 and the comments in the file for information.
Replicate the “informix” block so that there is one informix block for each database instance.
Using the configuration parameter choices you made in the section “Planning INFORMIX Configuration” in this chapter and the information in the section “INFORMIX Blocks” in Chapter 3, prepare each of the informix blocks.
Using information in the section “INFORMIX Blocks” in Chapter 3, prepare the “action informix” and “action-timer informix” blocks.
Check the configuration file with the ha_cfgverify command:
# /usr/etc/ha_cfgverify copy_filename |
See the section “Verifying the Configuration File” in Chapter 4 of the IRIS FailSafe Administrator's Guide for information about checking the configuration file with ha_cfgverify.
To install the new version of the configuration file /var/ha/ha.conf on each node, you must follow the procedure described in the section “Procedure C” in Chapter 7 of the IRIS FailSafe Administrator's Guide .
Follow the procedure below to test INFORMIX configuration and failover. When debugging INFORMIX failover, you can look in these places for information:
INFORMIX log files
/var/adm/SYSLOG
Comment out all of the INFORMIX related blocks in /var/ha/ha.conf on one node. Do not comment out the blocks for the filesystems and volumes used for INFORMIX.
Copy the copy of ha.conf from step 1 to the other node.
Test the failover of the volumes and filesystems that are used by INFORMIX and are on shared disks using the procedures in “Testing Volumes” and “Testing Filesystems” in Chapter 5 of the IRIS FailSafe Administrator's Guide .
Bring up both nodes in the cluster so that they are running IRIS FailSafe and are in normal state.
Bring up each INFORMIX database on its primary node using these commands (or the equivalent for your shell):
# setenv INFORMIXDIR release-dir # setenv INFORMIXSERVER database-server-name # setenv ONCONFIG config-dir # setenv PATH ${PATH}:${INFORMIXDIR}/bin # oninit |
release-dir and config-dir are the values of the parameters in ha.conf with these names for the database you are starting up. database-server-name is the label for the informix block for the INFORMIX database you are bringing up.
(You can identify the primary node of an INFORMIX database by looking at its master-db-vol or master-db-fs. The volume block for master-db-vol or the volume on which master-db-fs resides lists the server-node for the volume. This is the primary node for the database.)
Check that the databases came up by entering the onstat command on each node that is a primary node:
# onstat INFORMIX-OnLine Version 7.12.UC1 -- On-Line -- Up 00:01:27 -- 9584 Kbytes ... |
Shut down each INFORMIX database by entering these commands for each database on its primary node:
# setenv INFORMIXDIR release-dir # setenv INFORMIXSERVER database-server-name # setenv PATH ${PATH}:${INFORMIXDIR}/bin # onmode -ky |
Enter this command on each node to shut down IRIS FailSafe:
# /etc/init.d/failsafe stop |
Uncomment all of the INFORMIX blocks in /var/ha/ha.conf on one node.
Copy the copy of ha.conf from step 9 to the other node.
Enter this command on each node to start up IRIS FailSafe:
# /etc/init.d/failsafe start |
Check that the databases came up by entering the onstat command on each node that is a primary node:
# onstat INFORMIX-OnLine Version 7.12.UC1 -- On-Line -- Up 00:01:27 -- 9584 Kbytes ... |
For the first database listed in ha.conf (the first informix block), stop the database by entering these commands (or the equivalent for your shell) on its primary node:
# setenv INFORMIXDIR release-dir # setenv INFORMIXSERVER database-server-name # setenv ONCONFIG config-dir # setenv PATH ${PATH}:${INFORMIXDIR}/bin # onmode -ky |
(See step 5 for an explanation of release-dir, config-dir, and the primary node.)
Check that IRIS FailSafe fails over the database that you killed and all other highly available services on that node to the other node.
Confirm that the node on which you stopped the database is in standby state:
# /usr/etc/ha_admin -i ha_admin: Node controller state standby |
On the node that is now in standby state, enter this command to reintegrate it into the cluster:
# /usr/etc/ha_admin -fr |
Check that the highly available services that failed over in step 14 are stopped and restarted on their original node.
For each of the remaining INFORMIX databases listed in ha.conf, repeat steps 13 through 17 to verify that they fail over properly when stopped or killed.