forked from IBM/db2-samples
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdb2ha_sample_DPF_mutual.xml
200 lines (198 loc) · 11 KB
/
db2ha_sample_DPF_mutual.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<?xml version="1.0" encoding="UTF-8"?>
<!--
****************************************************************************
** Licensed Materials - Property of IBM
**
** Governed under the terms of the International
** License Agreement for Non-Warranted Sample Code.
**
** (C) COPYRIGHT International Business Machines Corp. 2007
** All Rights Reserved.
**
** US Government Users Restricted Rights - Use, duplication or
** disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*****************************************************************************
**
**
** SOURCE FILE NAME: db2ha_sample_DPF_mutual.xml
**
** SAMPLE: Initial Setup Configuration of DB2 HA shared storage failover
** automation using db2haicu
**
** FUNCTION: This sample showcases a sample XML configuration file for DB2 HA
** Setup.
**
** USAGE: db2haicu -f db2ha_sample_DPF_mutual.xml
**
** DESCRIPTION: The environment for this sample is described below:
**
** 1. The Setup consists of 4 physical machines (hasys01/2/3/4).
** 2. Each box has 2 NICs (named eth0 and eth1).
** 3. The NICs are grouped into two networks db2_public_network_0 and
** a private network called db2_private_network_0.
** 4. DB2 DPF instance has 2 partitions: 0 and 1.
** 5. 19.126.124.251 is the Service IP used for DB2.
**
** PREREQUISITES:
** 1. Hardware installed and configured (physical networks, shared-disk
** storage system
** 2. IP addresses reserved or assigned
** 3. OS is installed, patched and configured (including the shared-disk
** storage system)
** 4. Users, groups and authentication set-up on both machines
** 5. TSA v2.2 installed and configured on both nodes
** 6. Gathering the information on hardware specifications like IP, NIC,
** and shared storage
** 7. Root privilege is required while installing the DB2
**
*****************************************************************************
*****************************************************************************
**
** For detailed information about database backup and database recovery, see
** the Data Recovery and High Availability Guide and Reference. This manual
** will help you to determine which database and table space recovery methods
** are best suited to your business environment.
**
** For more information on the sample programs, see the README file.
**
** For information on developing C applications, see the Application
** Development Guide.
**
** For information on using SQL statements, see the SQL Reference.
**
** For information on DB2 APIs, see the Administrative API Reference.
**
** For the latest information on programming, building, and running DB2
** applications, visit the DB2 application development website:
** http://www.software.ibm.com/data/db2/udb/ad
****************************************************************************/
-->
<!-- ================================================================= -->
<!-- = DB2Cluster element = -->
<!-- = This element encapsulates the cluster configuration = -->
<!-- = specification for the instance = -->
<!-- ================================================================= -->
<DB2Cluster xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="db2ha.xsd" clusterManagerName="TSA" version="1.0">
<!-- ================================================================= -->
<!-- = ClusterDomain element = -->
<!-- = This element encapsulates the cluster configuration = -->
<!-- = specification = -->
<!-- = Creating cluster domain of name db2HAdomain = -->
<!-- = Creating an IP quorum device (IP 19.126.4.5) = -->
<!-- = The IP must be pingable at all times by each of the nodes in = -->
<!-- = the cluster domain = -->
<!-- ================================================================= -->
<ClusterDomain domainName="db2haDomain">
<Quorum quorumDeviceProtocol="network" quorumDeviceName="19.126.4.5"/>
<!-- ================================================================= -->
<!-- = Physical network element = -->
<!-- = The physical network specifies the network type, protocol = -->
<!-- = IP address, subnet mask, and NIC name = -->
<!-- = Create network of name db2_public_network_0 = -->
<!-- ================================================================= -->
<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>
<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>
<!-- ================================================================= -->
<!-- = ClusterNodeName element = -->
<!-- = The set of nodes in the cluster domain = -->
<!-- = Here the defined set of nodes in the domain is = -->
<!-- = hasys01, hasys02, hasys03, hasys04 = -->
<!-- ================================================================= -->
<ClusterNode clusterNodeName="hasys01"/>
<ClusterNode clusterNodeName="hasys02"/>
<ClusterNode clusterNodeName="hasys03"/>
<ClusterNode clusterNodeName="hasys04"/>
</ClusterDomain>
<!-- ================================================================= -->
<!-- = Failover policy element = -->
<!-- = The failover policy specifies the failover order of the = -->
<!-- = cluster nodes = -->
<!-- = In the current sample the failover policy is mutual take over = -->
<!-- ================================================================= -->
<FailoverPolicy>
<Mutual/>
</FailoverPolicy>
<!-- ================================================================= -->
<!-- = DB2 Partition element = -->
<!-- = The DB2 partition type specifies a DB2 Instance Name, = -->
<!-- = partition number, virtual IP address, Subnet mask, = -->
<!-- = mount resource and the = -->
<!-- = mutual failover nodes (hasys01, hasys02) = -->
<!-- ================================================================= -->
<DB2PartitionSet>
<DB2Partition dbpartitionnum="0" instanceName="db2inst1">
<!-- ================================================================= -->
<!-- = Service IP associated with the DB2 Partition = -->
<!-- = 19.126.124.251 = -->
<!-- ================================================================= -->
<VirtualIPAddress baseAddress="19.126.124.251" subnetMask="255.255.255.0" networkName="db2_public_network_0"/>
<!-- ================================================================= -->
<!-- = Mounts used by the DB2 Partition 0 = -->
<!-- ================================================================= -->
<Mount filesystemPath="/hafs/db2inst1/NODE0000"/>
<MutualPair systemPairNode1="hasys01" systemPairNode2="hasys02"/>
</DB2Partition>
<DB2Partition dbpartitionnum="1" instanceName="db2inst1">
<!-- ================================================================= -->
<!-- = Mounts used by the DB2 Partition 1 = -->
<!-- ================================================================= -->
<Mount filesystemPath="/hafs/db2inst1/NODE0001"/>
<MutualPair systemPairNode1="hasys02" systemPairNode2="hasys01"/>
</DB2Partition>
<DB2Partition dbpartitionnum="2" instanceName="db2inst1">
<!-- ================================================================= -->
<!-- = Mounts used by the DB2 Partition 2 = -->
<!-- ================================================================= -->
<Mount filesystemPath="/hafs/db2inst1/NODE0002"/>
<MutualPair systemPairNode1="hasys03" systemPairNode2="hasys04"/>
</DB2Partition>
<DB2Partition dbpartitionnum="3" instanceName="db2inst1">
<!-- ================================================================= -->
<!-- = Mounts used by the DB2 Partition 3 = -->
<!-- ================================================================= -->
<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>