Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build DB2 pureScale on virtual machine in Linux system

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to build DB2 pureScale on the virtual machine in the Linux system". In the daily operation, I believe that many people have doubts about how to build DB2 pureScale on the virtual machine in the Linux system. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubt of "how to build DB2 pureScale on the virtual machine in the Linux system". Next, please follow the editor to study!

Basic information of DB2 pureScale

DB2 pureScale is a new DB2 optional feature that allows you to extend your database to a set of servers through a "active-active" configuration to deliver high levels of availability and scalability. In this configuration, copies of DB2 running on each host (or server) can read and write the same data at the same time.

Each member of the data sharing group can use a very effective InfiniBand? The network interacts directly with the PowerHA pureScale components, as shown in the following figure. This means that a point-to-point (P2P) connection is established between members and centralized locking and caching devices.

PureScale reduces the risk and cost of business growth by providing unlimited capacity, continuous availability, and application transparency. DB2 pureScale delivers unparalleled levels of database scalability and availability on UNIX or x86 systems. All the test steps in this paper have been verified and tested under CenOS7.0.

DB2 pureScale has the following characteristics:

1) almost unlimited capacity

You can easily add machines to the cluster and scale your system out. DB2 pureScale Feature can be expanded to include 128members and has a centralized management tool that supports efficient scale-out capabilities. It uses a technology called Remote Direct Memory Access (RDMA) to provide an efficient communication mechanism between nodes to assist its expansion function.

2) Application transparency

You can use existing applications intact. Applications running in a DB2 pureScale environment do not need to know the different members of the cluster, nor do they need to pay attention to data partitions. DB2 pureScale Feature automatically routes the application to the most appropriate member.

DB2 pureScale Feature provides native support for a large number of syntax used by other database vendors, allowing these applications to run in a DB2 pureScale environment with minimal or no changes. In fact, in many cases, the benefits of DB2 pureScale Feature can be realized without modifying your application.

3) continuous availability

DB2 pureScale Feature provides an active-active architecture with internal redundancy. If a member fails, you can continue to process the remaining active members. During a failure, only data modified on the failed member is temporarily unavailable until the database recovery is completed for that group of data. This approach is in stark contrast to other competitive solutions, which may freeze the entire system during database recovery.

4) reduce the total cost of ownership

DB2 pureScale Feature reduces TCO because the interface handles the deployment and maintenance of integrated components, which reduces the steep learning curve associated with some competitive technologies.

I. prerequisites to be met in deployment

Each physical machine has the following characteristics:

It exists on a public network that supports client connections.

It has a 10 Gigabit Ethernet card for high-speed and low-latency communication between members and CF. 10 Gigabit Ethernet also supports RDMA over Ethernet.

It has a shared connection to a set of general purpose disks.

II. Preparation of purescale installation environment

1. 1. Ensure that SSH (no password) is set at the root level within all physical machines participating in the DB2 pureScale cluster. You can verify the SSH configuration by issuing the following command between the machines in the cluster to ensure that it returns a valid hostname without any prompts:

# ssh "target machine" hostname

The installer sets the instance-level SSH during instance setup.

two。 At least 10 GB of free space in the / tmp and / var file systems of each machine

3. Make sure that all filesets are installed as part of the OS installation of cpp, gcc, gcc-c++, kernel source, binutils, libstdc++ 32max 64-bit files.

4. Identify the disk to be used by DB2 pureScale Feature

5. Simulate virtual disk and build nfs server

# service iptables stop

# setenforce 0

# yum install nfs*

# yum install portmap rpcbind

# install nfs client to configure resources to be shared # vi / etc/exports

/ cbusdb * (rw,sync)

/ cbusdblog * (rw,sync)

Start nfs server

Service rpcbind start

Service nfs start

# Export Resources

Exportfs-rv

# display all shared volumes on NFS Server

Showmount-e

Mount the shared directory on the client

[root@cbusdb02 /] # mount 192.168.1.122:/cbusdb / cbusdb [root@cbusdb02 /] # mount 192.168.1.122:/cbusdblog / cbusdblog displays the following error if you use the command showmount-e 192.168.1.122:

Clnt_create: RPC: Port mapper failure-Unable to receive: errno 113 (No route to host) indicates that the firewall is open. Please close the firewall or open the corresponding port.

6. Modify the hostname # vi / etc/hosts

# vi / etc/sysconfig/network

NETWORKING=yes

HOSTNAME= Hostnam

# hostname hostname

7. Set up ssh trust

Ssh-keygen-t dsa

Copy the contents of the id_dsa.pub file of the three hosts into the authorized_keys file under the .ssh directory, and place the authorized_keys in the .ssh directory of the three hosts. 8. 8. Install db210.5# to check if the firewall is turned on

# sestatus-v if enabled, please edit the following file

# vi / etc/selinux/config

# set selinux=disabled

# install yum install compat-libstdc++

# start installing db2purescale

#. / db2_install

# Select the server version and select the purescale feature

III. Settings after installation is completed

1. Create a file system for data and logs, respectively:

# "DB2 Install Path" / bin/db2cluster-cfs-create-filesytem data-disk / dev/sde

# "DB2 Install Path" / bin/db2cluster-cfs-create-filesytem log-disk / dev/sdf

The DB2 installation path in this deployment will be / opt/ibm/db2/V9.8. By default, a data and log file system is created under / db2fs and is accessible on all hosts in the DB2 pureScale instance.

two。 Create an instance:

# / opt/ibm/db2/V10.1/instance/db2icrt-d-cf cbusdb21-cfnet cbusdb21-ib0-m cbusdb22-mnet cbusdb22-ib0-instance_shared_dev / dev/dm-3-tbdev / dev/dm-4-u db2sdfe1 db2sdin1

3. Add members and CF:

# opt/ibm/db2/V10.5/instance/db2iupdt-d-add-cf cbusdb22- cfnet cbusdb22-ib0 db2sdin1

# add member

# / opt/ibm/db2/V10.5/instance/db2iupdt-d-add-m cbusdb22- mnet cbusdb22-ib0 db2sdin1

# / opt/ibm/db2/V10.5/instance/db2iupdt-d-add-m cbusdb23- mnet cbusdb23-ib0 db2sdin1

4. Change the file system owner to the DB2 instance owner so that it has full access to the file system:

In this case, db2sdin1 is the name of the instance owner, and db2iadm1 is the group name of the instance owner.

# chown db2sdin1:db2iadm1 / db2fs/data

# chown db2sdin1:db2iadm1 / db2fs/log

5. Start the DB2 instance by issuing the db2start command

You can use the db2instance command to see the status of the DB2 pureScale instance at any point.

# db2start

10/03/2014 11:02:08 0 0 SQL1063N DB2STARTprocessing was successful.

10/03/2014 11:02:08 10 SQL1063N DB2STARTprocessing was successful.

SQL1063N DB2START processing was successful.

6. You can use the db2instance-list command to view the status of the DB2 pureScale cluster

7. To create a database and move the logs to the log file system, you must run the following command from the member host, not the CF host:

# db2 create db testdb on / db2fs/data

At this point, the study on "how to build DB2 pureScale on a virtual machine in a Linux system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report