db2ha_sample_DPF_mutual.xml
The sample file db2ha_sample_DPF_mutual.xml
is
an example of an XML input file that you pass to Db2® high availability
instance configuration utility (db2haicu) to specify a new cluster
domain. db2ha_sample_DPF_mutual.xml
is located
in the sqllib/samples/ha/xml
directory.
Features
The db2ha_sample_DPF_mutual.xml
sample
demonstrates how to use db2haicu with an XML input
file to define a cluster domain with the following details:
- quorum device: network
- computers in the cluster (cluster domain nodes): four
- failover policy: mutual
- database partitions: two
- virtual (service) IP addresses: one
- shared mount points for failover: two
- databases configured for high availability: two
XML source
<!-- ================================================================= -->
<!-- = Use the Db2 High Availability Instance Configuration Utility = -->
<!-- = (db2haicu) XML schema definition, db2ha.xsd, and specify = -->
<!-- = IBM Tivoli System Automation for Multiplatforms (SA MP) = -->
<!-- = Base Component as the cluster manager. = -->
<!-- ================================================================= -->
<DB2Cluster xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="db2ha.xsd"
clusterManagerName="TSA"
version="1.0">
<!-- ================================================================= -->
<!-- = Create a cluster domain named db2HAdomain. = -->
<!-- ================================================================= -->
<ClusterDomain domainName="db2HAdomain">
<!-- =============================================================== -->
<!-- = Specify a network quorum device (IP address: 19.126.4.5). = -->
<!-- = The IP must be pingable at all times by each of the cluster = -->
<!-- = domain nodes. = -->
<!-- =============================================================== -->
<Quorum quorumDeviceProtocol="network" quorumDeviceName="19.126.4.5"/>
<!-- =============================================================== -->
<!-- = Create a network named db2_public_network_0 with an IP = -->
<!-- = network protocol. = -->
<!-- = This network contains four computers: hasys01, hasys02, = -->
<!-- = hasys03, and hasys04. = -->
<!-- = Each computer has a network interface card called eth0. = -->
<!-- = The IP address of eth0 on hasys01 is 19.126.124.30 = -->
<!-- = The IP address of eth0 on hasys02 is 19.126.124.31 = -->
<!-- = The IP address of eth0 on hasys03 is 19.126.124.32 = -->
<!-- = The IP address of eth0 on hasys04 is 19.126.124.33 = -->
<!-- =============================================================== -->
<PhysicalNetwork physicalNetworkName="db2_public_network_0"
physicalNetworkProtocol="ip">
<Interface interfaceName="eth0" clusterNodeName="hasys01">
<IPAddress baseAddress="19.126.124.30"
subnetMask="255.255.255.0"
networkName="db2_public_network_0"/>
</Interface>
<Interface interfaceName="eth0" clusterNodeName="hasys02">
<IPAddress baseAddress="19.126.124.31"
subnetMask="255.255.255.0"
networkName="db2_public_network_0"/>
</Interface>
<Interface interfaceName="eth0" clusterNodeName="hasys03">
<IPAddress baseAddress="19.126.124.32"
subnetMask="255.255.255.0"
networkName="db2_public_network_0"/>
</Interface>
<Interface interfaceName="eth0" clusterNodeName="hasys04">
<IPAddress baseAddress="19.126.124.33"
subnetMask="255.255.255.0"
networkName="db2_public_network_0"/>
</Interface>
</PhysicalNetwork>
<!-- =============================================================== -->
<!-- = Create a network named db2_private_network_0 with an IP = -->
<!-- = network protocol. = -->
<!-- = This network contains four computers: hasys01, hasys02, = -->
<!-- = hasys03, and hasys04 (same as db2_public_network_0.) = -->
<!-- = In addition to eth0, each computer has a network interface = -->
<!-- = card called eth1. = -->
<!-- = The IP address of eth1 on hasys01 is 192.168.23.101 = -->
<!-- = The IP address of eth1 on hasys02 is 192.168.23.102 = -->
<!-- = The IP address of eth1 on hasys03 is 192.168.23.103 = -->
<!-- = The IP address of eth1 on hasys04 is 192.168.23.104 = -->
<!-- =============================================================== -->
<PhysicalNetwork physicalNetworkName="db2_private_network_0"
physicalNetworkProtocol="ip">
<Interface interfaceName="eth1" clusterNodeName="hasys01">
<IPAddress baseAddress="192.168.23.101"
subnetMask="255.255.255.0"
networkName="db2_private_network_0"/>
</Interface>
<Interface interfaceName="eth1" clusterNodeName="hasys02">
<IPAddress baseAddress="192.168.23.102"
subnetMask="255.255.255.0"
networkName="db2_private_network_0"/>
</Interface>
<Interface interfaceName="eth1" clusterNodeName="hasys03">
<IPAddress baseAddress="192.168.23.103"
subnetMask="255.255.255.0"
networkName="db2_private_network_0"/>
</Interface>
<Interface interfaceName="eth1" clusterNodeName="hasys04">
<IPAddress baseAddress="192.168.23.104"
subnetMask="255.255.255.0"
networkName="db2_private_network_0"/>
</Interface>
</PhysicalNetwork>
<!-- =============================================================== -->
<!-- = List the computers (cluster nodes) in the cluster domain. = -->
<!-- =============================================================== -->
<ClusterNode clusterNodeName="hasys01"/>
<ClusterNode clusterNodeName="hasys02"/>
<ClusterNode clusterNodeName="hasys03"/>
<ClusterNode clusterNodeName="hasys04"/>
</ClusterDomain>
<!-- ================================================================= -->
<!-- = The failover policy specifies the order in which the cluster = -->
<!-- = domain nodes should fail over. = -->
<!-- ================================================================= -->
<FailoverPolicy>
<Mutual />
</FailoverPolicy>
<!-- ================================================================= -->
<!-- = Specify all the details of the database partitions. = -->
<!-- ================================================================= -->
<DB2PartitionSet>
<DB2Partition dbpartitionnum="0" instanceName="db2inst1">
<VirtualIPAddress baseAddress="19.126.124.251"
subnetMask="255.255.255.0"
networkName="db2_public_network_0"/>
<Mount filesystemPath="/hafs/db2inst1/NODE0000"/>
<MutualPair systemPairNode1="hasys01" systemPairNode2="hasys02" />
</DB2Partition>
<DB2Partition dbpartitionnum="1" instanceName="db2inst1">
<Mount filesystemPath="/hafs/db2inst1/NODE0001"/>
<MutualPair systemPairNode1="hasys02" systemPairNode2="hasys01" />
</DB2Partition>
<DB2Partition dbpartitionnum="2" instanceName="db2inst1">
<Mount filesystemPath="/hafs/db2inst1/NODE0002"/>
<MutualPair systemPairNode1="hasys03" systemPairNode2="hasys04" />
</DB2Partition>
<DB2Partition dbpartitionnum="3" instanceName="db2inst1">
<Mount filesystemPath="/hafs/db2inst1/NODE0003"/>
<MutualPair systemPairNode1="hasys04" systemPairNode2="hasys03" />
</DB2Partition>
</DB2PartitionSet>
<!-- ================================================================= -->
<!-- = List of databases to be configured for High Availability = -->
<!-- ================================================================= -->
<HADBSet instanceName="db2inst1">
<HADB databaseName = "SAMPLE" />
<HADB databaseName = "MYDB" />
</HADBSet>
</DB2Cluster>