DB2 HADR TSA high availability test--DB2HAICU configures TSA to implement automatic failover_PHP tutorial

WBOY
Release: 2016-07-12 09:03:11
Original
1684 people have browsed it

DB2 HADR TSA high availability test--DB2HAICU configures TSA to achieve automatic failover

  • Network architecture

  • Must be configured on the standby node first
[root@db2-node02 ~]# su - db2inst2
[db2inst2@db2-node02 ~]$ db2 "get snapshot for database on GHAN"


HADR Status
Role = Standby
Status = Peer
Synchronization Mode = Synchronous
Connection Status = Connected, 2015-12-24 08:32:52.872408
Peer window ended = 2015-12-24 09:04:59.000000 (1450965899)
Peer window (seconds) = 120
Lost heartbeats = 0
Localhost = 10.0.0.2
Local service = DB2_HADR_GHAN2
Remote host = 10.0.0.1
Remote service = DB2_HADR_GHAN1
Remote instance = db2inst2
Timeout (seconds) = 120
Primary log location (file, page, LSN) ) = S0000014.LOG, 3, 000000000972B8DB
Alternate log location (file, page, LSN) = S0000014.LOG, 3, 000000000972B8DB
Log interval running average (in bytes) = 0


Database memory usage:


------------------------


[db2inst2@db2-node02 ~]$ db2haicu
Welcome to the DB2 High Availability Instance Configuration Utility (db2haicu).
Detailed diagnostic information can be found in the DB2 server diagnostic log file db2diag.log. You can also use the db2pd utility to query the status of the cluster domain you created.
For more information about using db2haicu to configure a clustered environment, see the "DB2 High Availability Instance Configuration Utility (db2haicu)" topic in the DB2 Information Center.
db2haicu has determined that the current DB2 database manager instance is db2inst2. The cluster configuration that follows will be applied to this instance.
db2haicu is gathering information about the current setup. This step may take some time to complete because db2haicu needs to activate all databases so that all paths are discovered by the instance...
When you use db2haicu to configure a clustered environment, a cluster domain is created. For more information, see the "Creating a cluster domain using db2haicu" topic in the DB2 Information Center. db2haicu is searching for an existing active cluster domain on the current machine...
db2haicu did not find a cluster domain on this machine. db2haicu will now query the system for information about the cluster nodes in order to create a new cluster domain...
db2haicu did not find the cluster domain on this machine. To continue configuring the cluster environment for high availability, the cluster domain must be created or db2haicu will exit.
Want to create a domain and continue? [1]
1. Yes
2. No
1
Create a unique name for the new domain:
db2ha
The node must now be added to the new domain.
How many cluster nodes will the domain db2ha contain?
2
Enter the hostname of the machine you want to add to the domain:
db2-node01
Enter the hostname of the machine you want to add to the domain:
db2-node02
Now, db2haicu A new domain can be created containing the 2 machines you specify. If you choose not to create the domain now, db2haicu will exit.

Want to create a domain now? [1]
1. Yes
2. No
1
Creating domain db2ha in cluster...
Successfully creating domain db2ha in cluster.
Quorum devices can now be configured for the domain. For more information, see the "Quorum Devices" topic in the DB2 Information Center. If you do not configure a quorum device for a domain, operators must intervene manually when some machines in the cluster lose connectivity.

Do you want to configure a quorum device for the domain called db2ha? [1]
1. Yes
2. No
1
The following is a list of supported quorum device types:
1. Network quorum
Enter the quorum device to be used Number corresponding to the type: [1]
1
Specify the network address of the quorum device:
108.88.3.254
Configuring the quorum device for domain db2ha...
Successfully configured quorum device for domain db2ha Quota equipment is configured.
The cluster manager found 4 network interface cards on each machine in the domain. You can use db2haicu to create networks for these network interface cards. For more information, see the "Creating a network using db2haicu" topic in the DB2 Information Center

Do you want to create a network for these network interface cards? [1]
1. Yes
2. No
1
Enter the name of the network for the network interface card eth0 on the cluster node db2-node01:
1. Create for this network interface card A new public network.
2. Create a new private network for this network interface card.
Enter your selection:
1
Are you sure you want to add network interface card eth0 on cluster node db2-node01 to network db2_public_network_0? [1]
1. Yes
2. No
1
Adding network interface card eth0 on cluster node db2-node01 to network db2_public_network_0...
Successfully adding cluster node Network interface card eth0 on db2-node01 is added to network db2_public_network_0.
Enter the name of the network for network interface card eth0 on cluster node db2-node02:
1. db2_public_network_0
2. Create a new public network for this network interface card.
3. Create a new private network for this network interface card.
Enter your selection:
1
Are you sure you want to add network interface card eth0 on cluster node db2-node02 to network db2_public_network_0? [1]
1. Yes
2. No
1
Adding network interface card eth0 on cluster node db2-node02 to network db2_public_network_0...
Successfully adding cluster node Network interface card eth0 on db2-node02 is added to network db2_public_network_0.
Enter the name of the network for network interface card eth1 on cluster node db2-node02:
1. db2_public_network_0
2. Create a new public network for this network interface card.
3. Create a new private network for this network interface card.
Enter your selection:
3
Are you sure you want to add network interface card eth1 on cluster node db2-node02 to network db2_private_network_0? [1]
1. Yes
2. No
1
Adding network interface card eth1 on cluster node db2-node02 to network db2_private_network_0...
Successfully adding cluster node Network interface card eth1 on db2-node02 is added to network db2_private_network_0.
Enter the name of the network for network interface card eth1 on cluster node db2-node01:
1. db2_private_network_0
2. db2_public_network_0
3. Create a new public network for this network interface card.
4. Create a new private network for this network interface card.
Enter your selection:
1
Are you sure you want to add network interface card eth1 on cluster node db2-node01 to network db2_private_network_0? [1]
1. Yes
2. No
1
Adding network interface card eth1 on cluster node db2-node01 to network db2_private_network_0...
Successfully adding cluster node Network interface card eth1 on db2-node01 is added to network db2_private_network_0.
Retrieving high availability configuration parameters for instance db2inst2...
The cluster manager name configuration parameter (high availability configuration parameter) is not set. For more information, see the "cluster_mgr - cluster manager name configuration parameter" topic in the DB2 Information Center. Do you want to set high availability configuration parameters?
The following are valid settings for the high availability configuration parameter:
1. TSA
2. Provider
Enter the value for the high availability configuration parameter: [1]
1
Placing the instance The high availability configuration parameter for db2inst2 is set to TSA.
Adding DB2 database partition 0 to the cluster...
Successfully adding DB2 database partition 0 to the cluster.
Want to GHAN validate and automate HADR failover of your HADR database? [1]
1. Yes
2. No
1
Adding HADR database GHAN to domain...
Cluster node 10.0.0.1 not found in domain. Please re-enter the hostname.
db2-node01
Cluster node 10.0.0.2 was not found in the domain. Please re-enter the hostname.
db2-node02
Adding HADR database GHAN to domain...
Having determined that HADR database GHAN can be highly available. However, this database cannot be added to the cluster in this node because db2haicu detects that this node is a standby node for the HADR database GHAN. Run db2haicu on the primary node of the HADR database

GHAN to configure the database for automatic failover.
All cluster configurations have been completed successfully. db2haicu is exiting...
[db2inst2@db2-node02 ~]$

  • Configure on the master node

[db2inst2@db2-node01 ~]$ db2haicu
Welcome to the DB2 High Availability Instance Configuration Utility (db2haicu).
Detailed diagnostic information can be found in the DB2 server diagnostic log file db2diag.log. You can also use the db2pd utility to query the status of the cluster domain you created.
For more information about using db2haicu to configure a clustered environment, see the "DB2 High Availability Instance Configuration Utility (db2haicu)" topic in the DB2 Information Center.
db2haicu has determined that the current DB2 database manager instance is db2inst2. The cluster configuration that follows will be applied to this instance.
db2haicu is gathering information about the current setup. This step may take some time to complete because db2haicu needs to activate all databases so that all paths are discovered by the instance...
When you use db2haicu to configure a clustered environment, a cluster domain is created. For more information, see the "Creating a cluster domain using db2haicu" topic in the DB2 Information Center. db2haicu is searching for existing active cluster domains on the current machine...
db2haicu found a cluster called db2ha on this machine. The cluster configuration that follows will apply to this domain.
Retrieving high availability configuration parameters for instance db2inst2...
The cluster manager name configuration parameter (high availability configuration parameter) is not set. For more information, see the "cluster_mgr - cluster manager name configuration parameter" topic in the DB2 Information Center. Do you want to set high availability configuration parameters?
The following are valid settings for the high availability configuration parameter:
1. TSA
2. Provider
Enter the value for the high availability configuration parameter: [1]
1
Setting the high availability configuration parameters for instance db2inst2 to TSA.
Adding DB2 database partition 0 to the cluster...
Successfully adding DB2 database partition 0 to the cluster.
Want to GHAN validate and automate HADR failover of your HADR database? [1]
1. Yes
2. No
1
Adding HADR database GHAN to domain...
Cluster node 10.0.0.2 not found in domain. Please re-enter the hostname.
db2-node02
Cluster node 10.0.0.1 was not found in the domain. Please re-enter the hostname.
db2-node01
Adding HADR database GHAN to domain...
Successfully added HADR database GHAN to domain.
Do you want to configure a virtual IP address for the HADR database GHAN? [1]
1. Yes
2. No
1
Enter the virtual IP address:
108.88.3.107
Enter the subnet mask of the virtual IP address 108.88.3.107: [ 255.255.255.0]
255.255.255.0
Select the network for the virtual IP address 108.88.3.107:
1. db2_private_network_0
2. db2_public_network_0
Enter your selection:
2
Adding virtual IP address 108.88.3.107 to the domain...
Successfully adding virtual IP address 108.88.3.107 to the domain.
All cluster configurations have been completed successfully. db2haicu is exiting...
[db2inst2@db2-node01 ~]$

  • View cluster status
[root@db2-node02 ~]# lssam
Online IBM.ResourceGroup:db2_db2inst2_db2-node01_0-rg Nominal=Online
'- Online IBM.Application:db2_db2inst2_db2-node01_0-rs
'- Online IBM.Application:db2_db2inst2_db2-node01_0-rs: db2-node01
Online IBM.ResourceGroup:db2_db2inst2_db2-node02_0-rg Nominal=Online
'- Online IBM.Application:db2_db2inst2_db2-node02_0-rs
'- Online IBM.Application:db2_db2inst2_db2-node02_0-rs: db2-node02
Online IBM.ResourceGroup:db2_db2inst2_db2inst2_GHAN-rg Nominal=Online
|- Online IBM.Application:db2_db2inst2_db2inst2_GHAN-rs
|- Online IBM.Application:db2_db2inst2_db2inst2_GHAN-rs:db2 -node01
'- Offline IBM .Application:db2_db2inst2_db2inst2_GHAN-rs:db2-node02
'- Online IBM.ServiceIP:db2ip_108_88_3_107-rs
|- Online IBM.ServiceIP:db2ip_108_88_3_107-rs:db2-node01
'- Offline IBM .ServiceIP: db2ip_108_88_3_107-rs:db2-node02
Online IBM.Equivalency:db2_db2inst2_db2-node01_0-rg_group-equ
'- Online IBM.PeerNode:db2-node01:db2-node01
Online IBM.Equivalency:db 2_db2inst2_db2-node02_0 -rg_group-equ
'- Online IBM.PeerNode:db2-node02:db2-node02
Online IBM.Equivalency:db2_db2inst2_db2inst2_GHAN-rg_group-equ
|- Online IBM.PeerNode:db2-node01:db2- node01
'- Online IBM.PeerNode:db2-node02:db2-node02
Online IBM.Equivalency:db2_private_network_0
|- Online IBM.NetworkInterface:eth1:db2-node02
'- Online IBM. NetworkInterface:eth1:db2-node01
Online IBM.Equivalency:db2_public_network_0
|- Online IBM.NetworkInterface:eth0:db2-node01
'- Online IBM.NetworkInterface:eth0:db2-node02
( lsrsrc-api) /usr/sbin/rsct/bin/lsrsrc-api: 2612-023 Resource not found.
lssam: Unexpected RMC error occurred. RMC return code is 1.
[root@db2-node02 ~]#



www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1084018.htmlTechArticleDB2 HADR TSA high availability test--DB2HAICU configures TSA to achieve automatic failover. The network architecture must be configured on the standby node first. [root@db2-node02 ~]# su - db2inst2 [db2inst2@db2-node02 ~]$...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!