The implementation of DB2 dual-host HA is very simple on Linux! (1)

Source: Internet
Author: User

The following article describes how to implement the full solution of DB2 dual-host HA on the Linux operating system, if you are interested in implementing the full DB2 dual-host HA solution on the Linux operating system, you can click the following article to view it.

1. Summary

This document describes how to install and configure a high-reliability solution for dual-host mutual backup on SuSE Linux EntERPrise Server v8.0 (SLES 8. This solution uses SLES's volume manager (LVM) and Veritas Cluster Server v2.2 (VCS 2.2) as HA implementation components.

2. Overview

This document assumes that the reader has understood the basic concepts of the dual-machine HA solution for dual-machine mutual backup of DB2.

2.1 Basic Steps for dual-host HA solution

The basic steps for establishing a dual-host mutual backup solution are as follows:

1. determine basic parameters (such as IP addresses and buckets. The parameters in this solution are all demonstration parameters, which must be replaced by the actual environment)

2. Configure shared storage (this solution does not involve the configuration of the shared storage solution)

3. Install the application on the two nodes respectively (DB2 UDB in this solution)

4. Use it as the initial configuration on a node (in this solution, create a DB2 database on the shared storage)

5. Introduce the configuration on the shared storage on another node (in this solution, the catalog operation is performed on the database on the shared storage)

6. Manually test the application on the two nodes.

7. Configure the HA Cluster management software (VCS in this solution)

8. test that the DB2 dual-host HA Cluster management software can successfully take over resources.

2.2. Hypothesis

This document assumes that, in the following example, SLES and VCS are correctly installed on the node, SLES's shared storage is correctly connected, and VCS's heartbeat connection is correctly configured.

2.2.1. Storage

Each node requires sufficient local disk space to install the executable code and instances of DB2 UDB.

This solution requires sufficient shared storage space to store database data.

Assume that the volume group assigned to the DB2 database on the shared storage is/dev/datavg1 and the logical volume name is/dev/datavg1/db2lv1 (using the LVM service of SLES ), the Mount name on the two nodes is/home/db2data and has been correctly formatted as a suitable File System (Veritas engineers pointed out that on SLES 8, VCS 2.2 does not support ext3 file systems, we recommend that you specify ext2 during formatting, which does not exist on SLES 9 and VCS 4.1 ). Note that this mount point must be configured in the fstab file as not automatically mounted at startup.

Other tablespaces in the database can be created on other volumes of shared storage. If it is a file system, it must also be configured as not automatically mounted. This document is not currently discussed.

2.2.2. Node

This HA solution uses two server nodes for master-slave backup, which are called Active nodes and Passive nodes respectively. The two nodes have the same hardware and operating system configurations.

2.2.3. Network

External IP network. In this solution, the Floating IP address used by DB2 UDB to provide external services is 192.168.10.110, the physical IP address of the Active node is 192.168.10.11, and the physical IP address of the Passive node is 192.168.10.12.

The DB2 dual-machine HA management software requires a set of internal IP addresses to manage the heartbeat connections between the two machines. The heartbeat IP address is not in the scope of this document.

3. configuration steps

3.1. DB2 UDB installation and configuration steps

3.1.1. Create users and groups

Run the following command under root on the two nodes:

 
 
  1. groupadd –g 900 db2iadm1  
  2. groupadd –g 901 db2fadm1  
  3. groupadd –g 902 dasadm1  
  4. useradd –g db2iadm1 –u 800 –d /home/db2inst1 –s /bin/bash db2inst1  
  5. useradd –g db2fadm1 –u 801 –d /home/db2fenc1 –s /bin/bash db2fenc1  
  6. useradd –g dasadm1 –u 802 –d /home/dasusr1 –s /bin/bash dasusr1 

The Group ID and user ID can be selected based on the actual situation, but ensure that the same user name/group name on the two nodes have the same ID.

3.1.2. Install the DB2 UDB product code


Related Article

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.