The objective for this example is to set up two single-partition database instances with failover support in a mutual takeover configuration. In this example, four servers are configured into two MSCS clusters. By using the mutual takeover configuration, when any of the machine fails, the database server configured for that machine will fail over to the alternative machine, as configured using the MSCS software, and run on the alternative machine.
There are two MSCS clusters in the resulting configuration. Each cluster has:
In addition, each machine has one 100X Ethernet Adapter card installed.
Each machine has the following software installed:
The resulting network configuration is as follows:
Server 1:
| Server 2:
|
Both machines in the network are configured with TCP/IP and connected to a private LAN using an Ethernet 100 T-base Hub. In the absence of a Domain Name Server (DNS), all machines have a local TCP/IP hosts file. Each hosts file contains the following entries:
9.9.9.1 db2test1 # for Server 1 9.9.9.2 db2test2 # for Server 2 9.9.9.3 ClusterA # for MSCS ClusterA 9.9.9.4 db2tcp1 # for DB2 remote client connection to Server 1 9.9.9.5 db2tcp2 # for DB2 remote client connection to Server 2
Before you perform the following tasks, it is assumed that both machines belong to the same domain, called DB2NTD:
The next step is to set up the DB2MSCS.CFG file for each instance, then run the DB2MSCS utility for each instance.
To set up the db2test1 machine, perform the following tasks:
db2icrt DB2A
# # DB2MSCS.CFG for database system # on machine db2test1 DB2_INSTANCE=DB2A CLUSTER_NAME=ClusterA # # Group 1 GROUP_NAME=DB2A Group IP_NAME=IP Address for DB2A IP_ADDRESS=9.9.9.4 IP_SUBNET=255.255.255.0 IP_NETWORK=ClusterA NETNAME_NAME=Network name for DB2A NETNAME_VALUE=DB2SRV1 NETNAME_DEPENDENCY=IP Address for DB2A DISK_NAME=Disk E: INSTPROF_DISK=Disk E:
db2mscs -f:DB2MSCS.CFG
db2icrt DB2B
# # DB2MSCS.CFG for database system # on machine db2test2 DB2_INSTANCE=DB2B CLUSTER_NAME=ClusterA # # Group 1 GROUP_NAME=DB2B Group IP_NAME=IP Address for DB2B IP_ADDRESS=9.9.9.5 IP_SUBNET=255.255.255.0 IP_NETWORK=ClusterA NETNAME_NAME=Network name for DB2B NETNAME_VALUE=DB2SRV2 NETNAME_DEPENDENCY=IP Address for DB2B DISK_NAME=Disk F: INSTPROF_DISK=Disk F:
db2mscs -f:DB2MSCS.CFG