MACH 11 - Overview
Please read the MACH 11 Overview section which contains links to useful information around the technology. Additionally it contains some general information about the MACH 11 Cluster whose setup is described in this Wiki as well as some links to popular virtualization software which allows you to create several virtual hosts on a single physical machine.
SDS - Shared Disk Secondary
An SDS instance has read access to the same disk devices as the primary instance. SDS instances can be configured for offloading complex reports and SQL queries from the primary instance and can also increase high availability by serving as a failover instance. Starting with IDS V11.5, write access is also supported on the SDS instance.
The SDS instance can be located on the same or on a separate machine. In a production environment you will probably place the SDS instance on a separate machine. In this case you need to make sure that the SDS instance has access to the IDS data chunks. If your chunks consist of cooked files (ordinary files in the filesystem) simultaneous access to these files can be accomplished by using a special purpose filesystem like the IBM General Parallel Filesystem.
In the following example we will setup a SDS instance called penguin_sds1 on the same machine as the primary instance. In this configuration we don't need a special filesystem. The already configured penguin instance will serve as our primary instance.
The configuration will be performed as user informix unless otherwise noted.
1. Directory Structure
export PENGUIN_SDS1=/home/informix/instances/penguin_sds1
mkdir -p $PENGUIN_SDS1/logs
chmod 775 $PENGUIN_SDS1/logs
mkdir -p $PENGUIN_SDS1/data
chmod 775 $PENGUIN_SDS1/data
2. Environment File
We will copy the environment file from our primary penguin instance and change the INFORMIXSERVER environment variable:
cd $PENGUIN_SDS1
cp -p ../penguin/env.sh .
vi env.sh
export INFORMIXSERVER=penguin_sds1
The new environment file looks like this:
#!/bin/bash export INFORMIXDIR=/opt/ibm/ids/ids.dev export INFORMIXSERVER=penguin_sds1 export ONCONFIG=onconfig.$INFORMIXSERVER export INFORMIXSQLHOSTS=$INFORMIXDIR/etc/sqlhosts.$INFORMIXSERVER export LD_LIBRARY_PATH=$LD_IBRARY_PATH:$INFORMIXDIR/lib:$INFORMIXDIR/lib/esql export PATH=$PATH:$INFORMIXDIR/bin export PENGUIN_SDS1=/home/informix/instances/$INFORMIXSERVER
After creating the file we should execute it in the current shell in order to set the necessary environment for our IDS instance:
. $PENGUIN_SDS1/env.sh
Remember to use the leading dot, so that the environment variables are set in the current shell.
You might check if everything has been set correctly using the env comand:
env | egrep "^INFORMIX|^ONCONFIG|^LD_LIBRARY_PATH|^PATH|^PENGUIN_SDS1"
3. Communication File
We will create a new sqlhosts file that contains an entry for our SDS instance and another entry pointing to our primary instance penguin:
vi $INFORMIXSQLHOSTS
#================================================= #DBSERVER PROTOCOL HOSTNAME SERVICE #================================================= penguin_sds1 onsoctcp apollo 40100 penguin onsoctcp apollo 40000
In addition we need to add the new instance penguin_sds1 to the already existing sqlhosts file of the primary instance penguin:
vi $INFORMIXDIR/etc/sqlhosts.penguin.cfg
#================================================= #DBSERVER PROTOCOL HOSTNAME SERVICE #================================================= penguin onsoctcp apollo 40000 penguin_drda drsoctpc apollo 40001 penguin_shm onipcshm apollo dummy # new entry pointing to the SDS instance penguin_sds1 onsoctcp apollo_sds1 40100
Please do not copy/paste the sqlhosts files above. This might lead to problems due to hidden control characters. Just write it off from the above examples.
4. Configuration File
In the next step we will create a dedicated onconfig file for our penguin_sds1 instance. We use the existing onconfig.penguin as a template for onconfig.penguin_sds1:
Copy Configuration File
cd $INFORMIXDIR/etc
cp -p onconfig.penguin $ONCONFIG
Adjust Parameters in Configuration File
vi $INFORMIXDIR/etc/$ONCONFIG
Generic Parameters
- MSGPATH
MSGPATH /home/informix/instances/penguin_sds1/logs/online.log
- SERVERNUM
- Our primary penguin instance has SERVERNUM 1 assigned, so we will take SERVERNUM 2 for our SDS instance. Server number must be unique:
SERVERNUM 2
- DBSERVERNAME
DBSERVERNAME penguin_sds1
- DBSERVERALIASES
- We will create no aliases for our penguin_sds1, so leave this parameter blank.
DBSERVERALIASES
- DUMPDIR
DUMPDIR /home/informix/instances/penguin_sds1/logs
SDS Specific Parameters
- SDS_ENABLE
- enables the SDS functionality
SDS_ENABLE 1
- SDS_PAGING
- temporary paging files for updating the bufferpool of the SDS node
SDS_PAGING /home/informix/instances/penguin_sds1/data/bp.pag1,/home/informix/instances/penguin_sds1/data/bp.pag2
- SDS_TEMPDBS
- dedicated temporary dbspaces for this instance
SDS_TEMPDBS tempsds,/home/informix/instances/penguin_sds1/data/tempsds.chk1,2,0,2048
5. Start the SDS Instance
Before starting the SDS instance we need an additional configuration step on the primary instance:
- Command must be executed on the primary instance:
onmode -d set SDS primary penguin
Now we are ready to start the SDS instance:
- Command must be executed on the SDS instance:
oninit -v
If everything went ok, you should see the following message in the online.log of the SDS instance:
- SDS Node:
onstat -m
14:17:26 DR: SDS secondary server operational
You might also check the SDS status using onstat -g sds:
- Primary:
onstat -g sds
IBM Informix Dynamic Server Version 11.10.FC1DE -- On-Line -- Up 01:34:30 -- 59584 Kbytes Local server type: Primary Number of SDS servers:1 SDS server information SDS srv SDS srv Connection Last LPG sent name status status (log id,page) penguin_sds1 Active Connected 18,594
- SDS Instance:
onstat -g sds
IBM Informix Dynamic Server Version 11.10.FC1DE -- Read-Only (SDS) -- Up 01:34:17 -- 67228 Kbytes Local server type: SDS Server Status : Active Source server name: penguin Connection status: Connected Last log page received(log id,page): 18,594
Further Information
From here you might move on to:
- section HDR - High Availability Data Replication which shows how to configure a HDR instance
- section RSS - Remote Standalone Secondary which shows how to configure a RSS instance
- section ER - Enterprise Replication which shows how to configure a ER instance
- section CM - Connection Manager which shows how to configure the Connection Manager
- section CLR - Continuous Log Restore which shows how to configure a CLR instance
