db2ha_sample_sharedstorage_mutual.xml

The sample file db2ha_sample_sharedstorage_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_sharedstorage_mutual.xml is located in the sqllib/samples/ha/xml directory.

Features

The db2ha_sample_sharedstorage_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): two
  • failover policy: mutual
  • database partitions: one
  • virtual (service) IP addresses: one
  • shared mount points for failover: one

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 two computers: hasys01 and hasys02.   = -->
    <!-- = Each computer has one network interface card (NIC) called   = -->
    <!-- = eth0.                                                       = -->
    <!-- = The IP address of the NIC on hasys01 is 19.126.52.139       = -->
    <!-- = The IP address of the NIC on hasys02 is 19.126.52.140       = -->
    <!-- =============================================================== -->
    <PhysicalNetwork physicalNetworkName="db2_public_network_0" 
                     physicalNetworkProtocol="ip">

      <Interface interfaceName="eth0" clusterNodeName="hasys01">
        <IPAddress baseAddress="19.126.52.139" 
                   subnetMask="255.255.255.0" 
                   networkName="db2_public_network_0"/>
      </Interface>

      <Interface interfaceName="eth0" clusterNodeName="hasys02">
        <IPAddress baseAddress="19.126.52.140" 
                   subnetMask="255.255.255.0" 
                   networkName="db2_public_network_0"/>
      </Interface>

    </PhysicalNetwork>

    <!-- =============================================================== -->
    <!-- = List the computers (cluster nodes) in the cluster domain.   = -->
    <!-- =============================================================== -->
    <ClusterNode clusterNodeName="hasys01"/>
    <ClusterNode clusterNodeName="hasys02"/>

  </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 partition             = -->
  <!-- ================================================================= -->
  <DB2PartitionSet>

    <DB2Partition dbpartitionnum="0" instanceName="db2inst1">
       <VirtualIPAddress baseAddress="19.126.52.222" 
                         subnetMask="255.255.255.0" 
                         networkName="db2_public_network_0"/>
       <Mount filesystemPath="/home/db2inst1"/>
       <MutualPair systemPairNode1="hasys01" systemPairNode2="hasys02" />
    </DB2Partition>

  </DB2PartitionSet>

</DB2Cluster>