DB2 + HADR + TSA high availability test -- configure TSA in DB2HAICU for automatic failover

Source: Internet
Author: User

DB2 + HADR + TSA high availability test -- configure TSA in DB2HAICU for automatic failover

  • Network Architecture

  • Must be configured on the slave 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 = Synchronization
Connection status = connected, 08:32:52. 872408
Peer window ended = 09:04:59. 000000 (1450965899)
Peer window (seconds) = 120
Lost pulsating signal = 0
Local host = 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
Main log location (file, page, LSN) = S0000014.LOG, 3, 000000000972B8DB
Backup log location (file, page, LSN) = S0000014.LOG, 3, 000000000972B8DB
Average log interval running value (in bytes) = 0


Memory usage of the database:


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


[Db2inst2 @ db2-node02 ~] $ Db2haicu
Welcome to the DB2 High Availability instance Configuration Utility (db2haicu ).
You can find detailed diagnostic information 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 the cluster 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. Then the cluster configuration will be applied to this instance.
Db2haicu is collecting information about the current settings. It may take some time to complete this step because db2haicu needs to activate all databases so that the instance can discover all paths...
When you use db2haicu to configure the cluster environment, a cluster domain is created. For more information, see the topic "create cluster domain with db2haicu" in the DB2 Information Center. Db2haicu is searching for the existing active cluster domain on the current machine...
Db2haicu does not find the cluster domain on this machine. Db2haicu will now query the system to obtain information about the cluster nodes so as to create a new cluster domain...
Db2haicu does not find the cluster domain on this machine. To continue configuring the Cluster Environment for high availability, you must create a cluster domain. Otherwise, db2haicu will exit.
Do you want to create a domain and continue? [1]
1. Yes
2. No
1
Create a unique name for the new domain:
Db2ha
Now you must add the node to the new domain.
How many cluster nodes will the domain db2ha contain?
2
Enter the Host Name of the machine to be added to the domain:
Db2-node01
Enter the Host Name of the machine to be added to the domain:
Db2-node02
Now, db2haicu can create a new domain that contains your specified Machine 2. If you choose not to create a domain now, db2haicu will exit.

Do you want to create a domain now? [1]
1. Yes
2. No
1
Creating a domain db2ha in the cluster...
The domain db2ha is successfully created in the cluster.
Now, you can configure a quota device for the domain. For more information, see the "fixed device" topic in the DB2 Information Center. If you do not configure a quota device for the domain, the operator must perform manual intervention when some machines in the cluster are out of connection.

Do you want to configure a quota device for a domain called db2ha? [1]
1. Yes
2. No
1
The following is a list of supported quota device types:
1. Network quota
Enter the number corresponding to the specified device type to be used: [1]
1
Specify the network address of the specified device:
108.88.3.254
Configuring the quota device for the domain db2ha...
The quota device is successfully configured for the domain db2ha.
The cluster manager finds four network interface cards in each machine in the region. You can use db2haicu to create a network for these network interface cards. For more information, see the topic "create a network with db2haicu" 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 a new public network for this network interface card.
2. Create a new dedicated network for this network interface card.
Enter the following options:
1
Are you sure you want to add the network interface card eth0 on the cluster node db2-node01 to the 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...
The network interface card eth0 on the cluster node db2-node01 was successfully added to the network db2_public_network_0.
Enter the name of the network for the network interface card eth0 on the cluster node db2-node02:
1. db2_public_network_0
2. Create a public network for this network interface card.
3. Create a new dedicated network for this network interface card.
Enter the following options:
1
Are you sure you want to add the network interface card eth0 on the cluster node db2-node02 to the 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...
The network interface card eth0 on the cluster node db2-node02 was successfully added to the network db2_public_network_0.
Enter the name of the network for the network interface card eth1 on the cluster node db2-node02:
1. db2_public_network_0
2. Create a public network for this network interface card.
3. Create a new dedicated network for this network interface card.
Enter the following options:
3
Are you sure you want to add the network interface card eth1 on the cluster node db2-node02 to the network db2_private_network_0? [1]
1. Yes
2. No
1
Adding the network interface card eth1 on the cluster node db2-node02 to the network db2_private_network_0...
The network interface card eth1 on the cluster node db2-node02 was successfully added to the network db2_private_network_0.
Enter the name of the network for the network interface card eth1 on the cluster node db2-node01:
1. db2_private_network_0
2. db2_public_network_0
3. Create a public network for this network interface card.
4. Create a new dedicated network for this network interface card.
Enter the following options:
1
Are you sure you want to add the network interface card eth1 on the cluster node db2-node01 to the network db2_private_network_0? [1]
1. Yes
2. No
1
Adding the network interface card eth1 on the cluster node db2-node01 to the network db2_private_network_0...
The network interface card eth1 on the cluster node db2-node01 was successfully added to the network db2_private_network_0.
Retrieving high availability configuration parameters for instance db2inst2...
The Cluster Manager name configuration parameters (high availability configuration parameters) are not set ). For more information, see the "cluster_mgr-Cluster Manager name configuration parameters" topic in the DB2 Information Center. Do you want to set high availability configuration parameters?
The following are valid settings for high availability configuration parameters:
1. TSA
2. Suppliers
Value of the High Availability Configuration Parameter: [1]
1
Setting the High Availability Configuration Parameter of instance db2inst2 to TSA.
Adding partition 0 of DB2 database to cluster...
The DB2 database partition 0 is successfully added to the cluster.
Do I need to verify the HADR database GHAN and perform automatic HADR failover? [1]
1. Yes
2. No
1
Adding HADR database GHAN...
The cluster node 10.0.0.1 cannot be found in the domain. Enter the host name again.
Db2-node01
Cluster node 10.0.0.2 cannot be found in the domain. Enter the host name again.
Db2-node02
Adding HADR database GHAN...
It has been determined that the HADR database GHAN has high availability. However, the database cannot be added to the cluster on this node because db2haicu detects that this node is a slave node for the HADR database GHAN. In the HADR Database

Run db2haicu on the master node of 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 ).
You can find detailed diagnostic information 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 the cluster 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. Then the cluster configuration will be applied to this instance.
Db2haicu is collecting information about the current settings. It may take some time to complete this step because db2haicu needs to activate all databases so that the instance can discover all paths...
When you use db2haicu to configure the cluster environment, a cluster domain is created. For more information, see the topic "create cluster domain with db2haicu" in the DB2 Information Center. Db2haicu is searching for the existing active cluster domain on the current machine...
Db2haicu found a cluster called db2ha on this machine. The cluster configuration will be applied to this domain.
Retrieving high availability configuration parameters for instance db2inst2...
The Cluster Manager name configuration parameters (high availability configuration parameters) are not set ). For more information, see the "cluster_mgr-Cluster Manager name configuration parameters" topic in the DB2 Information Center. Do you want to set high availability configuration parameters?
The following are valid settings for high availability configuration parameters:
1. TSA
2. Suppliers
Value of the High Availability Configuration Parameter: [1]
1
Setting the High Availability Configuration Parameter of instance db2inst2 to TSA.
Adding partition 0 of DB2 database to cluster...
The DB2 database partition 0 is successfully added to the cluster.
Do I need to verify the HADR database GHAN and perform automatic HADR failover? [1]
1. Yes
2. No
1
Adding HADR database GHAN...
Cluster node 10.0.0.2 cannot be found in the domain. Enter the host name again.
Db2-node02
The cluster node 10.0.0.1 cannot be found in the domain. Enter the host name again.
Db2-node01
Adding HADR database GHAN...
The HADR database GHAN is successfully added to the 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 a network for the virtual IP address 108.88.3.107:
1. db2_private_network_0
2. db2_public_network_0
Enter the following options:
2
Adding the virtual IP address 108.88.3.107 to the domain...
The virtual IP address 108.88.3.107 is successfully added 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: db2_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 cannot find the resource.
Lssam: an unexpected RMC error occurs. The RMC return code is 1.
[Root @ db2-node02 ~] #



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.