The objective for this example is to set up a four-node partitioned database system 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 partition servers configured for that machine will fail over to the alternative machine, as configured using the MSCS software, and run as a logical node 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:
|
Server 3:
| Server 4:
|
All 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 db2test3 # for Server 3 9.9.9.4 db2test4 # for Server 4 9.9.9.5 ClusterA # for MSCS Cluster 1 9.9.9.6 ClusterB # for MSCS Cluster 2 9.9.9.7 db2tcp # for DB2 remote client connection
Before you perform the following tasks, it is assumed that all four machines belong to the same domain, called DB2NTD:
The next step is to set up the DB2MSCS.CFG file and run the DB2MSCS utility.
To set up the db2test1 machine, perform the following tasks:
# # DB2MSCS.CFG for one partitioned database system with # multiple MSCS clusters DB2_INSTANCE=DB2MPP CLUSTER_NAME=ClusterA DB2_LOGON_USERNAME=db2mpp DB2_LOGON_PASSWORD=db2mpp # Group 1 # for DB2 node 0 GROUP_NAME=DB2NODE0 DB2_NODE=0 IP_NAME=IP Address for DB2 IP_ADDRESS=9.9.9.7 IP_SUBNET=255.255.255.0 IP_NETWORK=Ethernet NETNAME_NAME=Network name for DB2 NETNAME_VALUE=DB2WOLF NETNAME_DEPENDENCY=IP Address for DB2 DISK_NAME=Disk E: INSTPROF_DISK=Disk E: #
# Group 2 # for DB2 node 1 GROUP_NAME=DB2NODE1 DB2_NODE=1 DISK_NAME=Disk F: #
CLUSTER_NAME=ClusterB # Group 3 # for DB2 node 2 GROUP_NAME=DB2NODE2 DB2_NODE=2 DISK_NAME=Disk E:
# # Group 4 # for DB2 node 3 GROUP_NAME=DB2NODE3 DB2_NODE=3 DISK_NAME=Disk F:
db2mscs -f:DB2MSCS.CFG
The final steps are to register the database drive mapping for the two MSCS clusters.
To register the database drive mapping for MSCS cluster ClusterA, perform the following tasks:
db2drvmp add 0 F E db2drvmp add 1 E F
To register the database drive mapping for MSCS cluster ClusterB, perform the following tasks:
db2drvmp add 2 F E db2drvmp add 3 E F