DB2 PureScale Redbook
DB2 PureScale Redbook
DB2 PureScale Redbook
Vlad Barshai
Yvonne Chan
Hua Lu
Satpal Sohal
ibm.com/redbooks
International Technical Support Organization
September 2012
SG24-8018-00
Note: Before using this information and the product it supports, read the information in
“Notices” on page vii.
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
The team who wrote this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Now you can become a published author, too! . . . . . . . . . . . . . . . . . . . . . . . . . xi
Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Stay connected to IBM Redbooks publications . . . . . . . . . . . . . . . . . . . . . . . . xii
iv Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
3.4.4 Using the command line installation in an AIX environment . . . . . . 184
3.5 Post-installation tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
3.5.1 Validating the installation by creating the SAMPLE database . . . . 187
3.5.2 Creating shared file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
3.5.3 Changing the default database path . . . . . . . . . . . . . . . . . . . . . . . . 191
3.5.4 Changing the default log path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
3.5.5 Processor binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
3.5.6 Enabling SCSI-3 PR on a Linux environment . . . . . . . . . . . . . . . . . 195
Contents v
5.7 Upgrading a DB2 9.8 server to DB2 10.1 . . . . . . . . . . . . . . . . . . . . . . . . 276
5.7.1 Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
5.7.2 General procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
5.8 Post-upgrade steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
5.8.1 After upgrading the DB2 servers . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
5.8.2 After upgrading the DB2 clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
5.8.3 After upgrading a database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
vi Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult
your local IBM representative for information on the products and services currently available in your area.
Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product, program, or service that
does not infringe any IBM intellectual property right may be used instead. However, it is the user's
responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this document.
The furnishing of this document does not give you any license to these patents. You can send license
inquiries, in writing, to:
IBM Director of Licensing, IBM Corporation, North Castle Drive, Armonk, NY 10504-1785 U.S.A.
The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION
PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer
of express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made
to the information herein; these changes will be incorporated in new editions of the publication. IBM may
make improvements and/or changes in the product(s) and/or the program(s) described in this publication at
any time without notice.
Any references in this information to non-IBM websites are provided for convenience only and do not in any
manner serve as an endorsement of those websites. The materials at those websites are not part of the
materials for this IBM product and use of those websites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.
Information concerning non-IBM products was obtained from the suppliers of those products, their published
announcements or other publicly available sources. IBM has not tested those products and cannot confirm
the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on
the capabilities of non-IBM products should be addressed to the suppliers of those products.
This information contains examples of data and reports used in daily business operations. To illustrate them
as completely as possible, the examples include the names of individuals, companies, brands, and products.
All of these names are fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrate programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs in
any form without payment to IBM, for the purposes of developing, using, marketing or distributing application
programs conforming to the application programming interface for the operating platform for which the
sample programs are written. These examples have not been thoroughly tested under all conditions. IBM,
therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.
The following terms are trademarks of the International Business Machines Corporation in the United States,
other countries, or both:
Itanium, Intel logo, Intel Inside logo, and Intel Centrino logo are trademarks or registered trademarks of Intel
Corporation or its subsidiaries in the United States and other countries.
Linux is a trademark of Linus Torvalds in the United States, other countries, or both.
Windows, and the Windows logo are trademarks of Microsoft Corporation in the United States, other
countries, or both.
NetApp, and the NetApp logo are trademarks or registered trademarks of NetApp, Inc. in the U.S. and other
countries.
Java, and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its
affiliates.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Red Hat, Red Hat Enterprise Linux, RHEL, Red Hat Network and RHN are trademarks of Red Hat, lnc.,
registered in the United States and other countries.
SUSE is a registered trademark of Novell, Inc. in the United States and other countries.
Other company, product, or service names may be trademarks or service marks of others.
viii Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Preface
The IBM® DB2® pureScale® feature offers clustering technology that helps
deliver high availability and exceptional scalability transparent to applications.
The DB2 pureScale feature helps you to meet your business needs around
availability and scalability, and is also easy to configure and administer.
This IBM Redbooks® publication addresses the DB2 pureScale feature that is
available in IBM DB2 10.1 for Linux, UNIX, and Windows operating systems. It
can help you build skills and deploy the DB2 pureScale feature. This book
bundles all the information necessary for a in-depth analysis into the functions of
the DB2 pureScale feature, including the actual hardware requirements. It
includes validated step-by-step hardware and software installation instructions.
In addition, this book provides detailed examples about how to work effectively
with a DB2 pureScale cluster and how to plan and run an upgrade for all DB2
related components to DB2 10.1.
This book is intended for database administrators (DBAs) who use IBM DB2 10.1
for Linux, UNIX, and Windows operating systems who want to explore and get
started with the DB2 pureScale feature.
Vlad Barshai has worked with DB2 for Linux, UNIX, and Windows for the past
four years. Vlad has extensive experience working with Linux and KIWI,
particularly in developing software to automate installations and configurations
for creating meaningful virtual appliances. His expertise in DB2, the DB2
pureScale feature, and knowledge of hardware components (IBM System x®,
IBM POWER®, storage subsystems, and networking switches) has allowed him
to assist, teach, and set up various DB2 environments and cluster for customers
and POCs.
Satpal Sohal is a DB2 Solutions Migration Specialist working at the IBM Toronto
Lab. In addition to developing and managing critical software infrastructure for
the team, he helped create a DB2 pureScale feature Workshop, which provides
IBM clients and IBM Business Partners a course on the DB2 pureScale feature.
Satpal is a certified DB2 database administrator and has delivered many DB2
training courses to audiences worldwide.
Pandu Mutyala
DB2 System Verification, IBM Information Management
Steve Rees
Senior Manager, DB2 Performance QA, IBM Information Management
Antonio Maranhao
Manager, Technology Assets, IBM Information Management
Jason Chan
Manager, Appliances and Platforms Ecosystems, IBM Information
Management
Tom Chong
Automation and Integration Lead, Appliances and Platforms Ecosystem,
IBM Information Management
Piotr Pruski
Technical Enablement Specialist, Appliances and Platforms Ecosystem,
IBM Information Management
x Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Melody Ng
Senior Manager, Information Management Ecosystem Partnerships, IBM
Information Management
Cathy Guo
Graphic Designer, Information Management Partnership Technologies, IBM
Information Management
Andre Albuquerque
DB2 Specialist, Technology Assets, IBM Information Management
Find out more about the residency program, browse the residency index, and
apply online at:
ibm.com/redbooks/residencies.html
Comments welcome
Your comments are important to us!
Preface xi
Mail your comments to:
IBM Corporation, International Technical Support Organization
Dept. HYTD Mail Station P099
2455 South Road
Poughkeepsie, NY 12601-5400
xii Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
1
You can use the IBM DB2 pureScale feature to scale a database (DB) for a set of
servers in an active-active approach. Traffic intended for a failed node is either
passed on to an existing node or load balanced for the remaining nodes. This
technology is similar to the proven data-sharing architecture found in DB2 for
IBM z/OS®. This feature provides the benefits of transparency, continuous
availability, and scalability at a lower operational cost.
The DB2 pureScale system runs on up to 128 multiple hosts that are accessing
shared data simultaneously, without needing to explicitly modify the application.
You can use this transparency to perform maintenance operations on hosts, add
additional hosts, or remove unnecessary hosts, without impacting an application.
With this method, you can control the number of active hosts to handle the
workload and to ensure that you remain at the wanted transaction rate.
2 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Figure 1-1 depicts the main components of a DB2 pureScale cluster.
Clients
Cluster Interconnect
Primary Secondary
CF CF
Database
Important: These names are referenced throughout the book and are critical
to the overall understanding of the DB2 pureScale feature. Take a moment to
ensure that you are familiar with each of them.
Figure 1-1 on page 3 illustrates that the application is not apparent to the overall
DB2 pureScale cluster because it requires a single connection to the cluster to
run requests. It also illustrates that each physical machine has the
following characteristics:
It exists on a public network that allows for client connectivity.
It has a 10 GbE or InfiniBand card that allows for high speed, low latency
communication between members and CFs. This communication is achieved
using Remote Direct memory access, referenced as uDAPL on InfiniBand
networks, and RDMA over Converged Ethernet on 10
Gigabit Ethernet.
It has shared connectivity to a common set of disks.
The remainder of this section touches on the various advantages of the DB2
pureScale feature, including transparency, availability, and scalability.
4 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
1.1.1 Application transparency
The word transparency for the DB2 pureScale feature is key. Ideally, you expect
that any increase in workload or failures in a database cluster do not impact the
operation of an application. Thus, from the application standpoint, your only
concern is to retrieve user requests and respond back with appropriate
information. Any additional layers that are required to make the application more
cluster aware complicates the application, might result in a workload change,
and can cost additional development time in testing, deployment, verification,
and certification.
The DB2 pureScale feature provides the following advantages without changing
an application:
Scale as you grow: Ability to buy only enough to satisfy current capacity
needs and add additional DB2 members to scale as your workload grows.
Maintain availability: Maximize hardware utilization rates and keep response
times consistent because incoming requests are automatically load balanced,
that is, spread the workload among the multiple processing servers.
Add or remove resources easily: Add resources during peak hour or seasonal
times to avoid slow response times, or when there is required downtime.
Unplanned events
Hardware failures can be highly disruptive, even in systems with redundant
components. By design, the DB2 pureScale feature contains functions, such as
heartbeats, fencing mechanisms, automatic restarts, and role shifting, to keep an
instance running and to minimize the effects of failures on the remainder of the
database system in such scenarios.
DB2 client
DB2 client
DB2 client
DB2 client
Legend
Shared disk
Corporate Network
High Speed Interconnect
6 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
With the DB2 pureScale feature, availability characteristics are integrated directly
into the architecture. All necessary resources are monitored automatically by
DB2 pureScale cluster services. These resources are restarted and recovered as
needed. Member failures are not detected by the client applications because the
clients are rerouted automatically to the remaining active members. However,
one of the distinguishing factors that makes the DB2 pureScale feature
competitive is that there is no cluster-wide freeze that occurs when a member
fails. In fact, data continues to be processed, and all members are updated to
inform other members that this member is no longer available until recovery is
complete. Applications on active members that are trying to access locked data
on failing member are briefly in lock-wait state, but do not automatically
receive errors.
In all cases of failure, after a host is available in the network, the DB2 pureScale
feature automates the recovery and attempts to bring the restarted host back into
the cluster without intervention. The DB2 pureScale feature restarts the DB2
member that should be running there.
Planned events
There are several circumstances where you might want to take down a system
temporarily, such as with system maintenance or hardware upgrades. The DB2
pureScale feature is designed to perform these types of maintenance tasks with
as little impact to the entire DB2 pureScale cluster as possible.
You can use DB2 to place a member into a quiesce state, which allows the
connections to drain as transactions (and connections). When in a quiesce state,
subsequent transactions and connections are redirected to other available
members, and the current member eventually stops processing transactions.
The client applications do not even notice that a member was taken offline (also
known as stealth maintenance).
Because the client applications are now connected to other members, you can
take the member offline and perform maintenance, causing as little disruption as
possible to the client applications. You can use this method to roll out system
upgrades without stopping the DB2 pureScale instance or affecting database
availability. After the maintenance is complete, you can reintegrate the member
into the DB2 pureScale instance.
Figure 1-3 illustrates the behavior of this scalability when you add additional
members to the cluster. The cluster can process more workload as soon as new
members join the cluster operations. Overall throughput almost doubles as the
number of members doubles.
128 Members
84% scalability
112 Members
89% scalability
88 Members
90% scalability
2, 4 and 8
Members over 64 Members
95% scalability 95% scalability
32 Members
over 95%
scalability
16 Members
over 95%
scalability
8 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
1.2 The DB2 pureScale feature technical components
To understand how the DB2 pureScale feature environment works, you must
understand the various components that make up a DB2 pureScale instance and
how they work together. This section covers some of the DB2 cluster services
and processes that make up the DB2 pureScale feature architecture and that
allow for automatic recovery after a member failure.
By understanding the process of how these services interact with one another to
provide automatic recovery, it is possible to get a general overview about how
DB2 reacts upon a member failure and how the services are involved. This
process can play a significant role in diagnosing a problem or any general issues
after a member fails and is now trying to recover back into the cluster.
10 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
DB2 handles access to applications that are developed using the IBM data
server client, which includes embedded SQL or calls to the command-line
interface (CLI), Open Database Connectivity (ODBC) applications, Java
applications using the Java Database Connectivity (JDBC) or SQLJ interfaces,
PHP applications, Ruby or Ruby on Rails applications, Perl applications, and
Python applications.
As part of the configuration for client affinities, you must specify a list of
alternative servers and the order in which connections to the alternative servers
are tried. When client affinities are in use, connections are established based on
the list of alternative servers instead of the host name and port number that are
specified by the application. For example, if an application specifies that a
connection is made to server1 but the configuration process specifies that
servers are tried in a specific order (server2, server3, and then server1), the
initial connection is always made to server2 instead of server1.
Failover with client affinities is seamless if the following conditions are true:
The failure is either of the connection to the server or of the first SQL
statement of a connection.
There are no global temporary tables in use on the server.
There are no open held cursors.
When using client affinities, you can specify that if the primary server returns to
operation after an outage, connections return from an alternative server to the
primary server on a transaction boundary.
12 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
For an extensive list of all available DB2 editions and their respective features,
visit the DB2 10 Information Center at:
http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2
.luw.licensing.doc/doc/r0053238.html
After describing the DB2 editions, this section also describes the feature
differences and covers the differences between DB2 9.8 and the latest release of
DB2 10.1.
Resource note: This book covers only the two DB2 versions that offer the DB2
pureScale feature. For all previous versions of DB2, visit the
Information Center.
This section introduces both DB2 9.8 and DB2 10.1 and explains some of their
key differences. For more information about how to upgrade to DB2 10.1, see
Chapter 5, “Upgrading to DB2 10.1” on page 251.
DB2 9.8
This version of DB2 was generally available (GA) in December 2009 and is a
database cluster solution for non-mainframe platforms that is suitable for online
transaction processing (OLTP) workloads. This release is similar in functionality
to DB2 9.7, with the added capabilities of the DB2 pureScale feature to provide a
more fault-tolerant architecture.
DB2 10.1
This version of DB2 was generally available (GA) in April 2012 and merges the
two code streams of DB2 9.7 and DB2 9.8 into a single product stream. The DB2
10.1 pureScale feature provides the same architecture as DB2 9.8, with
additional features, enhancements, and support.
14 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
– Increase in storage savings and system availability
– Reduces costs through decreased storage requirements
DB2 10.1 has data security enhancements.
DB2 10.1 includes critical enhancements to security by introducing row and
column access control (RCAC), which is sometimes referred to as
fine-grained access control. RCAC helps further secure data by allowing you
to create varying security rules at the data level. These security rules ensure
that users who are members of the approved roles or groups see only the
data that they are allowed to see. Security rules also remove security
constraints and performance headaches that result from complex views and
predicates. These enhancements provide a centralized and auditable process
that controls data at a lower cost and with reduced time to value for business
process and applications.
DB2 10.1 provides multi-temperature data management.
Data is assigned a priority (hot, warm, or cold) and moved to different classes
of storage. For example, you can store transaction records for the current
quarter, which are accessed more frequently, in a high-performance storage
location. After the quarter is finished, you can then move these records to
cheaper storage (warm or cold) because they do not need to be accessed as
frequently. Providing multi-temperature data management can reduce the
total cost of ownership (TCO) and provide for efficient use of
storage hardware.
DB2 10.1 has new performance enhancements.
Performance enhancement focus on reducing the processing time without
causing significant administration or application changes. Upgrading to DB2
10.1 provides the following improvements:
– Improvements in the RUNSTATS command
– Improved query optimizer techniques
– Star schema query optimization
– Improved performance for queries on tables with composite indexes
– Improved multi-core parallelism
– Data and index prefetching
– Improved use of statistical views
DB2 10.1 includes SQL compatibility improvements.
When working with a relational database product other than DB2 products,
there are additional interfaces and compatibility features that can help make
DB2 products more familiar to you. These improvements can reduce the
amount of time that it takes to enable applications written for other relational
database products to run quickly in a DB2 environment.
16 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
DB2 Workgroup Server Edition uses up to 16 cores and 64 GB of memory with
the ability to be deployed on both Linux and UNIX server environments. Under
authorized user licensing, you must acquire a separate user license for each
authorized user of this product, with a minimum purchase of five users
per installation.
18 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Features and Description DB2 DB2 DB2
functions Workgroup Enterprise Advanced
Edition Server Enterprise
Edition Server
Edition
For this book, the table does not include information about IBM Database
Enterprise Developer Edition. For information about IBM Database Enterprise
Developer Edition, go to the Information Center at:
http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/index.jsp?topic=%
2Fcom.ibm.db2.luw.licensing.doc%2Fdoc%2Fr0053238.html
20 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Online reorganization: Over time, data in your tables can become
fragmented, which increases the size of tables and index. Reorganization of
tables and indexes compacts your data, reclaiming wasted space and
improving data access.
Oracle compatibility: Adds support to Oracle SQL dialect, the PL/SQL
language, and other semantic capabilities to quickly enable applications
initially developed for Oracle to DB2.
pureXML: You can use the pureXML feature to store well-formed XML
documents in database table columns that have the XML data type. By
storing XML data in XML columns, the data is kept in its native hierarchical
form, rather than stored as text or mapped to a different data model.
Replication tools: The replication tools consist of the ASNCLP command-line
program, the Replication Center, and the Replication Alert Monitor tool.
Spatial Extender: Support and use of DB2 Spatial Extender involves two main
activities: setting up DB2 Spatial Extender and working on projects that use
spatial data.
SQL Replication: A type of replication that uses staging tables.
(New in DB2 10.1) Row and column access control (RCAC): RCAC is an
additional layer of data security for row and column access control. RCAC
controls access to a table at the row level, column level, or both, and can be
used to complement the table privileges model.
(New in DB2 10.1) Time travel query: There are many business needs
requiring the storage and maintenance of time-based data. Without this
capability in a database, it is expensive and complex to maintain a
time-focused data support infrastructure. With temporal tables, the database
can store and retrieve time-based data without additional application logic.
If you are using DB2 9.8, Chapter 5, “Upgrading to DB2 10.1” on page 251
describes the steps to upgrade to DB2 10.1.
If you are assessing the editions of DB2, refer to the information provided in this
chapter and determine the features that can best help you achieve the results
that you need.
Our goal is to prompt you in to thinking about how your configuration fits your
business needs, and how it can relate to some of the examples provided. Having
a good understanding of the technology ensures that your workload works well
with the various configuration options that you decide to use.
Whether you are currently using another database server or a different version of
DB2, it is important to understand and plan the transition to the DB2 pureScale
feature. Although you can modify decisions along the way, some decisions are
far too costly to make as you move further into the project. Also, understanding
the fundamental hardware requirements for the cluster, understanding what your
business needs are, and matching those business needs to the overall solution,
can help finalize decisions that provide the basis for your solution. The DB2
pureScale feature provides flexibility in the amount of redundancy that is required
and different failure recovery times to accommodate different budgets and
business needs.
Before continuing, here is a review of the basic concepts that were covered in
Chapter 1, “An overview of the DB2 pureScale feature” on page 1:
The DB2 members are those members that are responsible for handling the
overall database workloads.
The DB2 cluster caching facilities (CFs) are responsible for lock
management and global caching.
The shared storage lets you access data from various servers simultaneously.
24 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Figure 2-1 shows a sample DB2 pureScale feature configuration composed of
three DB2 members and two CFs.
Clients
Cluster Interconnect
Primary Secondary
CF CF
Database
It is important to read through all the requirements before putting a plan together
to cover any preliminary prerequisites to ensure the optimal deployment of the
DB2 pureScale feature.
Supported servers
Support for servers and operating systems (OS) is linked. For example, servers
that run on Linux operating systems are IBM System x servers, whereas IBM
AIX® systems are all POWER based servers. Thus, in some organizations,
which server you use is determined by your operating system (AIX or Linux).
After deciding upon the architecture of the server, there are a limited number of
choices available that have been thoroughly tested with the DB2 pureScale
feature. For System x, four possible models are available. POWER systems offer
almost the entire lineup of machines. Each model of server has different
processor and memory capacities, along with differences in the number of
interconnect adapters that can be used.
Table 2-1 provides information about the supported machine hardware types.
Table 2-1 Supported machine hardware types for the DB2 pureScale feature
System type System Operating Website to find more information
model system
26 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
System type System Operating Website to find more information
model system
To ensure that you achieve shorter recovery times, have faster I/O fencing
capabilities and use storage units with SCSI3-PR support. In this case, it is
important to ensure that all required drivers are installed on the OS so that the
communication between the storage unit works as expected.
Table 2-2 Storage device and multipath I/O driver combinations to achieve the highest recovery times
Storage devices Multipath I/O (MPIO) drivers Multipath I/O Protocol
for AIX systems drivers for Linux
systems
IBM System Storage® Subsystem Device Driver Path DM-MP Fibre Channel
DS8000® series Control Module (SDDPCM) (FC)
28 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Storage devices Multipath I/O (MPIO) drivers Multipath I/O Protocol
for AIX systems drivers for Linux
systems
EMC VMAX or Symmetrix MPIO driver provided by EMC DM-MP Fibre Channel
family (driver file
EMC.symmetrix.fcp.MPIO.rte)
Table 2-3 Storage device and multipath I/O driver combinations in the DB2 pureScale feature
Storage devices Multipath I/O drivers for AIX Multipath I/O Protocol
systems drivers for Linux
systems
Supported networks
With the DB2 pureScale feature, a minimum of two networks are required:
The first network is the regular Ethernet network that you might see on any
DB2 instance. This network is the network that clients tend to use to access
the database server.
The second network is the fast interconnect network that is used for
communications between the members and the cluster CFs. This
interconnect network must be a high speed, low latency network to allow for
quick transfer of data between members and the CF.
Table 2-4 List of supported network cards for the DB2 pureScale feature
Network part InfiniBand network 10 GbE network
30 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Network part InfiniBand network 10 GbE network
Because a DB2 pureScale cluster requires more memory and processors for
more intensive workloads, the need for more adapters at the cluster CF
increases. As of DB2 9.8 FP4, support for multiple cluster interconnect adapters
on the CFs is added. This addition improves the redundancy in the system and
allows for fast interconnect adapters or ports to fail without affecting the DB2
pureScale feature. In addition, this addition allows for increased bandwidth at the
cluster CF, so that more data is passed between members and cluster CFs.
In addition to the adapters and switches, you need cables to connect the
components together. The cables that are required come in various lengths to
suit the needs of your data center. Table 2-5 describes the IBM part numbers
(and associated feature codes) for the cables.
Tip: This description makes an assumption that you have two cluster CFs. In
some instances, you can have one CF. However, for any production-ready
cluster, two CFs are recommended to ensure fault tolerance.
In some cases, the number of cores needed to run an application influences the
topology as well. The first step to determining the topology and number of cores
that you need for the DB2 pureScale feature is to determine how many cores you
need in a non DB2 pureScale instance. Treat the workload as though it is running
on a “normal” single host DB2 instance and use the tools that you are familiar
with to determine this first core count.
Then, after you have that initial core count, you can start to look at whether you
need multiple systems or if you need to increase from two to more members.
Other factors can increase the number of members, including whether workload
affinities are used or if there needs to be dedicated batch processing members in
addition to the regular transactional processing.
When you know how many initial cores there are and how many members are
needed, you can apply some general rules of thumb to determine the initial base
core counts per member and how many cores you need for the cluster CF.
32 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Number of members
When there are more members in the cluster, you need fewer cores per
members because this workload is spread across the members. However,
you might need to increase the cores on the CF to handle the extra memory
requirements and page transfers.
Failure tolerances
As described previously, there are several reasons why a member might fail.
Adding more members into the cluster can improve failure tolerances, but you
also need to ensure that there is enough capacity on the remaining members
to continue processing transactions in a timely manner. You also need to
consider how many member failures you are willing to tolerate.
For example, if you have four members in the DB2 pureScale cluster, it is
assumed that you can tolerate one member failing. But what happens if two
members fail? This situation is particularly important if you are on an AIX
system and have partitioned physical machines in to LPARs that are used by
the DB2 pureScale instance. The possibility that you need to shut down one
physical machine results in all the LPARs on that system being shut down.
Then, the question becomes, if you had to shut down that system, are you
vulnerable to more failures? You might need to increase the number of cores
per member if you must tolerate more members failing. Do not reduce the
number of cores per member because you think nothing will fail.
You have determined the total number of cores needed for the DB2 pureScale
cluster. These numbers are a rough estimate and do not take the specifics of
your case in to account. So, you need to test and verify the number.
You can divide the total number of cores between members and cluster CFs in a
ratio that is dependent on the workload’s read/write ratio. The more reads there
are in the workload, the less CF cores that are required. For a workload that is
95% read, you need only one CF core for every 10 member cores. When the
workload is more write driven and less read driven, for example only 70% reads,
the number of cores that one CF core can deal with is six member cores:
Write heavy application: For every six member cores, you need one core
per CF.
Read heavy application: For every 10 member cores, you need one core
per CF.
For example, if your application is a write heavy application and you calculated a
total core count of 24 cores for the DB2 pureScale feature, you need a minimum
of one CF core for every six cores that a member has. Allocate 18 cores for the
DB2 members, and the remaining cores are used as three on the primary CF
and three on the secondary CF. Thus, the total core count is still 24 (18 + 3 + 3).
If you look at the same example with three members, you need six cores per
member. However, if you want to be able to survive two member failures, six
cores might not be enough to handle the workload. Most customers look only at a
single member failure, and the 12 remaining cores are more than sufficient to
handle the full workload in that case.
In cases where there might be workload affinity or batch processing, where there
is perhaps a need to consider more than a single member failure, consider using
shared processor pools on AIX systems to manage the failure cases. In these
setups, you can have LPARs defined to have a base entitlement and a maximum
that covers the number of cores that are needed if multiple members fail. Those
cores can then have a higher priority to provide the processing power when
needed. Otherwise, the cores are used for other purposes on the same physical
system. On Linux systems, this affinity can be achieved using processor binding
methods so that DB2 runs only on a specific number of processors.
Memory considerations
When considering the amount of memory that is needed, the goal is to have as
much memory as needed to prevent swapping at the operating system level.
DB2 grabs available memory on the system and leaves only a small fraction free
on the system. DB2 uses a large chunk of the memory for the buffer pool.
In the DB2 pureScale feature, the member’s buffer pool is now referred to as the
local buffer pool (LBP). There is also a group buffer pool (GBP) at the cluster CF
that is used to hold dirty pages. This two-tier buffer pool system is the bulk of the
memory that is required for the DB2 pureScale feature.
34 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
In most cases, DB2 memory settings are set to AUTOMATIC. So, DB2 uses as
much memory as possible on the system and still prevents swapping from
occurring. Alternatively, the cluster CF must have a certain percentage of
memory based on the amount of memory that all members have. In general, for a
workload that is 70% reads, at least 35% - 40% of the LBP size also exists in the
GBP of the CF per database. In cases where the write percentage is small for the
workload, you still need a minimum of 25% of all LBPs per database. In all cases
where there are two members, consider using 40% - 50% for the GBP, because
more memory is required when any component in the DB2 pureScale
cluster fails.
Storage considerations
Disk space is required for storing data, logs, and the DB2 installation
components. This section provides information about the minimum storage
requirements locally on the host and the shared storage requirements.
Each host requires the following amount of minimum storage before installing the
DB2 pureScale feature:
3 GB to extract the installation
3.5 GB for the installation path
5 GB for the /tmp directory
1 GB for the instance home directory
5 GB for the /var directory
Table 2-6 Disk descriptions and minimum requirements for the DB2 pureScale feature
Disk name Description Minimum
recommended
space
Shared Log This disk is used to store all the logs, and its size Depends on
depends on the expected number of application needs
transactions and the applications logging
requirement.
Here are some tips to ensure the best I/O throughput and quickest
recovery times:
It is possible to have the shared disk (SQLLIB) and the data on the same file
system. This setup, however, is not preferred because it can lead to
I/O contention.
Support for SCSI-3 PR is a preferred practiced because it provides faster I/O
fencing capabilities that can result in shorter recovery times.
You must consider redundant array of independent disks (RAIDs) when taking
your storage system into account. RAID is what is used to define the overall way
data is written in to the disks. Selecting the RAID configuration can depend on
the performance that you are looking to achieve, because some RAIDs are
meant for faster performance than others.
Shared Logs RAID 1+0 RAID 1+0 requires a minimum of four disks, but
provides both redundancy and speed because a
mirror of logs is available for access.
Tiebreaker RAID 0 This level is the quorum disk and does not require
redundancy. Thus, you can use RAID 0.
36 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Disk name RAID Level Reason
Host Disk RAID 1 Adding up the totals shows that the operating
system with the base DB2 installation needs no
more than 120 GB of space. Therefore, you can
mirror two disks to produce redundancy and, at the
same time, save on space.
Altering the RAID level: Altering the RAID level after installing the DB2
pureScale feature can result in complications. Take time to understand the
RAID level that is most suitable for your application and purposes. For most
general environments, following the guidelines listed in Table 2-7 can help
ensure that you set up the storage correctly and achieve optimal results.
This section provides information about the supported operating systems and
considerations about those systems.
Linux Red Hat Enterprise Linux 5.5 + Red Hat Enterprise Linux 5.5
Red Hat OS was removed in DB2 V10.1.
Linux Red Hat Enterprise Linux 6.1+ Support available from DB2
Red Hat OS V10.1.
Before you upgrade: You need to verify that DB2 supports the latest SP
release before you start the upgrade.
38 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Ensure that OpenSSH is installed and configured properly between all of the
hosts to allow access without a password between the hosts using both the
long and short host names of the system.
Ensure that the shared storage is accessible by all of the hosts in the cluster.
All hosts need to see the same physical volume identifier (PVID) for the same
device on AIX systems.
Confirm that Ethernet and all additional communication ports are properly
configured and connected to their respective switches. You can use the
ifconfig command to check for ethX and ibX network configurations on Linux
systems or enX and ibX network devices on AIX systems.
Ensure that different packages that are required and kernel versions that are
required are installed as per Table 2-9 or consult the DB2 Information Center
for the latest information.
Red Hat Enterprise Linux libstdc++ (both 32-bit and 64-bit libraries) Kernel version level:
5.6 glibc++ (both 32-bit and 64-bit libraries) 2.6.18-194.26.1.el5.
cpp
gcc Red Hat Enterprise Linux is
gcc-c++ supported in DB2 pureScale
kernel-headers environments with an
kernel-devel InfiniBand cluster
binutilsOpenSSH interconnect.
sg3_utils
ntp-4.2.2p1-15.el5
Red Hat Enterprise Linux dapl (64-bit libraries only) Supported since DB2 10.1.
6.1 ibsim (64-bit libraries only)
ibutils (64-bit libraries only)
libibverbs-rocee (10 GbE)
libibverbs (InfiniBand network)
librdmacm
libcxgb3
libibmad
libibumad
libipathverbs (64-bit libraries only)
libmlx4-rocee (10GbE)
libmlx4 (InfiniBand network)
libmthca
libnes (64-bit libraries only)
rdma (no architecture)
ntp-4.2.4p8-2.el6.x86_64/ntpdate-4.2.4
p8-2.el6.x86_64
SUSE Linux Enterprise libstdc++ (both 32-bit and 64-bit libraries) Kernel version level:
Server 10 SP 3 or 4 glibc++ (both 32-bit and 64-bit libraries) 2.6.16.60-0.69.1-smp 3.
cpp
gcc Support for SUSE Linux
gcc-c++ Enterprise Server 10 SP3
kernel-source removed in DB2 10.1.
binutils
OpenSSH
sg3_utils
scsi*.rpm
ntp-4.2.4p8-1.3.28
SUSE Linux Enterprise libstdc++ (both 32-bit and 64-bit libraries) On SUSE Linux Enterprise
Server 11 SP 1 glibc++ (both 32-bit and 64-bit libraries) Server 11 SP1, the default
cpp kernel must be upgraded to
gcc version 2.6.32.36-0.5,
gcc-c++ requiring the following
kernel-default packages:
kernel-default-devel kernel-default-2.6.32.36-0
kernel-default-base .5.2
kernel-source kernel-default-devel-2.6.3
kernel-syms 2.36-0.5.2
binutils kernel-default-base-2.6.32
OpenSSH .36-0.5.2
sg3_utils kernel-source-2.6.32.36-0.
ntp-4.2.4p8-1.3.28 5.2
kernel-syms-2.6.32.
36-0.5.2
By following these OS considerations, you can ensure that your DB2 pureScale
feature installation succeeds and is maintained with the latest standards in terms
of both OS updates and packages to install.
40 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
2.4 Hardware firmware requirements
To ensure that you are working with the latest firmware, validate your current
firmware version with the ones that are supported, as listed in the following
sections. Not keeping up with the latest firmware can cause various
complications, because the DB2 pureScale feature interacts closely with the
hardware components to provide optimal results.
Install the latest supported firmware for your System x server from the
following website:
http://www.ibm.com/support/us/en/
Table 2-10 AIX firmware levels for the DB2 pureScale feature
Server Required platform firmware level
After upgrading to the latest firmware, you can continue with the installation of
the DB2 pureScale feature, because all of the components that require updates
from a software perspective have been handled. If you require firmware updates
after the DB2 pureScale instance is created and is running, perform the firmware
updates in a rolling manner (unless the DB2 Information Center says otherwise)
and ensure that you update each host in the cluster separately.
Your test environment should always have the same number of members as
your production environment, but if you cannot have as many, the minimum
recommended number of members is still two. You can have one member in
your test environment, but you cannot test how the application reacts to failures
of the member to which it is connected. For testing environments, a single CF is
sufficient, unless you need high availability in the test environment itself. CF
failures are internally processed in DB2 and rarely lead to any specific
application reaction.
42 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
With that said, you can achieve these configurations in several ways because a
DB2 member and a CF can share a single host on both AIX and Linux systems.
Having the CF and member share a single host is not preferable from a high
availability point of view, because when a host fails, both a member and a CF are
down at the same time. This event leaves up only a single CF and the remainder
of the members, which produces a vulnerable state because subsequent failures
can lead to a full outage.
Ask yourself the following questions to understand how many DB2 members you
actually need for your particular cluster:
Is there any workload affinity?
Will workload balancing be used or can a single host take most of the work?
Is there batch work that occurs on a regular basis?
The answers to these questions can help you with the topology that is best suited
to your needs.
Ask yourself the following questions regarding the number of instances that you
might want or need for testing purposes:
Will this cluster be used for testing of functionality or system verification?
Will this cluster be used for production scenarios?
Knowing whether you are putting a cluster together for production versus for
testing can influence whether certain options are valid and if those options might
introduce a less resilient system. Consider the time line of events that will
happen in the future. Is it possible for some systems to have a dual duty in the
organization so that you can reduce the hardware purchased?
Systems such as the following systems might not be required for production
level testing:
A system to verify that database backups from a production system are
correctly created.
A system to verify tuning parameters before they are used on a
production system.
Dry-runs of upgrade or migration work on the system. These dry-runs might
or might not be DB2 related, such as firmware updates or updates to
OS drivers.
Answering these questions can help you better consider the topology that is best
for your environment and decide how many members your cluster should have.
Figure 2-2 shows the common scenario of having two members and two CFs as
common topology.
Member Member
Using 2 hosts
CF
Member Member
Using 4 physical
CF CF
hosts
Member Member
Using 2 physical
CF CF
hosts
Figure 2-2 Sample configurations with two members and two CFs
44 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Another common scenario is to have multiple members (for example, four) and
two CFs. Figure 2-3 depicts different possibilities for having multiple members
and two CFs.
Figure 2-3 Possibilities for four members and two CFs for a DB2 pureScale cluster
The general idea is to be able to expand to additional members and have two
CFs (hopefully on separate hosts) to achieve maximum tolerance against failures
or uptime.
Disaster recovery is the contingency plan when the primary cluster fails to the
point where it cannot be brought back online. This disaster can be as simple as a
site failure because of a building fire or natural disaster. The contingency plan
can be another database at a different site, either a few kilometers away or many
kilometers away in another province or country.
This section covers the basic principles that provide a highly available cluster
and then follows up on the different disaster recovery options that are available.
Avoiding outages
Try to avoid outages when possible. Think about where a failure can occur,
either hardware in the components, such as hosts, adapters, cables, switches, or
the infrastructure being used, such as power circuits, air conditioning units, or
fans. If there are any single points of failure, you might want to consider adding
redundancy at those points. For example, when a single power circuit is used to
power a server, what happens if that circuit fails? Having a secondary power
circuit in the building powered by another power grid might be a
possible solution.
46 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
For more information about how to spread the components of a cluster on to
physical machines to reduce the impact of a failure, see 2.5.1, “Topology
requirements and considerations” on page 42.
The general idea is that by understanding how you can add disaster recovery
capabilities in to the equation, you can further ensure that your database remains
continuously available, processing transactions and handling application queries.
While looking at the options in the sections that follow, consider the following
items when you determine which of these options are appropriate for
your situation:
How much time can a disaster recovery site lag behind a primary site? This
question produces a recovery point objective (RPO), which is the amount of
data that might be lost between the time the primary site failed and the
disaster recover site took over.
How much time can it take to recover the business at the disaster recovery
site? This question produces a number referred to as the recovery time
objective (RTO), which is the amount of time that it can take to get the
disaster recovery site into operational mode.
Each of the methods described in the sections that follow has different RPO and
RTO capabilities. RTOs can differ between solutions based on the setup and the
capabilities of the people switching the primary site over to the disaster recovery
site. This RTO value is not something that can be explicitly defined with the
solution. Alternatively, the RPO value has its number tied directly into the
solution. Some solutions can offer a 0 second RPO. Other solutions require the
RPO to be more than 0 seconds, and it can be up to minutes if needed. You must
understand your business need and choose a strategy that fits it.
48 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
The distances for this replication can happen over practically unlimited distances
for thousands of DB2 tables, while preserving transactional integrity and
tolerating system and network outages. Each database is active, allowing for
workload distribution. Databases can be configured differently and can be on
different types of hardware and different software versions, allowing for
immediate failover during outages and maintenance, upgrades, and migrations
without any downtime.
Figure 2-4 depicts how Q replication works across a source server and
target server.
Q Capture Q Apply
control tables control tables
Q Capture Q Apply
program program
Administration
queue
Log
Replication
DB2 process queue map
Source Target
table Q subscription table
Change Data Capture supports both AIX and Linux, along with the DB2
pureScale feature as either a source or a target. There are various monitoring
capabilities and a graphical user interface (GUI) available to provide increased
understanding of the replication environment to accelerate troubleshooting.
At the time of the writing of this book, this solution is the only available solution
with the DB2 pureScale feature that offers 0 second RPO.
50 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
The following sections describe considerations for the application and important
configuration parameters to ensure that the optimal parameters are used for
communication between the DB2 pureScale feature and the application.
Before running the application and connecting to DB2, consider the following
additional items that might be relevant according to the type of application:
Java based applications (JDBC, JNI, JCC, and so on)
Considerations regarding the property files, properties on the connection
object, and URLs, as described in 2.7.2, “DB2 client configurations for an
application” on page 52
Non Java based applications (CLI, perl, php, ruby, C/C++, ODBC, and so on)
Considerations that need to happen regarding configuration files for DB2 on
the client side to ensure that the application is properly communicating with
the application
The next sections cover some of the configuration parameters that can help
ensure that clients are communicating with DB2 correctly and that all parameters
are set to the optimal values.
You do not have to create or populate the db2dsdriver.cfg file, but by doing so,
you can avoid the need to specify information about the database name, hosts,
ports, aliases, and other configuration parameters in the client applications.
The db2dsdriver.cfg configuration file includes the following structures that you
can use to define a certain keyword to be either global or only for a specific set of
configurations:
<dsncollection>
The data source name section is contained within the <dsncollection> and
</dsncollection> tags. Parameters in this section apply only to a given data
source name.
<databases>
The database information section is contained within the <databases> and
</databases> tags. Parameters in this section apply only to a given
database connection.
52 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
These two subsections can be defined under the database information section to
enable the following high availability features:
<wlb>
The workload balancing subsection is contained within the <wlb> and </wlb>
tags. Workload-balance related parameters are placed in this section, and
they apply to a specific database connection.
<acr>
The automatic client reroute (ACR) subsection is contained within the <acr>
and </acr> tags. Automatic client reroute related parameters are placed in
this section, and they apply to a specific database connection.
<parameters>
The global attributes section is contained within the <parameters> and
</parameters> tags. Parameters in this section apply to all databases
and aliases.
<ldapserver>
For Lightweight Directory Access Protocol (LDAP) support in CLP Plus, the
LDAP section is contained within the <ldapserver> and </ldapserver> tags
and can be used to specify LDAP server information.
<configuration>
<dsncollection>
<dsn alias="alias1" name="name1" host="server1.net1.com" port="50001"/>
<!-- Long aliases are supported -->
<dsn alias="longaliasname2" name="name2" host="server2.net1.com" port="55551"/>
<parameter name="Authentication" value="Client"/>
</dsn>
>/dsncollection>
<databases>
<database name="name1" host=server1.net1.com" port="50001">
<parameter name="CurrentSchema" value="OWNER1"/>
<wlb>
<parameter name="enableWLB" value="true"/>
<parameter name="maxTransports" value="50"/>
</wlb>
<acr>
<parameter name"enableACR" value="true"/>
</acr>
</database>
<!-- Local IPC connection -->
<database name="name3" host="localhost" port="0">
<parameter name="IPCInstance" value="DB2"/>
<parameter name="CommProtocol" value="IPC"/>
</database>
</databases>
<parameters>
<parameter name="GlobalParam" value="Value"/>
</parameters>
</configuration>
The db2dsdriver.cfg file specifies that the <dnscollection> tags and the
databases and list of servers can handle the requests.
54 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Additional Linux system configurations
Table 2-11 lists specific communication parameters that must be set at the OS
level for Linux systems on the client side. These parameters can help improve
the overall time that it takes for a member to recover after a failure.
The parameters described in Table 2-11 are all at the kernel level of the OS. To
set these parameters, run the following commands:
sysctl -w net.ipv4.tcp_keepalive_probes=10; echo
“net.ipv4.tcp_keepalive_probes=10” >> /etc/sysctl.conf;
sysctl -w net.ipv4.tcp_keepalive_time=6; echo
“net.ipv4.tcp_keepalive_time=6” >> /etc/sysctl.conf;
sysctl -w net.ipv4.tcp_keepalive_intvl=1; echo
“net.ipv4.tcp_keepalive_intvl=1” >> /etc/sysctl.conf
sysctl -w net.ipv4.tcp_retries2=3; echo “tcp_retries2” >>
/etc/sysctl.conf
You can verify each of these variables using a simple cat of the OS file that
corresponds with these variables. Notice that each of these variables is
associated with the same directory structure, allowing for the
following verification:
cat /proc/sys/net/ipv4/tcp_retries2
These parameters are all at the kernel level of the OS. To set these parameters,
run the following commands:
no -o tcp_keepidle=12;
no -o tcp_keepintvl=2;
no -o tcp_keepcnt=10;
56 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
The tcp_keepidle time and tcp_keepintl time are both measured in
half-seconds.
Client affinity is optional and can be use to connect to certain servers, but it is
also possible with Java applications. There are several configuration parameters
that must be modified to ensure that this task happens properly. They are
described in Table 2-13 and are defined within the property settings of the
Java driver.
You can further optimize a Java application using query optimizations to limit the
amount of time it takes for queries to complete. However, this description is
beyond the scope of this book.
Client affinity, which is the ability to connect to certain servers, is also possible
with non Java applications (CLI and .NET applications). You can modify several
configuration parameters to ensure that client affinity happens properly, as listed
in Table 2-14. These parameters are defined within the property settings of the
db2dsdriver.cfg file.
maxAcrRetries parameter The number of times that a connection to each server in the list of
alternative servers is tried during automatic client reroute. The valid
range is 0 - MAX_INT. If the value is 0, the number of tries is 1. The
default is 3.
acrRetryInterval parameter The number of seconds to wait between tries. The valid range is 0
- MAX_INT. The default is no wait (0).
affinityFailbackInterval parameter The number of seconds to wait after the first transaction boundary
to fail back to the primary server. The default is 0, which means that
no attempt is made to fail back to the primary server.
58 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Element in acr section of the Value
db2dsdriver.cfg file
alternateserverlist <server> elements that identify the host name and port number for
each server that is used for automatic client reroute through client
affinities. One of the elements must identify the primary server. The
presence of these elements does not activate automatic client
rerouting.
clientaffinitydefined <client> elements that define the server order for automatic client
rerouting for each client. Each <client> element contains a
listname attribute that associates a client with a <list> element
from the <affinitylist> element.
60 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
3
Images in this chapter: The images in this chapter are for setup and
configuration on a SUSE Linux Enterprise Server 11 system and Red Hat
Enterprise Linux systems. The exact steps and images for your system might
vary if you use different hardware or software versions.
For more details about hardware and software requirements, visit the IBM DB2
10.1 Information Center at:
http://pic.dhe.ibm.com/infocenter/db2luw/v10r1/index.jsp
This setup uses a Fibre Channel connection between servers and external
storage, so a Fibre Channel card is required on each server. The DB2 pureScale
feature requires a high speed, low-latency interconnect network. If you use
SUSE Linux Enterprise Server or Red Hat Enterprise Linux 6.1, you can choose
between an InfiniBand network or a 10 GbE network; however, if you use Red
Hat Enterprise Linux 5, you can use only an InfiniBand network.
Follow the instructions in this section to install the Fibre Channel card and either
an InfiniBand HCA adapter or a 10 GbE network adapter in each server.
62 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Figure 3-1 shows the overall Linux environment architecture of the DB2
pureScale cluster used in this section.
Clients
Ethernet Switch
InfiniBand Switch
or 10 Gigabit Switch
Member Member
CF Primary CF Member
Standby
Fiber Channel
Shared Storage
Attention: Follow any safety instructions that might come with your server
and rack before continuing.
Attention: If the server is installed in a rack, slide the server out of the rack
enclosure first!
2. Open the server chassis by pressing in on the blue tab on the cover-release
latch, and slide the cover towards rear to remove the server cover
(Figure 3-2).
Top cover
Cover release
latch
64 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
3. Grasp the front and rear of the PCI riser-card assembly and lift it out of the
PCI riser-card assembly slot on the system board (Figure 3-3).
Figure 3-3 Remove the PCI riser card from the server
Adapters
PCI PCI
riser-card riser-card
assembly assembly
PCI slots
Figure 3-4 Insert the PCI Express cards into the riser card
Important: Ensure that the PCI Express card is correctly inserted into the
riser-card assembly.
66 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
5. Align the PCI riser-card assembly with the PCI slot connector on the system
board by aligning the nailheads with the slots on the chassis. Then press
down firmly until the PCI riser-card assembly is seated correctly in the
connector on the system board (Figure 3-5).
PCI
riser-card PCI riser-card assembly
assembly (full-length, full-height,
(low-profile half-length, full-height,
adapters) or three/fourth length,
full-height adapters)
6. Ensure that the PCI Express card and its assembly are seated correctly and
that there are no loose parts or tools inside the server.
Top cover
Cover
release latch
68 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Figure 3-7 shows the cabling structure.
Fabric Optic
Figure 3-7 Connect a server with storage
Important: If you use dual-port QDR InfiniBand HCA, ensure that you use
port 1 to connect to the InfiniBand switch.
PORT 1
PORT 2
10 GbE network
Find an empty port on the 10 GbE switch and connect it to a 10 Gb adapter on
the server with an SPF+ cable.
Important: If you use dual-port adapter, make sure that you use port 1 to
connect to the switch.
70 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
3.1.5 Configuring the internal disks
The internal disks are used to install the operating system and software,
including parts of the DB2 software. If your server does not have the internal
disks already set up, you must set up the disks. You must set up the RAID level
and create a driver group before installing any operating system.
This section explains how to configure the internal disks on an IBM System
x3690 X5 server. The server comes with four 300 GB SAS hard disk drives and
will be configured with RAID 5. The resulting virtual drive is set as the boot drive.
Important: This procedure erases all data on the internal disks of the server.
Ensure that you back up any necessary data to another server before starting
this task.
To configure internal disks, use EFI WebBIOS, which comes with the IBM
System x server, to complete the following steps:
1. Boot the server and press F1 to enter the BIOS (Figure 3-9).
2. Select System Settings, and then choose Adapters and UEFI Drivers.
72 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
6. Figure 3-11 is the home page for EFI WebBIOS. Click Configuration Wizard,
select New Configuration, and click Next to start.
Important: Reconfiguring the internal disks deletes all the data on the
disks. Ensure that you back up the important data before you click Yes
to continue.
74 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
8. Next, create one drive group (DG) that contains all four internal disks. Select
each of the four drives in the left panel, and click Add to Array to add it to the
Drive Groups pane (Figure 3-13). Click Accept DG and then click Next.
76 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
10.Select RAID 5 from the RAID level menu, and enter the size in the input box
(Figure 3-15). The size for different RAID levels displays in the right pane.
Click Accept and then click Next.
78 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
14.Click Home to navigate back to the main menu, and you should see that there
is one drive group 0 and four disks under it (Figure 3-17). Click Exit to exit
WebBIOS. If the server requires a reboot, press Enter to do so. To exit the
BIOS, press ESC and Y to confirm.
Each step includes instructions for SUSE Linux Enterprise Server 11, Red Hat
Enterprise Linux 5, and Red Hat Enterprise Linux 6. In each step, you can
choose the appropriate set of instructions for your operating system
and hardware.
Before you begin: Ensure that you complete the hardware configuration
steps in 3.1, “Hardware setup on a Linux operating systems” on page 62 and
gather all the required software listed in 2.3, “Software requirements and
considerations” on page 37.
80 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
SUSE Linux Enterprise Server 11 SP1
To install the operating system on SUSE Linux Enterprise Server 11 SP1:
1. Power on the IBM System x server and insert the SUSE Linux Enterprise
Server 11 SP1 installation DVD. Pay attention to the options that display only
momentarily. Press F12 to select the boot order menu (Figure 3-18).
2. From the boot order menu, select CD/DVD-ROM to boot from the
installation DVD.
3. Wait until the installation presents you with a welcome window. Read and
then accept the license, and click Next.
4. You can check the installation DVD by clicking Start Check, or skip this
section by clicking Next.
5. Choose New Installation mode and click Next to start.
6. Ensure that the clock and time zone are correct, and click Next.
7. Because you are using the real cluster, accept the default setting of Physical
Machines, and click Next.
82 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
9. On the Software Selection and System Tasks window (Figure 3-20), add the
InfiniBand (OFED) and C/C++ Compiler and Tools packages, and then click
OK to continue. If prompted with a license agreement, read it and then click
Accept to continue.
10.After the installation is complete, you must reboot the server. After the reboot,
enter the root password and click Next.
84 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
12.On the Network Configuration window (Figure 3-22), click Network
Interfaces to set up the Ethernet network.
13.Click the Ethernet port that shows DHCP in the IP Address section, and
click Edit.
86 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
15.On the network setting page (Figure 3-24), notice that the IP address section
is changed from DHCP to the IP address that you assigned to this network
adapter. Click OK and then click Next.
16.You can test your Internet connection or skip this test. Click Next to continue.
17.You can set up the network services on this page, or you can set up this
information later after the installation. Click Next.
18.Select the correct user authentication method, and click Next.
19.Create a user with a password if needed. Click Next to continue.
20.Review the release notes, and click Next.
21.The installation requires that you perform hardware configuration, click OK to
detect graphics card on your system. After the detection completes,
click Next.
22.Click Finish to finish the SUSE Linux Enterprise Server 11 SP1 installation.
2. From the boot order menu, select CD/DVD-ROM to boot from the
installation DVD.
3. When the Red Hat Enterprise Linux 5.6 boot panel opens, press Enter to start
the installation in graphical mode. Click either OK to test the image or Skip to
skip the installation media testing.
4. Review the Release Notes and then click Next to continue.
88 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
5. Select the appropriate language and keyboard layout for your system.
Click Next.
6. Retrieve the installation number from your system administrator or skip this
retrieval for now. Click OK to continue.
7. Red Hat Enterprise Linux finds the virtual drive device (407 GB) that you
created as sda. The setup wizard prompts you to initialize this device
to continue.
8. Ensure that the disk you selected in the window is correct before
clicking Next.
90 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
10.Select Software Development in the menu (Figure 3-27). It contains the
required C++ library packages that are installed during the deployment.
Choose Customize now, and click Next to continue.
92 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
15.To install DB2 10.1 with the DB2 pureScale feature on Red Hat Enterprise
Linux 5.6, you must disable the firewall and SELinux feature (Figure 3-29 and
Figure 3-30 on page 94). Click Forward to continue.
16.You do not need to enable the kdump feature. Click Forward to continue.
17.Ensure that the date and time settings are correct and click Forward.
18.Set up the Red Hat Network, and then click Forward to continue.
19.Create a user if needed. Click Forward.
20.Click Forward to accept the sound card configuration.
21.Click Finish to finish the installation. The server requires reboot afterward.
Important: Ensure that you installed Red Hat Enterprise Linux 5.6 on all
servers in the cluster. After the installation is complete, proceed to 3.2.2, “Step
2: Updating the kernel” on page 95 to continue.
94 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Red Hat Enterprise Linux 6.1
The installation of Red Hat Enterprise Linux 6.1 is similar to the installation on
Red Hat Enterprise Linux 5.6. The major difference is to choose various software
packages during the installation configuration wizard. The following steps are the
steps that are distinct from the Red Hat Enterprise Linux 5.6 installation:
1. At the software package pane, choose Customize Now and add the following
package groups:
a. Under the Base System category, choose the following packages:
• Compatibility libraries
• Existing UNIX compatibility with extra packages, ksh, rsh, rsh-server,
telnet, and telnet-server
b. Under the Server category, choose the following packages:
• FTP server
• NFS file server
• System administrator tools with extra package
c. Under the Desktop category, choose the following packages:
• Desktop
• Existing Windows operating system compatibility with extra packages,
libxp, and openmotif
d. Under the Development category, choose the following packages:
• Additional development with extra packages, libXpm-devel,
libaio-devel, libcap-devel, openmotif-devel, and tcl-devel
• Development tools with extra packages, compat-gcc (three of them),
expect, and libstdc++
2. Do not set up the Ethernet network during the OS installation. You configure
this network later.
3. Ensure that you install and enable NTP, and the time is synchronized among
all the servers.
4. Ensure that kdump is disabled during the installation and finish
the installation.
Attention: The kernel version level on SUSE Linux Enterprise Server 11 SP2
satisfies the DB2 pureScale feature requirement. A kernel update is
not required.
Attention: You can download the kernel rpm files from the SUSE Updates
repository. Contact your system administrator to get a copy of the
kernel files.
Important: You must reboot the server after updating the kernel. After all
the hosts are updated, you can continue to 3.2.3, “Step 3: Installing the
multipath device driver” on page 97.
After updating the kernel, reboot the server to pick up the new kernel.
96 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Important: You must reboot the server after updating the kernel. After you
update all the hosts, continue to 3.2.3, “Step 3: Installing the multipath device
driver” on page 97.
Attention: This task is the same on both SUSE Linux Enterprise Server 11
SP1 and SP2. Complete these tasks on all servers in the cluster.
To set up and configure the multipath daemon service on SUSE Linux Enterprise
Server 11 SP1 or SP2, first check whether the multipath daemon is already
started by running the following command:
chkconfig --list | grep multipathd
If the output shows that the multipath daemon service is not started, run the
following command to start it:
chkconfig multipathd on
Important: Ensure that you perform these steps on all servers in the cluster.
Then proceed to 3.2.4, “Step 4: Configuring the external storage” on page 99
to continue.
98 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Example 3-5 shows the output of this command.
To set up and configure the multipath daemon service on Red Hat Enterprise
Linux 6.1, run the following commands:
1. Install the Storage Availability Tools group package by running the following
command. This package contains the multipath daemon.
yum groupinstall “Storage Availability Tools”
2. Run the mpathconf --enable command to generate the multipath
/etc/multipath.conf configuration file.
3. Edit the configuration file to add the following line:
find_multipaths yes
4. Run the mpathconf command again to see the output shown in Example 3-6.
Important: Ensure that you complete these steps on all servers before you
continue to the next step.
100 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
After you have the Storage Manager software installed, continue to configure the
external storage. Create three arrays and four logical drives on the storage
(Table 3-1).
102 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
5. Click the Logical tab. The total unconfigured capacity displays in the view
shown in Figure 3-32.
104 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
8. Use RAID 1 for this array, TBSQLLIB, which requires a minimum of two disks.
Select two disks from the left pane, and add them to the right pane. Select
RAID 1 from the RAID level list (Figure 3-34).
106 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
11.Create the first logical drive that is used as the tie breaker. Name the logical
drive whatever you want, for example, TieBreaker (Figure 3-36), and make its
size 100 MB. Click Next to continue.
Figure 3-36 Create the logical drive and specify the capacity and name
108 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
14.Create the next logical drive on the same disk array. Name the logical drive
SQLLIB and make its size 10 GB (Figure 3-38). Click Next to continue.
Figure 3-38 Create the logical drive and specify the capacity and name
16.Repeat steps 6 - 15 to create the disk arrays and logical drives shown
in Table 3-2.
110 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
17.After you create all of the required disk arrays and logical drives, check the
array and logical drives on the Logical tab. The tab resembles the window
shown in Figure 3-40.
Attention: Make note of the port identifiers for each server, because you
need the port identifiers later.
112 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
5. Click the Mappings tab. Right-click Host Group pureScale and click
Define Host (Figure 3-41).
e. In the Alias field, enter a name for the identifier, and click Add. This
example uses node101-port1 for the first port.
114 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
f. From the “Known unassociated host port identifier” list, choose another
identifier that belongs to the first node (Figure 3-43). The identifier number
should match the output of step 1 on page 112.
g. In the Alias field, enter a name for the identifier, and click Add. This
example uses node101-port2.
h. Click Next to continue. From the Host type (operating system) list, select
Linux and click Next.
7. When prompted to create another host, click Yes and repeat step 6 on
page 113 to add a second host with the correct identifiers.
116 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
8. After you create both hosts, confirm that they are shown in Storage Manager
on the Mapping tab under Host Group pureScale (Figure 3-45).
118 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Important: The LUN affects the device mapping order on the host. For
example, if LUN 0 is assigned to TieBreaker, LUN 1 to SQLLIB, LUN 2 to
pureScaleData, and LUN 3 to pureScaleLog, the device paths for these
four logical drives are /dev/dm-0, /dev/dm-1, /dev/dm-2, and /dev/dm-3.
12.After you add all four logical drives to the Host Group pureScale, verify the
status on the Mappings tab (Figure 3-47). Then, exit Storage Manager.
13.Reboot both servers in the cluster to pick up the external logical drivers.
Then, run the following command to list the external logical drives:
multipath -l
120 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
The sg3_utils package is required for tiebreaker functionality, and it usually
comes with the operating system installation DVD.
2. If the sg3_utils and ntp packages are not installed by default on your
system, use the Software Management menu to install them from the SUSE
Linux Enterprise Server DVD.
122 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
5. Navigate to the Search tab (Figure 3-49) and search for sg3_utils and ntp.
Choose the sg3_utils-1.25-4.el5.x86_64 package, and click Apply to install
it.
Important: On Linux and AIX, ensure that you configure a default gateway on
all hosts that are part of the DB2 pureScale cluster.
Attention: This task is the same on both SUSE Linux Enterprise Server 11
SP1 and SUSE Linux Enterprise Server 11 SP2. Complete these tasks on all
servers in the cluster.
To set up the Ethernet network on SUSE Linux Enterprise Server 11, complete
the following steps:
1. If you have multiple Ethernet ports on your system, detect which Ethernet port
is used by the system. Ensure that you connected the server with an Ethernet
switch from one of the ports.
2. Open a terminal and run the following command. If there are multiple Ethernet
ports on the server, run the command for each Ethernet port.
ethtool eth0
ethtool eth1
....
Example 3-10 shows the output of the ethtool command.
124 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation : Yes
Advertised link modes :10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: g
Link detected: yes
If part of the command output reads Link detected, the port is connected to
the switch by Ethernet connections. Take note of the port number so that you
can assign a static IP address to the Ethernet port.
126 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
4. On the Address tab of the Network Card Setup window of the Network
Settings tool, ensure that the value in the Configuration Name field matches
the Ethernet port you noted in step 2 on page 124 (Figure 3-51).
6. On the Hostname/DNS tab, ensure that the host name and domain name are
correct. Click OK to continue.
7. Open a terminal session and restart the network by running the
following command:
/etc/init.d/network restart
ifconfig
128 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Red Hat Enterprise Linux 5.6
To set up the Ethernet network on Red Hat Enterprise Linux 5.6, complete the
following steps:
1. If you have multiple Ethernet ports on your system, you need to detect which
Ethernet port is used by the system. Ensure that you connected the server
with Ethernet switch from one of the Ethernet ports on the server.
2. Open a terminal and run the following command. If there are multiple Ethernet
ports on the server, run the command for each Ethernet port.
ethtool eth1
ethtool eth2
...
If part of the command output reads Link detected, the port is connected to
the switch by Ethernet connections. Take note of the port number so that you
can assign a static IP address to the Ethernet port.
130 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
4. Choose the correct eth port and click Edit (Figure 3-54). Enter the correct IP
address and subnet mask.
5. When complete, you can exit the Network Configuration window. When
prompted, you must restart the network to pick up the changes. To do so, run
the following command:
/etc/init.d/network restart
The output is similar to the following output:
[root@node101 ~]# /etc/init.d/network restart
Shutting down interface eth0:
Shutting down interface usb0:
Shutting down loopback interface:
Bringing up loopback interface:
Bringing up interface eth0:
Important: You have finished the Ethernet network setup on Red Hat
Enterprise Linux 5.6. Proceed to 3.2.7, “Step 7: Setting up the interconnect
network” on page 132 to continue.
To set up the Ethernet network on Red Hat Enterprise Linux 6.1, complete the
following steps:
1. As root, open a terminal and run the following commands:
– chkconfig NetworkManager off
– service NetworkManager stop
2. Open a terminal and run system-config-network, and follow the wizard to
configure the Ethernet network.
3. Run the following command in a terminal to restart network service and check
the Ethernet interface information:
service network restart
ifconfig
Important: You have finished setting up the Ethernet network on the Red Hat
Enterprise Linux 6.1 system and can continue to the next section.
The DB2 pureScale feature supports multiple high speed interconnect networks
in one cluster. If you want to set up multiple high speed networks in one cluster,
visit the DB2 Information Center for more information.
132 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Important: On Linux and AIX, ensure that you configure a default gateway on
all hosts that are part of the DB2 pureScale cluster.
This document uses the IP address and net mask listed in Table 3-4.
The instructions here are for different combinations of operating systems and
types of interconnect network. Find the correct instructions for your environment
in the next sections:
If you are using SUSE Linux Enterprise Server 11 with and InfiniBand
network, see “Setting up an InfiniBand network on SUSE Linux Enterprise
Server 11” on page 133.
If you are using SUSE Linux Enterprise Server 11 with a 10 GbE network, see
“Setting up the 10 GbE network on SUSE Linux Enterprise Server 11” on
page 138.
If you are using Red Hat Enterprise Linux 5.6 with an InfiniBand network, see
“Setting up the InfiniBand network on Red Hat Enterprise Linux 5.6” on
page 140.
If you are using Red Hat Enterprise Linux 6.1 with a 10 GbE network, see
“Setting up the 10 GbE network on Red Hat Enterprise Linux 6.1” on
page 143.
134 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
– ofed-kmp-default-1.5.2_2.6.32.29_0.3-0.7.1
– opensm-32bit-3.3.7-0.5.1
– opensm-3.3.7-0.5.1
– ibvexdmtools-0.0.1-75.16.1
– qlvnictools-0.0.1-75.16.1
– sdpnetstat-1.60-5.22.1
– srptools-0.0.4-6.8.2
– ksh-93u-0.8.1.x86_64.rpm1
Attention: If you are using SUSE Linux Enterprise Server 11 SP1, you do
not need to use the Software Management tool described in the next step.
You can skip to step 3 on page 136 to continue.
1
If you are using SUSE Linux Enterprise Server 11 SP2.
136 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
For example, on node101, this file looks like as follows:
DEVICE=’ib0’
BOOTPROTO=’static’
IPADDR=’192.168.100.151’
NETMASK=’255.255.255.0’
STARTMODE=’onboot’
WIRELESS=’no’
4. Run the following command to start the InfiniBand adapter:
ifup ib0
The sample output is as follows:
ib0 Device : Mellanox Technologies MT26428 [ConnectX VPI PCIe 2.0
5GT/s – IB QDR / 10GigE] (rev b0)
5. Check the network status by running the following command:
ifconfig
Locate the ib0 entry in the output (Example 3-11).
Attention: If you are using SUSE Linux Enterprise Server 11 SP1 or SP2,
follow the instructions in “Setting up an InfiniBand network on SUSE Linux
Enterprise Server 11” on page 133 to install the InfiniBand (OFED) packages
before you continue here.
To set up the 10 GbE network on SUSE Linux Enterprise Server 11, complete
the following steps:
1. To set up the 10 GbE network, you must configure the 10 GbE switch first:
a. Find a cable to connect the micro-USB port on the switch to the serial port
on your system, and connect your terminal-emulation software using the
following configuration:
Default band rate 9600 bps
Character size Eight characters
Parity None
Stop bits One
Data bits Eight
Flow control None
b. When prompted for a password, enter the default admin password. If a
blank pane displays, you might need to press Enter first before the
password prompt appears.
c. Enter the global configuration mode on the switch by running the
following commands:
• enable
• configure terminal
d. Create the interface IP address needed for the 10 GbE subnet on the CF.
Pick an address that is on the same subnet as the interconnect network,
and enter the information into the switch by running the following
command:
interface ip 1
ip address 192.168.100.2
ip netmask 255.255.255.0
exit
e. Next, ensure that the configuration is used each time the switch is
rebooted by running the following commands:
• copy running-config startup-config
• exit
138 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
2. Determine the port name and the card name for the 10 GbE network adapter
and card name. Open a terminal in SUSE Linux Enterprise 11 and run the
following command:
hwinfo --short --netcard | grep 10GigE
The first section of the output is the port name for the adapter, and the second
section is the card name for the adapter. In our setup, the port name is eth2
and card name is Mellanox MT26448 [ConnectX EN 10GigE, PCIe 2.9
5GT/s]. The output should be similar to Example 3-12.
Example 3-12 Determine the 10 GbE network card name and port number
node101 :~/ # hwinfo --short --netcard | grep 10GigE
eth2 Mellanox MT26448 [ConnectX EN 10GigE, PCIe 2.0 5GT/s]
3. Open the /etc/dat.conf file in a text editor, and add the following line:
ofa-v2-roe u2.0 nonthreadsafe default libdaplofa.so.2 dapl.2.0
“<port name>” “”
Ensure that you use correct value to replace <port name>.
4. Go to the /etc/sysconfig/network/ folder and create a file called
ifcfg-<port name>. Add the following lines to the file:
BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR=<Interconnect IP Address>
MTU=''
NAME=<Adapter card name>
NETMASK=<Interconnect netmask address>
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
USERCONTROL='no'
On node101, create the sample ifcfg-eth2 file as follows:
BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='192.168.100.151'
MTU=''
NAME=' Mellanox MT26448 [ConnectX EN 10GigE, PCIe 2.0 5GT/s]'
NETMASK='255.255.255.0'
NETWORK=''
REMOTE_IPADDR=''
140 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
3. Edit the /etc/sysconfig/network-scripts/ifup-ib file, find line 79, and
change it from:
Line 79: if [ -n “${MTU}” -a $MTU -gt 2044 ]; then
To:
Line 79: if [ -n “${MTU}” ] && [ $MTU -gt 2044 ] ; then
4. Start and enable the openibd service by running the following command:
service openibd start
chkconfig openibd on
5. Restart the network by running the following command:
service network restart
6. Run the following command in a terminal, and you discover that the network
interface ib0 is enabled:
ifconfig
Locate the ib0 entry from the output (Example 3-13).
7. Test the connection by pinging other hosts through the InfiniBand interface.
142 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
9. Ensure that the Activate device when computer starts option is selected
for the InfiniBand (ib0) device (Figure 3-57). Click OK.
Important: You have finished configuring the InfiniBand network on Red Hat
Enterprise Linux 5.6. Continue to 3.2.8, “Step 8: Editing the hosts file” on
page 146.
144 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
– libibumad.i686
– libmlx4-rocee.i686
– libmthca.i686
– libibcommon.i686
– compat-dapl
– compat-libstdc++-33.i686
– infiniband-diags
– libibcommon
– mstflint
– perftest
– qperf
– srptools
10.After installing the packages, turn on the RDMA service by running the
following command:
chkconfig rdma on
11.Find the correct Ethernet port by running the following command:
cat /etc/udev/rules.d/*-persistent* | awk '/mlx/||/eth/'
The output displays port1 as eth#. Write down the eth port number.
12.Create a /etc/sysconfig/network-scripts/ifcfg-eth# file. Change the
number sign (#) in the file name to the eth port number that is returned from
the last step. It might already be created by the OS. Then, input the following
content into this file:
DEVICE=eth#
HWADDR=<HWADDR>
TYPE=Ethernet
IPADDR=’192.168.100.151’
NETMASK=’255.255.255.0’
MUT=’’
NAME=’eth#’
NETWORK=’’
REMOTE_IPADDR=’’
STARTMODE=’auto’
USERCONTROL=’no’
Make sure to change the DEVICE, HWADDR, and IPADDR parameters to the
appropriate values for the different servers in your environment.
Important: You have configured the 10 GbE network on Red Hat Enterprise
Linux 6.1. Continue to 3.2.8, “Step 8: Editing the hosts file” on page 146.
Attention: This task is the same on SUSE Linux Enterprise Server 11 and
Red Hat Enterprise Linux 5 and 6. Complete this task on all servers in
the cluster.
To add the host names and IP addresses to the /etc/hosts file, complete the
following steps:
1. Open the /etc/hosts file.
2. Add host names and IP addresses for all the servers in the cluster as shown
in the following sample:
192.168.1.101 node101.purescale.demo node101
192.168.1.102 node102.purescale.demo node102
192.168.100.151 node101-ib
192.168.100.152 node102-ib
146 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Important: If your system is using Red Hat Enterprise Linux 5.6 and the
full host name is assigned to the lookback IP address, remove that host
name from that list (Figure 3-58). Otherwise, the host name might resolve
to the wrong IP address.
Important: You have finished configuring hosts file. Continue to the next step.
Now, you can log in without a password using SSH on all hosts in your cluster.
148 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
3.2.10 Step 10: Blacklisting the system watchdog modules
The DB2 pureScale feature uses its own watchdog module. Therefore, you must
blacklist the system watchdog modules to avoid any conflict. This section
describes how to blacklist these modules.
Important: You added the system watchdog module to the blacklist on SUSE
Linux Enterprise Server 11. Continue to 3.2.11, “Step 11: Modifying the
mlx4_core parameter” on page 149.
Important: You added the system watchdog module to the blacklist on Red
Hat Enterprise Linux 5 and 6. Continue to the next section.
Important: You have finished this task. Continue to 3.4, “Installing the DB2
pureScale feature” on page 168.
Important: You have finished this task. Continue to 3.4, “Installing the DB2
pureScale feature” on page 168.
150 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
You can perform all the steps in the checklist to ensure that your system is ready
for the DB2 10.1 installation. You can download all the software (firmware,
technology level package, and service packs) used in this section from the IBM
Fix Central website at:
http://www.ibm.com/support/fixcentral/
Figure 3-59 shows the overall AIX environment architecture of the DB2
pureScale cluster used in this section.
Clients
Ethernet Switch
InfiniBand Switch
or 10 Gigabit Switch
Member CF
CFPrimary
Primary Member
Member CF
CFStandby
Standby
Fiber Channel Adapter Fiber Channel Adapter Fiber Channel Adapter Fiber Channel Adapter
Fiber Channel
Shared Storage
Figure 3-59 DB2 pureScale cluster hardware architecture in the AIX environment
152 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
The output of lslpp shows the file set name, the level installed on the system,
the state of the installation, and a short description of the file set. Ensure that
the level shows the AIX version followed by the TL level (7.1.0 in this
example). The state should be either APPLIED, COMMITTED, or EFIXLOCKED. If
the state is EFIXLOCKED, an interim fix is added to the system. The output of
the command should be similar to Figure 3-22 on page 85.
6. Check the /etc/dat.conf file and ensure that there is a line like the following
one and ensure that the device path /dev/iba0, port number 1, and InfiniBand
adapter name ib0 are correct.
hca0 u2.0 nonthreadsafe default
/usr/lib/libdapl/libdapl2.a(shr_64.o) IBM.1.1 "/dev/iba0 1 ib0" " "
7. Follow the instructions in “Step 9: Installing and setting up OpenSSH” on
page 147 to set up OpenSSH on all the hosts. Complete the followings step to
ensure that OpenSSH is installed and password-less access for the root user
is configured on each host.
8. Run the following command to verify that the C++ runtime level satisfies
the prerequisites:
lslpp -l xlC.rte
The AIX xLC.rte requirement for DB2 10.1 installation is at least 11.1.0.1.
The output of the command should be similar to Example 3-16.
9. Ensure that the shared disks have the same physical volume identifier (PVID)
on all hosts. Compare these results between each host in the DB2 pureScale
cluster. The minimum number of shared disks is three, based on your storage
needs. You can find the detailed instructions in 3.3.7, “Configuring a physical
volume identifier for an IBM DB2 pureScale instance” on page 164.
154 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
10.Ensure that the I/O completion ports (IOCPs) are installed and configured.
You can find detailed instructions in 3.3.8, “Configuring the I/O completion
ports” on page 166.
11.As root, ensure that the /tmp directory has at least 5 GB of free space. Run df
-g /tmp, which shows the free space in the /tmp directory:
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd3 8.50 6.26 27% 2358 1% /tmp
You can run chfs to extend the file system. For example, you can add 5 GB of
disk space to the /tmp folder by running the following command:
chfs -a size=+5G /tmp
Before you begin: According to the DB2 10.1 Information Center, the
minimum software requirement for InfiniBand on the AIX V7.1 operating
system is Technology Level 1 and SP 1. This section explains how to install
Technology Level 1 and SPs 1, 2, and 3 on the AIX V7.1 system. Ensure that
you download the required software from the IBM Fix Central website.
To install the technology levels and SP levels, complete the following steps:
1. Log in to the system.
2. Run oslevel -s and check the Technology Level and service pack version.
This example produces the following output:
7100-00-01-1037
3. Navigate to the directory that contains the Technology Level 1 software. Run
smitty install to view the menu shown in Example 3-18.
156 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
EFIX Management
Thin Server Maintenance
4. Select the Install and Update Software option and then the Update Installed
Software to Latest Level (Update All) option.
5. Enter the technology level directory path in the field (Example 3-19) and press
Enter to continue.
[Entry Fields]
* INPUT device / directory for software
[/tmp/7_1_1_0_tl/]
6. Press the Tab key to switch the ACCEPT new license agreements option
from no to yes (Example 3-20) and press Enter twice to start the installation.
[Entry
Fields]
* INPUT device / directory for software .
* SOFTWARE to update _update_all
PREVIEW only? (update operation will NOT occur) no
COMMIT software updates? yes
SAVE replaced files? no
AUTOMATICALLY install requisite software? yes
EXTEND file systems if space needed? yes
VERIFY install and check file sizes? no
DETAILED output? no
Process multiple volumes? yes
ACCEPT new license agreements? yes
Preview new LICENSE agreements? no
WPAR Management
Perform Operation in Global Environment yes
Ensure that you downloaded the required uDAPL level from the IBM Fix Central
website before you complete the instructions in this section. For more
information about required the uDAPL level, check the installation prerequisites
for the DB2 pureScale feature on AIX in the IBM DB2 10.1 Information Center.
[Entry Fields]
* INPUT device / directory for software [.]
158 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
3. Ensure that you change the Accept new license agreement value to Yes
(Example 3-22) and press Enter to start the installation.
[Entry
Fields]
* INPUT device / directory for software .
* SOFTWARE to install [_all_latest]
PREVIEW only? (install operation will NOT occur) no
COMMIT software updates? yes
SAVE replaced files? no
AUTOMATICALLY install requisite software? yes
EXTEND file systems if space needed? yes
OVERWRITE same or newer versions? no
VERIFY install and check file sizes? no
Include corresponding LANGUAGE filesets? yes
DETAILED output? no
Process multiple volumes? yes
ACCEPT new license agreements? yes
Preview new LICENSE agreements? no
WPAR Management
Perform Operation in Global Environment yes
Perform Operation on Detached WPARs no
Detached WPAR Names [_all_wpars]
Remount Installation Device in WPARs yes
Alternate WPAR Installation Device []
4. Verify that your system has the correct uDAPL and InfiniBand file sets by
running the following command. The command output varies depending on
the different AIX version, Technology Level, and service pack level. The
sample output shown in Example 3-23 is based on AIX V7.1 Technology
Level 1 and SP 3.
lslpp -l bos.mp64 devices.chrp.IBM.lhca.rte
devices.common.IBM.ib.rte udapl.rte
Path: /etc/objrepos
bos.mp64 7.1.1.3 COMMITTED Base Operating System 64-bit
Multiprocessor Runtime
devices.chrp.IBM.lhca.rte 7.1.0.0 COMMITTED Infiniband Logical HCA Runtime
Environment
devices.common.IBM.ib.rte 7.1.1.3 COMMITTED Infiniband Common Runtime
Environment
udapl.rte 7.1.1.15 COMMITTED uDAPL
[Entry
Fields]
Network Interface Name ib0
INTERNET ADDRESS (dotted decimal) [10.10.0.34]
160 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Network MASK (hexadecimal or dotted decimal) [255.255.255.0]
IPV6 ADDRESS (colon separated) []
Prefixlength []
HCA Adapter [iba0]
* Adapter's port number [1]
Partition Key [0xFFFF]
MTU [65532]
Queue Sizes [4000]
QKey [0x1E]
Superpacket off
Interface Specific Network Options
('NULL' will unset the option)
rfc1323 [1]
tcp_mssdflt []
tcp_nodelay [1]
tcp_recvspace [262144]
tcp_sendspace [262144]
Current STATE up
Apply change to DATABASE only no
13.Run lsdev -C | grep ib to verify the InfiniBand subsystem and verify that the
InfiniBand components are in the Available state (Example 3-26).
Example 3-27 Verify that the InfiniBand ports and links are available
------------------------------------------------------------------
IB PORT 1 INFORMATION (iba0)
------------------------------------------------------------------
Global ID Prefix: fe.80.00.00.00.00.00.00
Local ID (LID): 003a
Local Mask Control (LMC): 0000
Logical Port State: Active
Physical Port State: Active
Physical Port Physical State: Link Up
Physical Port Speed: 5.0G
Physical Port Width: 4X
Maximum Transmission Unit Capacity: 2048
Current Number of Partition Keys: 1
Partition Key List:
P_Key[0]: ffff
Current Number of GUID's: 1
Globally Unique ID List:
GUID[0]: 00.02.55.00.70.1e.70.03
15.You can ping other hosts in the same IP subnet through InfiniBand interfaces
to verify the connection.
To add the host names and IP addresses to the /etc/hosts file, complete the
following steps:
1. Open the /etc/hosts file.
2. Add host names and IP addresses for all the servers in the cluster
(Example 3-28).
162 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
192.168.0.34 demom1
10.10.0.31 democf1-ib0
10.10.0.32 democf2-ib0
10.10.0.33 demom0-ib0
10.10.0.34 demom1-ib0
To generate SSH keys and set up SSH access for the root user without a
password, complete the following steps:
1. Ensure that OpenSSH is installed by running the following command:
lslpp -la "openssh.*"
The output should be similar as shown in Example 3-29.
3. Navigate to the /.ssh/ folder, and you should find two files. If you are using
RSA encryption, they should be the id_rsa and id_rsa.pub files. Copy the
id_rsa.pub file to other hosts in the cluster and append its content to the
/.ssh/authorized_keys file. You can accomplish that task by running the
following command:
cat id_rsa.pub >> authorized_keys
4. Ensure that you import the id_rsa.pub file from all the hosts and append its
contents to the authorized_keys file.
5. Copy the authorized_keys file under /.ssh/ to all other hosts in the cluster.
6. You can SSH to all the hosts (including itself) without a password now
(Example 3-31).
164 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
To assign a PVID and synchronize it on all hosts, complete the following steps:
1. Run lspv to list the disks and PVIDs (Example 3-32).
4. Remove the same hdisk device on all other hosts by running the
following command:
rmdev -dl <disk_name_for_the_same_shared_disk>
For example, to remove hdisk2, run the following command:
rmdev -dl hdisk2
Run the lspv command again, and you should find the hdisk2 disk is removed
from the list (Example 3-34).
6. Compare the hdisk2 PVID from all hosts and ensure that they are all
the same.
Example 3-36 Check that the IOCP module is installed on the system
Fileset Level State Description
-------------------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.iocp.rte 7.1.0.15 APPLIED I/O Completion Ports API
Path: /etc/objrepos
bos.iocp.rte 7.1.0.0 COMMITTED I/O Completion Ports API
166 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
3.3.9 Allocating storage
The following storage requirements must be met before you install the DB2
pureScale feature.
Allocate the following local disk space on each host:
– 3 GB for the extraction directory.
– 3.5 GB for the installation path.
– 5 GB for the /tmp directory.
– 1 GB for the instance home directory.
– 5 GB for the /var directory.
– 1 GB for the /root directory.
Allocate the following shared disk space:
– 10 GB for the instance shared files.
– The data space depends on your application needs.
– The logs space depends on the expectant number of transactions and the
applications logging requirements.
To create the required groups and users, complete the following steps:
1. Run the following commands to create the DB2 instance owner group and
fenced user group.
– mkgroup id=999 db2iadm1
– mkgroup id=998 db2fadm1
2. Run the following commands to create DB2 instance users and fenced users
that belong to each group. Change the user ID or home directory if needed.
– mkuser id=1004 pgrp=db2iadm1 groups=db2iadm1
home=/db2home/db2sdin1 core=-1 data=491519 stack=32767 rss=-1
fsize=-1 db2sdin1
– mkuser id=1003 pgrp=db2fadm1 groups=db2fadm1
home=/db2home/db2sdfe1 db2sdfe1
The db2prereqcheck command comes with DB2. Before you can run
db2prereqcheck, ensure that you extracted the DB2 10.1 binary file on your
system. You also need read and write access to the system to
run db2prereqcheck.
168 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
To check the installation prerequisites by running db2prereqcheck, complete the
following steps:
1. Log in the system and navigate to the directory that contains the DB2 10.1
binary files.
2. Run db2prereqcheck -p -v 10.1.0.0 to check whether the system meets the
prerequisites for the DB2 pureScale feature.
3. After the command is run, the sample output should contain the validation
result (Example 3-37). As you can see, the command verifies several
prerequisites and tells you whether the system meets the
installation requirement.
Requirement matched.
170 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
To install the DB2 pureScale feature using the command-line interface (CLII)
method, complete the following steps:
1. Log in as root on node101.
2. Go to the folder that contains the DB2 installer tar file. Extract the installer
files by running the following command:
tar -zxvf <DB2 10.1 pureScale feature installer tar file path>
3. Create the DB2 instance administrator group db2iadm1 and the DB2 fenced
group db2fadm1 by running the following commands:
– groupadd –g 999 db2iadm1
– groupadd –g 998 db2fadm1
4. Create the DB2 instance user db2sdin1 and DB2 fenced user db2sdfe1 by
running the following commands:
– useradd –u 1004 –g db2iadm1 –m –d /home/db2sdin1 db2sdin1
– useradd –u 1003 –g db2fadm1 –m –d /home/db2sdfe1 db2sdfe1
5. Go to the folder that was extracted, and run the following the command to
install the DB2 pureScale feature on the installation-initiating host:
db2_install –t /tmp/db2_install.trc –l /tmp/db2_install.log
This command installs the DB2 database with the DB2 pureScale feature to
the /opt/ibm/db2/V10.1/ default directory. Add the -b <DB2DIR> parameter
to the db2_install command to change the installation directory. The
installation directory must be the same on all hosts in your cluster.
In the command, the -t parameter specifies the full path of the installation
trace file. The -l parameter specifies the full path to the installation log file.
Although both parameters are optional, the installation trace and log files can
help DB2 diagnose installation problems in the unlikely event that they occur.
6. Run the /usr/local/bin/db2ls command to verify the installation.
Use the following syntax to create a DB2 instance with one DB2 member and
one CF on the installation-initiating host:
db2icrt –d –m <member_hostname> -mnet <member_netname> –cf
<cf_hostname> -cfnet <cf_netname> –instance_shared_dev <disk name>
-tbdev <tb disk name> -u <DB2 fence user name> <DB2 instance user
name>
7. To add the host node102 as the second cluster caching facility to the DB2
pureScale cluster environment, run the following command:
db2iupdt –d –add –cf node102.puresclae.demo -cfnet node102-ib
db2sdin1
8. To add the host node102 as the second member to the DB2 pureScale
cluster environment, run the following command:
db2iupdt –d –add –m node102.purescale.demo -mnet node102-ib db2sdin1
Important: You have finished the DB2 pureScale installation. Continue to 3.5,
“Post-installation tasks” on page 187.
To install a DB2 database with the DB2 pureScale feature using the DB2 setup
wizard, complete the following steps:
1. Log in as root on node101. Navigate to the folder that contains the DB2
installer tar file. Extract the installer files by running the following command:
tar -zxvf <DB2 10.1 pureScale feature installer tar file path>
2. Navigate to the folder that was extracted, and run the following command to
start the DB2 Setup Launchpad:
./db2setup -l /tmp/db2setup.log -t /tmp/db2setup.trc
Where:
-t Specifies the full path of the installation trace file
-l Specifies the full path to the installation log file
Although both parameters are optional, the installation trace and log files can
help DB2 support diagnose installation problems in the unlikely event that
they occur.
172 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
3. In the left menu of the DB2 Setup Launchpad, click Install a Product, and
then click Install New. Follow the prompts to complete the wizard.
4. Review the DB2 pureScale feature in the introduction. Then, review and
accept the license agreement to continue.
5. Set the installation directory. The default installation directory is
/opt/ibm/db2/V10.1/ (Figure 3-60). The installation directory must be the
same on all hosts in your cluster.
174 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
7. Specify the location of DB2 Information Center (Figure 3-62).
176 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
9. Set the DB2 instance owner (Figure 3-64). Select New user. Then, enter
db2sdin1 as the user name and db2iadm1 as the instance owner group. In a
DB2 pureScale environment, this user and group are created on all hosts in
the cluster.
178 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
11.Set up a DB2 Cluster File System (Figure 3-66). Enter the location of your
shared disk partition device. The shared disk partition is where your DB2 files
are (SQLLIB), and the disk path is a path such as /dev/dm-1. The cluster
services tiebreaker is on a path such as /dev/dm-0.
Important: Ensure that the device path matches the output of the
multipath -l command, The minimum disk size for the tiebreaker
is 25 MB.
180 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
b. Select the cluster interconnect name upon validation of any host by the
DB2 setup wizard (Figure 3-68).
Figure 3-68 Select the cluster interconnect name for the second node
182 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Figure 3-70 shows the second added host name in the host list.
13.Review the summary, and then click Finish to begin the installation.
184 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Running db2iupdt to add extra members and cluster caching facilities to the
cluster. The db2iupdt command copies the DB2 product to the new host and
creates a member and a cluster caching facility.
3. Navigate to the directory that was extracted, and run the following command
as root to install the DB2 pureScale feature on the installation-initiating
host (IIH):
./db2_install –t /tmp/db2_install.trc –l /tmp/db2_install.log
Example 3-40 shows the manual installation panel.
5. Use the following syntax to create the DB2 instance on the DB2 pureScale
feature product. A member and a CF are required when you create
the instance.
db2icrt –d –m <member_hostname> -mnet <member_netname> –cf
<cf_hostname> -cfnet <cf_netname> –instance_shared_dev <disk name>
-tbdev <tb disk name> -u <DB2 fence user name> <DB2 instance user
name>
For example, if you want to create a member on the demom0 host and a CF
on the democf1 host, run the command shown in Example 3-42.
6. To add the demom1 host as the second DB2 member to the DB2 pureScale
cluster environment, run the following command:
db2iupdt –d –add –m demom1 -mnet demom1-ib0 db2sdin1
7. To add the democf2 host of the standby cluster caching facility to the DB2
pureScale cluster environment, run the following command:
db2iupdt –d –add –cf democf2 -cfnet democf2-ib0 db2sdin1
186 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
8. After you create the DB2 instance, verify its creation by running db2start
(Example 3-43).
Attention: Complete this task from one host in your DB2 pureScale cluster.
5. Run the queries shown in Example 3-47 to verify that the database is
created successfully.
188 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
CUSTOMER DB2SDIN1 T 2012-03-11-17.24.10.409045
DEPARTMENT DB2SDIN1 T 2012-03-11-17.24.07.339562
DEPT DB2SDIN1 A 2012-03-11-17.24.07.490265
EMP DB2SDIN1 A 2012-03-11-17.24.07.631344
EMPACT DB2SDIN1 A 2012-03-11-17.24.08.255705
EMPLOYEE DB2SDIN1 T 2012-03-11-17.24.07.492346
EMPPROJACT DB2SDIN1 T 2012-03-11-17.24.08.199933
....
46 record(s) selected.
db2sdin1@node101:/root> db2 "select count(*) from employee"
1
-----------
42
1 record(s) selected.
Note: Complete this task from one host in your DB2 pureScale cluster.
2. Create two shared file systems for the DB2 data and log:
– The shared file system for the DB2 data uses the 500 GB disk and is
mounted at /db2fs/db2data.
– The shared file system for the DB2 log uses the 250 GB disk and is
mounted at /db2fs/db2log/.
Run the following command as root to create a file system:
/opt/ibm/db2/V10.1/bin/db2cluster -cfs -create -filesystem <file
system name> -disk <storage path> -mount <mount point>
The commands and output looks similar to Example 3-49.
190 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
3. List all the file systems on your server by running the following command:
db2cluster -cfs -list -filesystem
Example 3-50 shows that there are three shared file systems:
– db2fs1
– db2data
– db2log
Attention: Complete this task from one host in your DB2 pureScale cluster.
4. DB2 picks up the new parameter dynamically and any new databases are
created on the new database path by default. Execute the command shown in
Example 3-53. The default database path is now /db2fs/db2data. Now, all
databases created are placed under this path.
Attention: Complete these tasks from one host in the DB2 pureScale cluster.
To change the log file path, create the database first, and then change the
NEWLOGPATH parameter to tell DB2 to use the new path for the log files. Use the
SAMPLE database as the example in this section.
192 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
2. Connect to the SAMPLE database by running the command shown
in Example 3-54.
Attention: Complete this task from one host in the DB2 pureScale cluster.
194 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
-- ---- -----------------------------------------------------------
-------
0 MEMBER STARTED node101 node101 NO 0 0
node101-10gige
1 MEMBER STARTED node102 node102 NO 0 0
node102-10gige
128CF PRIMARY node101 node101 NO - 0
node101-10gige
129CF CATCHUP node102 node102 NO - 0
node102-10gige
HOSTNAME STATEINSTANCE_STOPPEDALERT
-------- --------------------------
node102 ACTIVE NO NO
node101 ACTIVE NO NO
Important: Repeat this step for other CFs as well, for example, CF 129.
3. List all the file systems by running db2cluster -cfs -list -filesystem
(Example 3-63).
4. Discover information about all the disks in the file system, and note the path
names for the corresponding file systems being used in DB2 (Example 3-64).
196 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
5. Run tsprinquiry as root to discover information about the disk
(Example 3-65). The devices should correspond to the output given in step 4
on page 196. Save the output to the /var/mmfs/etc/prcapdevices file.
Ensure that you save the output on all hosts in your cluster.
198 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
4
To query the overall state of a cluster, run db2instance -list, which returns an
output similar to that shown in Example 4-1.
Example 4-1 Sample output of db2instance -list showing the overall cluster state
ID TYPE STATE HOME_HOST CURRENT_HOST ALERT PARTITION_NUMBER LOGICAL_PORT NETNAME
-- ------ ------- --------- ------------ ---- ---------------- ------------ -------
0 MEMBER STARTED node102 node102 NO 0 0 node102
1 MEMBER STARTED node103 node103 NO 0 0 node103
128 CF PRIMARY node102 node102 NO - 0 node102
129 CF PEER node103 node103 NO - 0 node103
200 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
ALERT Indicates whether an alert is raised against the
component. For more information about why an alert
might be raised for a component, see “Interpretation
of DB2 status information” on page 236.
CURRENT_HOST Represents the host that a component is currently
on. It is important to understand that when a
member is performing crash recovery, its current
host might differ from its home host. As such, this
information can be a vital piece of information when
assessing issues or problems with a cluster.
INSTANCE_STOPPED Indicates whether the instance on the host
is stopped.
For example, if you want to start a cluster CF with ID 129, run the
following command:
db2start cf 129
You cannot stop the primary cluster CF if you do not have a secondary cluster
caching facility in the PEER state. A FORCE option stops the primary cluster CF if
you do not have a secondary cluster caching facility in the PEER state; however,
this option triggers a Group Restart of the database instance.
You can stop the secondary cluster CF by using the FORCE option, even if any of
the following situations are true:
There are active members in the instance.
The primary cluster caching facility contains dirty pages.
The primary cluster caching facility contains locks.
For example, if you want to stop the secondary CF in a cluster with ID 129 and
ensure that the CF is in the PEER state, run the following command:
db2stop cf 129
2 record(s) selected.
202 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Starting a member
When starting a member, the database manager starts the member on the host
and on any idle processes that are required for crash recovery. After the member
is started successfully, it is introduced to the cluster and is available to accept
client connections.
For example, if you want to start member with ID 2, run the following command:
db2start member 2
Stopping a member
Stopping a member stops the member but keeps other instance processes on
the host up and running, implying that any other member or cluster CFs on the
same host are not affected. However, when you perform maintenance, stopping
a member is not the only prerequisite for performing maintenance on a host,
because the host can remain a viable failover target for other members that must
perform crash recovery. For more information about what processes you need to
stop for host maintenance, see 4.3.1, “Performance monitoring” on page 219.
Similar to stopping a cluster CF, there are important conditions to consider when
stopping a member. You cannot stop a member if there are any active database
connections on the member. You also cannot stop a member if the member is in
a restart light mode and has not yet completed member crash recovery. These
conditions prevent the use of the db2stop command. You can stop the member
by using the FORCE option, but use extreme caution when using this option. Do
not stop a member that is undergoing crash recovery.
For example, if you want to stop a member with ID 2, run the following command:
db2stop member 2
2 record(s) selected.
Activating a database
To explicitly activate a database on all active members in a DB2 pureScale
instance, run the following command:
db2 activate database [database-name]
For example, if you want to explicitly start a database called test, run the
following command:
db2 activate database test
Deactivating a database
Even if you have no users connected to the database or if the last user
disconnects, the database remains activated until an explicit deactivate
database command is run.
204 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
For example, if you want to deactivate a database named test, run the following
command:
db2 deactivate database test
For example, if you wanted to deactivate member 2 from the same database, run
the following command:
db2 deactivate database test member 2
Quiescing a member
You might need to perform maintenance on a member in the DB2 pureScale
instance. For example, operating system updates or hardware updates might be
required over time. To ensure the least amount of impact to running transactions,
DB2 offers an optional quiesce parameter that drains current activity that is
running against a specific member.
The quiesce parameter also has an optional timeout value, specified in minutes,
that can be used to ensure that the current activity is finished in a timely manner.
The timeout parameter includes the following values:
If you specify a timeout value when you are quiescing a member,
applications have up until that specified timeout value to conclude their units
of work. After the timeout is reached, the remaining connections are
forced off.
Thus, depending on the urgency to remove the member from the instance, you
can elect to select the criteria that meets your wanted expectations.
For example, if you want to perform some minor maintenance to the hardware on
a member with ID 1 but you want to give all current connections or transactions
30 minutes to conclude before they are forced off, run the following command:
db2stop member 1 quiesce 30
Quiescing a database
If you need to remove all users from a specified database to perform
maintenance tasks, you can place your database in quiesce mode. While
quiesced, only users that have the appropriate permission can access the
database and its objects. Any other users that attempt to access the database
are prompted with a message that states that the database is quiesced.
You can run quiesce db on any member. The database manager ensures that
the database is quiesced based on the user’s specifications. For example, if a
database administrator wants to place a database in quiesce mode immediately,
the DBA uses the immediate option. The database manager then forces all
current transactions to terminate immediately, rolling back any uncommitted
transactions and ensuring that no new requests to process transactions or
connections are accepted. Thus, just like quiescing a member, you can elect
when the database is quiesced and how to handle all current transactions.
After the database is in a quiesced state, the database remains in this state for
all members until you run an explicit unquiesce db command, ensuring that the
database remains in a quiesced state until it is explicitly unquiesced by you.
206 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Important: A connection must be made to the database before a quiesce
operation can be run. The default behavior when a quiesce command is run is
to force off all connections. If this is not the behavior that you want, specify
another option that meets your criteria. For example, you can specify a
timeout period to allow all current connections or transactions to potentially
finish their unit of work before being forced off.
After the database is successfully unquiesced, the database is accessible for all
members and attempts to connect to the database by clients can proceed.
Quiescing an instance
An instance in DB2 can also be placed into quiesced mode. When the instance is
placed in to this state, any databases that are in the instance are also placed into
the quiesce state. Furthermore, if an instance is in a quiesced state, any
database that is within the instance cannot be explicitly quiesced. You must first
unquiesce the instance before interacting with any dependent database.
For example, Paul, the system administrator wants to quiesce the instance
named db2inst1, while allowing a user named Doug to access the database.
Furthermore, Paul does not want to wait for all transactions to commit and wants
to force all connections immediately. To accomplish these tasks, Paul runs the
following command:
db2 quiesce instance db2inst1 user doug immediate force connections
For example, when Paul, the system administrator, completes all the relevant
tasks against the instance and wants to bring the instance named db2inst1 back
online. Paul runs the following command:
db2 unquiesce instance db2inst1
4.2 Maintenance
Regardless of the type of environment that you have deployed, some type of
maintenance is required, whether it is adding more space to the file system,
adding or removing a member or CF, applying security patches to the operating
system, and so on. This section provides an understanding of the various
maintenance tasks that can be performed against a DB2 pureScale cluster.
Important: Any time you modify the topology of a DB2 pureScale environment
by adding or removing a member, you must take an offline backup before you
can access the database. Any attempt to access the database before an
offline backup results in a warning. The warning notifies the user that the
database is in a backup pending state. You can, however, add or remove
multiple members without having to take a backup after each successive
change to the topology of a cluster.
208 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Adding or removing a member
One maintenance task that you might encounter is the necessity to add or
remove a member from your instance. When you add a member to your DB2
pureScale cluster, only a few simple pieces of information are required. The host
name and cluster interconnect name must be identified for the additional
member. The DB2 pureScale feature instance update command simplifies the
addition by installing the required binary files and applies any necessary licenses
on the new host.
In addition to the binary files installation, the command verifies that the
prerequisites are met on the new host before it begins this process to ensure a
high degree of success. This approach is a simplified approach that reduces the
number of manual tasks the DBA would otherwise perform on every host.
For example, if you have a host name named purescale-mem1 with instance
named db2inst1, run the following command to remove the member from
the instance:
db2iupdt -drop -m purescale-mem1 db2inst1
For example, if you want to add another cluster CF with the host name
purescale-cf2 and cluster interconnect net names cf2-ib0 and cf2-ib1 to an
existing instance named db2inst1, run the following command:
db2iupdt -add -cf purescale-cf2 -cfnet cf2-ib0, cf-ib1 db2inst1
You can remove a cluster CF from the instance by running a similar command
and specifying the drop option instead of the add option. Before you run the
command, you must ensure that this cluster CF is not the last cluster CF in the
cluster and that you stopped all DB2 processes on the host by running a db2stop
command. DB2 prevents you from dropping the last CF from the DB2 pureScale
instance. After the CF is dropped, you can then remove the binary files, if this
was the last component on the host.
For example, if you want to drop the secondary cluster CF and ensured that all
the processes are stopped (by running a db2stop command) on the
purescale-cf2 host name on the db2inst1 instance, run the following command:
db2iupdt -drop -cf purescale-cf2 db2inst1
210 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Putting a host in to maintenance mode
In this chapter, we explained how to stop and quiesce a member from an
instance to perform maintenance tasks. Putting a member into maintenance
mode is slightly different. This method ensures that the member or CF (or both)
are not restarted on the host on which you are performing the maintenance and
that the host is not a viable host on which to perform crash recovery.
Maintenance mode also stops the cluster manager and the cluster file system.
When putting a host into maintenance mode, consider the following items:
Do not place the hosts of both of the cluster CFs into maintenance mode at
the same time. At least one active cluster CF for the DB2 pureScale instance
must remain operational.
Do not place all hosts with members into maintenance mode at the same
time. At least one active member for the DB2 pureScale instance must
remain operational.
Do not put more than 50% of the hosts in the DB2 pureScale instance in to
maintenance mode at the same time. Operational quorum rules require that
at least 50% of hosts in the cluster are active.
Furthermore, a host cannot enter maintenance mode if any DB2 processes are
still active on the host.
The host is now in maintenance mode and any operation to update the operating
system or hardware can be done. Upon conclusion of any update, you must
reintegrate the host and any relevant DB2 pureScale component that is on the
host back into the cluster. Use the following process (which is not the opposite of
the steps used to put the host into maintenance mode):
1. Restart the cluster manager service so that the host can reintegrate with the
DB2 cluster. To start the cluster manager service, you must exit maintenance
mode by running the following command:
db2cluster -cm -exit -maintenance
After you start the cluster manager service, the cluster file system restarts on
its own. If, for some reason, the cluster file system does not restart, run the
following command to make it restart:
db2cluster -cfs -exit -maintenance
2. With all important background processes started and the host itself now out of
maintenance mode, integrate the DB2 pureScale components back into the
instance. Run the following command to notify DB2 that the host can be
reintegrated into the cluster:
db2start instance on [host-name]
3. Finally, start any relevant DB2 pureScale components by running the
following command. In this case, the member or CF needs to be resumed.
db2start member [member-id]
212 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
To place your entire cluster into maintenance mode, complete the
following steps:
1. As the instance user, stop the database manager on all hosts by running the
appropriate db2stop command. You can either stop the instance gracefully
after disconnecting all applications or you can use a quiesce option to drain
connections as necessary.
2. Stop the instance on all the hosts by running the following command once for
each host:
db2stop instance on [host-name]
This command can be run by the DB2 pureScale instance user on any of the
hosts. In other words, you do not need to be logged in to the host that will be
stopped for this command to work. Do not forget to do this step for every host
that belongs to the cluster.
3. Place both the cluster manager and cluster file system services in
maintenance mode by running the following commands:
– db2cluster -cm -enter -maintenance -all
– db2cluster -cfs -enter -maintenance -all
Placing the cluster manager into maintenance mode stops any potential
automation of DB2 components, and prevents the services from restarting
accidentally. Placing the cluster file system service in maintenance mode
ensures that the host cannot interact with the shared storage and allows the
kernel module used by the shared storage to be unloaded if necessary.
4. After you complete your updates, reintegrate all components by following the
same logic that was applied to individual hosts. Start by exiting maintenance
on the cluster manager, followed by the cluster file system (if needed), and
then run db2start instance on [hostname] for all hosts before running
db2start to restart the DB2 pureScale instance.
The disk is added to the shared storage file system and is available to be used by
the DB2 pureScale cluster. When a disk is added to the file system, it is used
immediately. As a result, consider rebalancing the file system at a time when it is
more convenient, because rebalancing is an I/O-intensive operation. For more
information, see “Rebalancing a file system” on page 215.
To remove a specific disk from the shared storage, run the following command:
db2cluster -cfs -remove -filesystem [filesystem-name] -disk [disk-name]
Upon running the command, the disk is successfully removed from the shared
storage file system if there are no errors.
214 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Important: Disk removal is an I/O-intensive operation. Removal of a disk
requires that any data held on that disk be moved to the remaining disks in the
file system. If there is not enough space, the disk is not removed. After you
remove the disk from the file system, you can remove it immediately from the
operating system or reuse it for other purposes.
The removal of a disk from the shared storage file system requires a
rebalancing operation to ensure that the file system is balanced over all the
remaining disks in the file system.
AIX has physical processors that are assigned to an LPAR and virtual processor
that the operating system uses. The physical processors that are assigned can
never be more than the number of virtual processors defined for the operating
system. If you need to use more physical processors than are assigned, you
need to have enough virtual processors assigned to the operating system. If you
do not, you must reboot the system to activate any extra processors. This task
can be accomplished in a rolling fashion through the DB2 pureScale cluster so
that you do not need to shut down DB2 completely to accomplish this task.
Linux
You can add extra capacity for a member that is on a Linux operating system, but
the process is not as dynamic. Linux does not use the concept of virtual
processors, so if you want to add additional processors to the server, you must
shut down the host to add physical processors to the host, and then activate the
extra capacity as needed. If the extra processors are already on the system, it
might be a boot option that you need to adjust, after which you can then roll
through the members in the DB2 pureScale instance to activate these
extra processors.
AIX
When allocating additional memory to be used by a member on AIX, the increase
of capacity is dynamic. Thus, the server does not need to be rebooted, and the
member can slowly start using the additional memory. However, if you are
removing memory from a member, this process requires that you first stop the
member by running the db2stop member command.
216 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
After you stop the member stopped, you can change the LPAR memory
allocation accordingly and then restart the member on the LPAR. Memory
de-allocation requires that the memory to be de-allocated is not in use by the
LPAR. Thus, you need to shut down the member from the LPAR from which the
memory will be removed.
Linux
In most instances, adding additional memory in Linux requires physically
installing more memory on the host that can be used by DB2. This situation
means that the server must be shut down to perform this task. When removing
memory from a member, you can adjust the memory allocations by using the
instance_memory configuration parameter, but this process is a slow,
progressive decrease coordinated by the Self-tuning Memory Manager (STMM)
to ensure stability. This situation also assumes that the removal is not a physical
removal of memory from the host. If you plan to remove physical memory from a
Linux host, you must shut down the associated DB2 member before you can
remove the physical memory.
Backup
Backing up your database should be part of basic, regular maintenance on any
DB2 instance, regardless of the DB2 pureScale feature. This maintenance
ensures that you can restore your database if there is catastrophic failure.
To back up a database, run the backup command. For example, if you want to
perform a backup of a database called sample, run the following command:
backup db sample
Restore
If a catastrophic failure cannot be resolved, you must restore your database back
to a healthy state. Similar to the backup process, a single restore db command
can restore the database and member-specific metadata for all members. There
is no need perform additional restore operations on any other member to restore
the cluster.
For example, if you wanted to restore a database named test, run the following
command from any of the hosts:
restore db test
218 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
4.3 Monitoring
The DB2 pureScale feature offers a flexible, highly available database
environment. With this type of environment comes the necessity to monitor its
functionality and performance.
You can use functional monitoring to become aware of possible issues and areas
of concern. Although in most cases issues in a DB2 pureScale cluster can be
contained automatically by DB2 with no manual intervention required, there are
situations where this recovery automation can potentially mask issues that are
occurring, thus leading to unwanted performance.
For example, one problem that can impact your cluster is a hardware-related
issue with one of your hosts. If you are aware of the issue, rectifying the problem
is easily manageable, and in most cases you can quickly bring your host back to
a healthy state. However, if you are unaware of the underlying issue and it goes
unrecognized, DB2 recovery automation handles this problem by failing over to
another host. This example takes into account only a single failure, so imagine a
scenario where the troubled host repeatedly fails. DB2 then expends many
cycles to provide recovery automation. Therefore, actively monitoring your
environment can aid in discovering problems that are occurring so that you can
address them before they become an issue.
You can use performance monitoring to assess the performance and capacity of
your cluster. You cannot fine-tune performance only for the present, but also
accurately assess capacity and requirements for the future.
As the database administrator, you can use table functions and administrative
views to get information that you need. Within DB2 itself, there are defined sets
of table functions that use in-memory monitoring elements to provide detailed
information about any specific point in time. The DB2 pureScale feature extends
the existing DB2 monitoring capabilities by letting you view specific aspects of
the cluster caching facilities and members in a DB2 pureScale instance.
You also can use tools such as IBM Data Studio or Optim™ Performance
Manager to assist in daily tasks and monitor your DB2 pureScale instance.
However, in a DB2 pureScale cluster, knowing the buffer pool hit ratio does not
provide enough information to accurately assess a cluster’s performance. Two
additional hit ratios provide more information when dealing exclusively with a
DB2 pureScale environment:
The local buffer pool (LBP) hit ratio is a representation of requested pages
that are found in the memory of the member as opposed to having to request
the page from the group buffer pool or retrieve it from disk.
In a DB2 pureScale cluster, if a page cannot be found in the LBP, the member
requests the page from the group buffer pool (GBP). A low LBP hit ratio can
indicate performance issues. Allocating additional memory to the local buffer
pool might help, because more pages can be cached locally, thus improving
the LBP hit ratio.
220 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
The group buffer pool (GBP) hit ratio is a representation of pages that are
requested by members to the CF that are found in memory.
If the page does not exist in the GBP, then there is no choice but to retrieve
the page directly from disk. A low GBP hit ratio can indicate that performance
can be improved by increasing the GBP memory allocation (if the workload
has a high write component). A low GBP hit ratio in a highly read-only
workload is not unusual. More pages can be cached locally on the GBP as
opposed to having to make I/O calls to the disk, which is the slowest
operation that can be done.
Example 4-4 Sample output of overall cluster logical and physical reads
POOL_DATA_L_READS POOL_DATA_P_READS
-------------------- --------------------
469325 19762
1 record(s) selected.
The following query returns the sum of all data pages that were resolved in
the local buffer pool and the sum of all data pages that were present in the
local buffer pool when a prefetcher attempted to access it for each member in
the DB2 pureScale instance:
SELECT MEMBER, SUM(POOL_DATA_LBP_PAGES_FOUND) AS
POOL_DATA_LBP_PAGES_FOUND, SUM(POOL_ASYNC_DATA_LBP_PAGES_FOUND) AS
POOL_ASYNC_DATA_LBP_PAGES_FOUND FROM TABLE(MON_GET_BUFFERPOOL('',
-2)) GROUP BY MEMBER
Example 4-5 shows the output of this query.
Example 4-5 Sample output of sum of data pages found within the LBP
MEMBER POOL_DATA_LBP_PAGES_FOUND POOL_ASYNC_DATA_LBP_PAGES_FOUND
------ ------------------------- -------------------------------
0 127427 21
1 130315 15
2 record(s) selected.
222 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
The following query returns the sum of group buffer pool-dependent data
pages that were attempted to be read from the group buffer pool because the
pages were either invalid or not present in the local buffer pool. The query
also returns the sum of group buffer pool-dependent data pages read into the
local buffer pool from disk were not found in the group buffer pool.
SELECT SUM(POOL_DATA_GBP_L_READS) AS POOL_DATA_GBP_L_READS,
SUM(POOL_DATA_GBP_P_READS) AS POOL_DATA_GBP_P_READS FROM
TABLE(MON_GET_BUFFERPOOL('', -2))
Example 4-6 shows the output of this query.
1 record(s) selected.
Leading practice
When you are assessing buffer pool performance, the first place to start is to
obtain the overall buffer pool hit ratio. This hit ratio is a great for tuning because it
is based on the entire cluster and not individual components. If the ratio does not
provide what you need, then you can start here to refine your search to locate
and resolve the problem.
To get a basic understanding of the overall cluster hit ratio, you must know the
logical reads and physical reads. When you have these two values, use the
following formula to determine the overall buffer pool hit ratio:
The second place to assess is the local buffer pool hit ratios. As each member in
the DB2 pureScale cluster has its own local buffer pool, a low LBP hit ratio in
general indicates that the member must defer to the group buffer pool to get a
page more often than it must get the page in the LBP. In general, LBP ratios
higher than 85% for data and 90% for indexes reflect great LBP performance.
LBP hit ratios of 70 - 80% for indexes and 65 - 80% for data reflect good
performance. If the ratios are below these values, it might indicate that the
memory allocations for the LBP need to be increased. However, merely adding
more memory for the LBP without adjusting the GBP can hinder
GBP performance.
To determine the LBP hit ratio, you can use the following formula:
((LBP Pages Found - Async LBP Pages Found) / Logical Reads) * 100
((GBP Logical Reads - GBP Physical Reads) / GBP Logical Reads) * 100
The following extra checks can help show whether the GBP is under performing
and whether adding additional memory to the GBP might help:
Determine if there is a low GBP dependency, in which case tuning the GBP
size might be less valuable than intended, if the following situation is true:
pool_data_l_reads > 10 x pool_data_gbp_l_reads
Determine if more than 25% of GBP reads are because of invalidated LBP
pages. If so, adding more memory to the GBP can potentially help with
performance. Use the following formula:
pool_data_gbp_invalid_pages > 25% of pool_data_gbp_l_reads
Locking
In any DB2 environment, efficient lock management plays a critical role in both
maintaining data integrity and high levels of concurrency. In a DB2 pureScale
cluster, lock control across members is managed by the global lock manager
(GLM), a component of the cluster CF. When a member requires a lock for an
object, the local lock manager (LLM) within the member works with the GLM to
attain the appropriate lock. Thus, the global lock manager mediates the
distribution of locks and is aware of the locks that are currently being used within
the cluster.
224 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
The following query illustrates the monitoring elements that were introduced into
the DB2 pureScale cluster and shows how you can effectively monitor your
cluster against lock requests between members:
SELECT MEMBER,SUM(LOCK_ESCALS_GLOBAL) AS LOCK_ESCALS,
SUM(LOCK_TIMEOUTS_GLOBAL) AS LOCK_TIMEOUTS, SUM(LOCK_WAIT_TIME_GLOBAL)
AS LOCK_WAIT_TIME, SUM(LOCK_WAITS) AS LOCK_WAITS FROM TABLE
(MON_GET_CONNECTION('',-2)) GROUP BY MEMBER
2 record(s) selected.
In addition to the previous example, there is a monitor report for lock waits called
monreport.lockwait that can be used to assess each lock wait that is currently in
progress. You can determine who the lock holder is, who the lock requestor is,
and characteristics of the lock itself. To access this report, run the
following command:
CALL monreport.lockwait()
=================================================================
Part 1 - Summary of current lock waits
-----------------------------------------------------------------
=======================================================================
Part 2 - Details for each current lock wait
-----------------------------------------------------------------------
-- Lock details --
LOCK_NAME = 040004000900B60C0000000052
LOCK_WAIT_START_TIME = 2012-04-24-23.54.48.306784
LOCK_OBJECT_TYPE = ROW
TABSCHEMA = DB2LCO
TABNAME = STOCK
ROWID = 9
LOCK_STATUS = W
LOCK_ATTRIBUTES = 0000000000480000
ESCALATION = N
AGENT_TID = 118
REQUEST_TYPE =
ACTIVITY_ID =
226 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
UOW_ID =
LOCAL_START_TIME =
ACTIVITY_TYPE =
ACTIVITY_STATE =
STMT_TEXT =
update stock set s_order_cnt=s_order_cnt+2 WHERE s_i_id = ? AND
s_w_id = ?
Page reclaiming
Page reclaiming is an important concept to understand when you are working
with the DB2 pureScale feature. It refers to the process where one member
requests and is granted a page of data that is being used by another member
before that member is finished with the page. When different members require
access to the same page, the cluster CF manages who gets access to the page
and when.
For this reason, a DBA can use many different monitoring elements to help gain
optimal performance. You can run the following monitoring queries examples
against a DB2 pureScale instance to gauge whether there are
performance concerns:
The following query captures the total page reclaims and total wait time
across all members:
SELECT
SUM(PAGE_RECLAIMS_X+PAGE_RECLAIMS_S+SPACEMAPPAGE_PAGE_RECLAIMS_X+SPA
CEMAPPAGE_PAGE_RECLAIMS_S)AS PAGE_RECLAIMS, SUM(RECLAIM_WAIT_TIME)
AS RECLAIM_WAIT_TIME FROM TABLE(MON_GET_PAGE_ACCESS_INFO('','', -2))
Example 4-9 shows the output of this query.
Example 4-9 Sample output of total page reclaims and total wait time in the cluster
PAGE_RECLAIMS RECLAIM_WAIT_TIME
-------------------- --------------------
52 934
1 record(s) selected.
The following query captures the overall shared and exclusive page
reclaim requests:
SELECT SUBSTR(TABNAME,1,8) AS NAME, SUBSTR(OBJTYPE,1,5) AS TYPE,
PAGE_RECLAIMS_X AS PGRCX, PAGE_RECLAIMS_S AS PGRCS,
SPACEMAPPAGE_PAGE_RECLAIMS_X AS SMPPGRCX,
SPACEMAPPAGE_PAGE_RECLAIMS_S AS SMPPGRCS FROM TABLE(
MON_GET_PAGE_ACCESS_INFO(NULL, NULL, NULL) ) AS WAITMETRICS ORDER BY
NAME
228 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Example 4-10 shows the output of this query.
Example 4-10 Sample output of overall shared and exclusive page reclaims
NAME TYPE PGRCX PGRCS SMPPGRCX SMPPGRCS
-------- ------- -------- --------- --------- -----------
STOCK TABLE 39 0 0 0
1 record(s) selected.
Leading practice
An excessive amount of page reclaims can cause much contention and directly
impact the performance of cluster. Thus, when it comes to assessing and
evaluating the amount of page reclaims, the rule of thumb is to see if you have
more than one reclaim per 10 transactions. This guideline might or might not
apply to your situation, because every environment has different factors.
If you determine that there are too many page reclaims and want to reduce them,
consider the following suggestions:
Smaller page sizes might eliminate the number of false sharing conflicts and
reduce reclaims on tables and indexes.
Small tables with frequent updates might benefit from increased PCTFREE.
This setup distributes rows over more pages, but also increases overall space
consumption.
As reclaims can affect metadata pages, increased extent size can reduce the
number of space map page reclaims.
2 record(s) selected.
230 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Example 4-12 shows the output of this query.
2 record(s) selected.
2 record(s) selected.
CF performance monitoring
The cluster CF plays a vital role in a DB2 pureScale cluster, so sometimes you
want to see CF server information for assessing possible hardware and
memory improvements.
You can use the following administrative view to see the server memory and the
processor load, which can be a vital piece of information. If you notice that your
CF is constantly running at the maximum processor level, your cluster might
benefit by moving to a more powerful server. However, do not confuse the
processor used by the CF and the processor that you see being used in a tool,
such as top or topas. The OS resource-monitoring tool cannot determine how
much of the CF polling is actual work versus how much of it is polling for work.
You must use the DB2 method to gauge the actual amount of work the CF
is performing.
232 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
CPU_USAGE_TOTAL 99 PERCENT 129
16 record(s) selected
Fortunately, you can use DB2 to monitor CF response times using metrics that
were introduced specifically for the DB2 pureScale feature. The two metrics that
are important to note are CF_WAITS, which represents the approximate number
of CF calls, and CF_WAIT_TIME, which represents the time accumulated when
communicating with the CF. To obtain an estimate of CF wait time per CF call, do
the following simple calculation:
CF_WAIT_TIME / CF_WAITS
Unfortunately, there is no set number that can determine if your cluster CF wait
time requires attention, as many different factors can be involved. However, one
good way to judge whether the number is acceptable is to gather a history to
assess if there has been a drastic change in your system’s normal operation. A
rough guideline for good response time for a busy system is less than 200 ms. If
your response times are higher than the 200 ms, adding another CF HCA can
potentially help lower the amount of CF wait time within the cluster.
There are two categories that a problem can fall under. Knowing these
categories can help you cut down troubleshooting time.
For example, if you have only a single cluster CF, its failure results in errors to
the application or the application can stall while waiting for DB2 to recover the
entire instance. A loss of all cluster CFs results in all members being restarted in
a procedure called a group restart, which is necessary to resynchronize the
information, both at the members and the CF, to a known state.
If you have more than one cluster CF but only one member, the loss of the
member also results in application errors or stalls while waiting for DB2 to restart
the member.
These examples produce information that can be found in the DIAGPATH directory
and indicate that the cluster CF restarted (in the first case) or that the member
restarted (in the second case).
In addition to the DIAGPATH, and as with previous versions of DB2, the operating
system logs can also hold information about the events that surround failures in
DB2. However, with the DB2 pureScale feature, there are some new directories
that should be considered as well.
234 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
The response is dependent on the problem itself. Many times, to get the correct
diagnostic tests, you must understand and define the problem itself.
Understanding and defining the problem might require talking with users to
understand what they see, looking at the DB2 pureScale feature diagnostic tools,
or monitoring the output to see if the problem description matches the end data.
Past problems
If you notice in the log files that a problem occurred in the past, it can still be
worthwhile to investigate it, so the same issue can be avoided in the future.
Finding answers to problems that occurred in the past is important in a
high-availability, fault-resistant environment because it can sometimes unmask
underlying issues.
If a problem occurs that can be handled by DB2, DB2 rectifies the issue. Whether
you lost a member or primary CF, DB2 restarts the member or cluster CF as
necessary. Even in cases where your components are repeatedly failing, DB2
tries to handle the issue without your intervention. You might not even know that
the problem occurred until you look at the logs, or someone mentions the
problem to you. This situation is why taking an active approach to monitoring
your cluster can be so beneficial.
Whether the problems are current or in the past, the diagnostic directories and
DB2 pureScale diagnostic tooling and monitoring output helps you determine the
causes and solutions.
Problem determination
Problem determination is not so much a science as it is an art. The method you
take to determine and resolve a problem depends on the issues encountered
and the amount and quality of the input provided by the user who is experiencing
the problem.
The following sections provide general suggestions for where to start looking for
problems that are reported by users. In all cases, common sense should prevail
and the logic you use should match the situation encountered.
Performance problems
Performance problems can be classified into multiple scenarios. Some
performance problems are because of a lack of resources, while other problems
are because of issues in the DB2 pureScale cluster.
If you think about how the DB2 pureScale feature works, there are issues that
can lead to performance problems, such as members that are not failing back to
their home host. The next few sections provide information about how to identify
DB2 issues in a DB2 pureScale instance. Then we look at some other operating
system areas that could be useful in problem diagnosis.
236 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Host statuses
Table 4-1 lists situations that you might discover when examining a host.
YES The host is active (it responds to system commands), but there might
be a problem that prevents it from participating in the DB2 pureScale
instance. For example, there might be a file system problem or a
network communication issue, or the idle processes that the DB2
pureScale feature requires for performing failovers might not be
running.
YES NO The host is active. The instance stopped explicitly on this host by the
administrator running the db2stop instance on hostname command
YES The host is active, but an alert exists for the host that has not been
cleared. The administrator explicitly stopped the instance.
YES The host is not responding to system commands. The instance was
not stopped explicitly by the administrator, but there is an alert. This
combination of status information indicates the abnormal shutdown of
a host. Such a shutdown might arise, for example, from a power failure
on a host.
YES NO This state is the normal state when the instance is stopped by the
administrator. Such a combination of status information might arise
when the host is being taken offline for the installation of software
updates.
YES The host is not responding to system commands. An alert exists for the
host that has not been cleared, but the instance was stopped explicitly
by the administrator (the system did not shut down abnormally).
YES An attempt to restart the member on the home host might have
failed, automatic failback is disabled, or crash recovery might have
failed. You need to resolve the problem and clear the alert
manually before the member can automatically fail back to its
home host. If automatic failback is disabled, you can manually
clear the alert and enable automatic failback by running the
db2cluster command.
ERROR YES The DB2 cluster services were not able to start the member on any
host. You need to resolve the problem and clear the alert manually
before attempting to restart the instance.
238 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Cluster caching facility statuses
Table 4-3 lists situations that you might discover when examining a cluster CF.
YES Not applicable. The CF cannot attempt to take on the primary role
with an alert condition set.
ERROR YES The CF could not be started on any host in the instance. You need
to resolve the problem and clear the alert manually before
attempting to restart the instance.
To view the component status, run the db2instance -list command, as shown
here, to see an overview of your cluster, paying special attention to component
status and state information:
db2cluster -cm -list -alert
Example 4-15 Sample output of the db2cluster -cm -list -alert command
Alert: Host 'node103' is INACTIVE. Ensure the host is powered on and
connected to the network.
Action: This alert will clear itself when the host is ACTIVE.
Impact: While the host is INACTIVE, the DB2 members on this host will
be in restart light mode on other hosts and will be in the
WAITING_FOR_FAILBACK state. Any CF defined on the host will not be able
to start, and the host will not be available as a target for restart
light.
This information provides the user with a good understanding of the problem and
the consequences of not resolving it.
240 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Important: When you request alert information, the most important and
severe alerts are presented at the top. As you move through the list, the
severity of the alerts decreases.
In most cases when an alert is raised, DB2 clears the alert after it is resolved. But
there are some situations when an alert must be cleared manually to ensure that
the administrator knows that the problem needs intervention. The alert remains
until the problem is resolved by an administrator and the alert is
cleared manually.
For example, after you resolve an issue with a member in the DB2 pureScale
instance with the ID 1, clear the alert by running the following command:
db2cluster -cm -clear -alert -member 1
The notify log file contains notification messages that pertain to the DB2
instance intended for the database administrator. In this file, you can find the
start and stop times of the db2 members, any restart light messages, and
database recovery messages.
Both log files allow for several levels of logging functionality. The more diagnostic
descriptions required (for example, log level 4), the more entries that are written
(potentially slowing down the system). The default is level 3, which shows errors
and severe messages but leaves out the informational message.
Example 4-16 shows the output of the db2pd -edus command. The output
presents the relevant DB2 processes on the given host. To replicate the software
failure, stop the 15529 process by running a kill -9 15529 command.
242 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
After you stop the ID 15529 process, the DB2 member restart is initiated. To
observe this process, run the db2instance -list command (Example 4-17).
Example 4-17 Sample output of the db2instance -list command when a member is stopped
ID TYPE STATE HOME_HOST CURRENT_HOST ALERT PARTITION_NUMBER LOGICAL_PORT NETNAME
-- ------ ------- --------- ------------ ---- ---------------- ------------ -------
0 MEMBER STARTED node102 node102 NO 0 0 node102
1 MEMBER RESTARTING node103 node103 NO 0 0 node103
128 CF PRIMARY node102 node102 NO - 0 node102
129 CF PEER node103 node103 NO - 0 node103
You can obtain more information by viewing the resource state associated with
the failed member by running the lssam command. As you can see in
Example 4-18, the failed member is in the Pending Online state, which means
that DB2 is in the process of restarting the member.
Example 4-18 Sample output of the lssam command to see the resource state of a failed
member
Pending online IBM.ResourceGroup:db2_db2lco_1-rg Nominal=Online
'- Pending online IBM.Application:db2_db2lco_1-rs
|- Offline IBM.Application:db2_db2lco_1-rs:node102
'- Pending online IBM.Application:db2_db2lco_1-rs:node103
DB2 restarts of this nature can be quick, and you might not notice the changes in
the state if you are not quick enough to capture them. You know that the member
has restarted when you recheck the PID of the process and it is not the same as
it was at the beginning of this exercise.
Example 4-19 shows an additional short snippet from the db2diag logs when the
member fails and then restarts back on its home host. DB2 recognizes the failure
and starts the cleanup process of the failed member.
Example 4-19 Snippet from db2diag showing events corresponding to the failed member
2012-03-29-02.51.07.605563-240 I26443E510 LEVEL: Event
PID: 22258 TID: 47128015876064 PROC: db2rocm 1 [db2lco]
INSTANCE: db2lco NODE: 001
HOSTNAME: node103
FUNCTION: DB2 UDB, high avail services, db2rocm_main, probe:1266
DATA #1: SQLHA Event Recorder header data (struct sqlhaErPdInfo),
PD_TYPE_SQLHA_ER_PDINFO, 80 bytes
After the cleanup process is complete, the member is restarted, the database is
reactivated, and it is starts accepting connections from clients after it is fully
recovered. Example 4-20 illustrates the return to a healthy state when a
db2instance -list command is run, which shows that the member is started.
Example 4-20 Sample output of the db2instance -list command showing member integration
ID TYPE STATE HOME_HOST CURRENT_HOST ALERT PARTITION_NUMBER LOGICAL_PORT NETNAME
-- ------ ------- --------- ------------ ---- ---------------- ------------ -------
0 MEMBER STARTED node102 node102 NO 0 0 node102
1 MEMBER STARTED node103 node103 NO 0 0 node103
128 CF PRIMARY node102 node102 NO - 0 node102
129 CF PEER node103 node103 NO - 0 node103
Also, you notice that the resource state that is associated with the member within
the resource group returns to a healthy online state when a lssam command is
run (Example 4-21).
Example 4-21 Sample output of the lssam command showing the healthy resource state
Online IBM.ResourceGroup:db2_db2lco_1-rg Nominal=Online
'- Online IBM.Application:db2_db2lco_1-rs
244 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
|- Offline IBM.Application:db2_db2lco_1-rs:node102
'- Online IBM.Application:db2_db2lco_1-rs:node103
Example 4-22 shows that after a db2instance -list command is run, the
secondary CF’s state changes from PEER to BECOMING_PRIMARY, indicating that it is
taking the appropriate actions to assume the role as the primary CF in the
cluster. Furthermore, as this takeover process is being conducted, the failed
primary CF is also reintegrating itself back into the cluster and assumed the role
of RESTARTING.
If you explore the snippet from the db2diag logs shown in Example 4-23, you
might gain a better understanding of the cleanup process by the failed CF and
the takeover process by the secondary CF. You can see the failed CF is in the
process of restarting, but is currently going through the clean-up process.
Example 4-23 Snippet from db2diag showing the cleanup process for the failed CF
2012-03-30-04.52.40.509678-240 I290053E540 LEVEL: Event
PID : 7620 TID : 47240765626688 PROC : db2rocme
128 [db2lco]
INSTANCE: db2lco NODE : 128
HOSTNAME: node102
FUNCTION: DB2 UDB, high avail services, db2rocm_main, probe:1266
DATA #1 : SQLHA Event Recorder header data (struct sqlhaErPdInfo),
PD_TYPE_SQLHA_ER_PDINFO, 80 bytes
Original timestamp: 2012-03-30-04.52.31.130952000
DATA #2 : String, 56 bytes
Example 4-24 shows that the primary role is initiated on the secondary CF.
Example 4-24 Snippet from db2diag showing the primary role initiated on the secondary
CF
2012-03-30-04.52.34.372318-240 I275608E392 LEVEL: Event
PID : 5645 TID : 47182079875392 PROC : db2rocme
900 [db2lco]
INSTANCE: db2lco NODE : 900
HOSTNAME: node103
FUNCTION: DB2 UDB, high avail services, db2rocm_main, probe:1266
DATA #1 : String, 59 bytes
/home/db2lco/sqllib/adm/db2rocme 1 PRIMARY db2lco 900 START
DATA #2 : String, 5 bytes
BEGIN
246 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
PID : 5645 TID : 47182079875392 PROC : db2rocme
900 [db2lco]
INSTANCE: db2lco NODE : 900
HOSTNAME: node103
FUNCTION: DB2 UDB, high avail services, db2rocm_main, probe:2178
DATA #1 : String, 59 bytes
/home/db2lco/sqllib/adm/db2rocme 1 PRIMARY db2lco 900 START
DATA #2 : String, 7 bytes
SUCCESS
Finally, you can observe that, as shown in Example 4-25, the failed CF restarts
and assumes the role of secondary CF in the cluster.
Example 4-25 Snippet from dbdiag showing the failed CF reintegration process
2012-03-30-04.52.43.356364-240 I292176E387 LEVEL: Event
PID : 8020 TID : 47284219590976 PROC : db2rocme
128 [db2lco]
INSTANCE: db2lco NODE : 128
HOSTNAME: node102
FUNCTION: DB2 UDB, high avail services, db2rocm_main, probe:1266
DATA #1 : String, 54 bytes
/home/db2lco/sqllib/adm/db2rocme 1 CF db2lco 128 START
DATA #2 : String, 5 bytes
BEGIN
stack
Use the stack parameter when you assess the state of the DB2 environment.
The stack trace files generated by this parameter can assist in troubleshooting
DB2. Stack files provide information about the functions that were being run by
each thread or process at the time the db2pd command was run. In most cases,
you must contact IBM Support to interpret and understand the files that are
generated.
cfinfo
Use the cfinfo parameter when diagnosing issues with a CF. Example 4-26
shows a sample of the output for this parameter.
Example 4-26 Sample output of the db2pd command with the cfinfo parameter
248 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Total Space (4KB) = 192256
Free Space (4KB) = 256
Frame Size (4KB) = 256
Configured Size (4KB) = 0
cfpool
The cfpool parameter gives database administrators the ability to monitor the
CF connection pool entry on the current member and its status, including
whether it is being used. It also can provide information about the number of
connections and HCA port mapping, which can help you validate that load
balancing between HCA ports is behaving as intended.
serverlist
The serverlist parameter can provide information about the available members
in the cluster and the relative priority of each available member. The higher the
priority number, the more likely connections and transactions for workload
balancing are sent to that host. Example 4-27 shows sample output from using
this parameter.
Example 4-27 Sample output of the db2pd command with the serverlist parameter
Server List:
Time: Fri Mar 30 04:48:18
Database Name: DTW
Count: 2
totalmem
The totalmem parameter can provide the total amount of memory allocated on a
DB2 host. It also can provide memory information for the member itself, and the
amount of reserved restart light memory that is pre-allocated on the host.
Example 4-28 shows a sample output from using this parameter.
Example 4-28 Sample output of the db2pd command with the totalmem parameter
For example, imagine that you notice, when running a db2instance -list
command, that one of your members is currently on another host in a
waiting_for_failback state. You go to the failed member, look at the operating
system logs, and notice that there was a message that concerns a network
failure. Based on this information, you can narrow down the issue to explicitly
check for hardware issues.
Thus, although the relevance of the system logs might not be useful when
addressing issues with DB2, they are always worth considering within your initial
assessment as a way to eliminate hardware and operating system problems.
On AIX, you can look through the errpt logs, and the syslog if it is configured.
On Linux, the equivalent files would be in the /var/log directory, and are
presented as the messages file.
250 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
5
252 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
5.2 Supported upgrade paths
The most important part of upgrading to DB2 10.1 is ensuring that the upgrade is
planned and supported. An unsupported upgrade can result in errors that cost
time and potentially force you to restructure the upgrade or even start over. The
following list of supported upgrades can help ensure that a plan is compliant with
the basic requirements for upgrading to DB2 10.1:
Upgrading directly to DB2 10.1 is supported from DB2 9.5, DB2 9.7, and
DB2 9.8 (even if there are multiple copies of DB2 on the server). Upgrading
from earlier releases requires you to first upgrade to DB2 9.5.
Upgrading to a DB2 10.1 non-root installation is supported from similar
non-root installations of DB2 9.5 and DB2 9.7. Upgrading from non-root
DB2 9.5 or DB2 9.7 installations to a DB2 10.1 root installation is
not supported.
Upgrading from a partitioned database environment with multiple database
partitions is supported.
Restoring full database offline backups from a version lower than DB2 10.1
copies is supported. Rolling forward logs from the previous version is not
supported. For a full list of backup and restore operations, review the RESTORE
DATABASE command.
This list of supported upgrades defines the fundamental rules that must be
followed to achieve successful results.
WSE (default type for DB2 Database server with local and Upgrade to a Workgroup Server
Workgroup Server Edition) remote clients Edition or an Enterprise Server
Edition instance is supported.
Upgrade to a stand-alone
instance creates a stand-alone
instance (Linux and UNIX only).
Upgrade to a client instance is
unsupported.
ESE (default type for DB2 Partitioned database server with Upgrade to an Enterprise Server
Enterprise Server Edition) local and remote clients or Edition instance is supported.
Enterprise Server Edition with Upgrade to a stand-alone or a
local and remote client Workgroup Server Edition
instance from single database
partition environments is
supported and creates a
stand-alone or Workgroup
Server Edition instance (Linux
and UNIX only). Upgrade to a
client instance is unsupported.
254 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
If you are adding the DB2 pureScale feature, you first must upgrade your
instance to Enterprise Server Edition. If you have a partitioned database server,
you must remove the partitions, except for the last one, before adding the DB2
pureScale feature. Support for adding the DB2 pureScale feature is available in
DB2 9.8; however, this chapter assumes that you upgraded to DB2 10.1 before
adding the DB2 pureScale feature to your instance.
Before you begin: Back up your databases and configuration settings before
starting the upgrade of your DB2 servers.
Tip: Remove deprecated functions early on and move to new functions for
your database products, applications, and routines to ensure that
functionality is enhanced to the latest releases and to help improve
overall performance.
2. After determining the feature changes you will be making, take time to plan
the logistics for modifying database applications and routines so that they run
successfully in DB2 10.1. Cross-reference all instances where deprecated or
unsupported routines are called and think about how they will be modified.
3. Set up a DB2 10.1 test server and create test databases against which to test
the database applications and routines.
4. If you plan to enable the DB2 pureScale feature, confirm that the database
meets the requirements for the DB2 pureScale feature.
As with any plan, separate the work into detailed tasks or subprocesses.
Consider the following subprocesses:
Upgrade prerequisites: Tasks to complete to ensure that the environment
supports the upgrade
Pre-upgrade tasks: A list of any changes that must be made to allow the
upgrade to occur
Upgrade tasks: A step-by-step plan for the upgrade
Post-upgrade tasks: Any other tasks that need to be performed after the
upgrade is complete
See the DB2 10.1 Information Center for additional resources, updated
information, instructional materials, white papers, and web casts about
upgrading to DB2 10.1:
http://pic.dhe.ibm.com/infocenter/db2luw/v10r1/index.jsp
256 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
5.4.1 Upgrading DB2 servers
To upgrade DB2 servers to DB2 10.1 on Linux and UNIX operating systems, you
must install a new DB2 10.1 copy. When it is installed, you need to manually
upgrade any existing instances and databases to the new copy.
Regardless of the instance bit size and whether you perform the upgrade from
DB2 9.5, DB2 9.7, or DB2 9.8 to DB2 10.1, you need to determine the tasks that
apply best to your particular environment. A successful upgrade requires that
you consider the base components that are related to a successful installation of
DB2 10.1. To achieve a successful upgrade, ensure that the following factors are
in place before you begin:
You have root access to your machines.
You meet the hardware and software installation requirements for DB2 10.1
described in 2.2, “Hardware requirements and considerations” on page 26
and 2.3, “Software requirements and considerations” on page 37.
You reviewed the disk space requirements described in 2.2.2, “Hardware
considerations” on page 31.
You performed any of the required pre-upgrade tasks described in 3.2,
“Configuring a Linux system to install the DB2 pureScale feature” on page 80
and 3.3, “Configuring an AIX system to install the DB2 pureScale feature” on
page 150.
Restrictions
Before starting the upgrade, it is important to ensure that the supported
configurations mentioned in 5.2, “Supported upgrade paths” on page 253 are
met. In addition to these requirements, keep in mind that on Linux and UNIX
operating systems, your existing 32-bit or 64-bit instances are required to
upgrade automatically to DB2 10.1 64-bit instances. The operating system and
DB2 10.1 database product that you installed together determine the instance
bit size.
General procedure
To upgrade a DB2 server to DB2 10.1, complete the following steps:
1. Log on to the DB2 server as root.
2. Ensure that a default gateway exists on the Ethernet network that is used by
the DB2 pureScale feature. If the gateway does not exist, the binary
installation of DB2 10.1 fails. You can check for a gateway by running
netstat -r.
3. Run db2setup.
4. If you are not planning to use the DB2 pureScale feature, select Install New
under the DB2 Enterprise Server Edition Version 10.1 option.
If you plan to use the DB2 pureScale feature, select Install New under the
DB2 Enterprise Server Edition Version 10.1 with the IBM DB2 pureScale
Feature option.
Ensure that you select all the add-on products that were installed in the
previous DB2 copy.
Note: You cannot use the “Working with Existing” option if you have the
DB2 pureScale feature installed already. If so, see 5.6, “Enabling the DB2
pureScale feature” on page 270.
5. Go through the installation panes. Read and accept the license. You are then
prompted for the directory in which you want to install DB2 10.1. You might
need to run db2rmln to remove the links added in to the /usr/lib directory by
DB2 in previous installations before continuing.
6. When presented with the option of creating a DB2 instance, select Do not
create a DB2 instance. When presented with the Host List pane, do not add
any hosts. You add the hosts that are used for the DB2 pureScale instance in
a later step.
With these steps completed, you can upgrade the previous DB2 (9.5, 9.7, or 9.8)
instances from the same installation path that you indicated during the DB2 10.1
installation. You can also upgrade your database administration server if you
want to keep the existing DAS configuration and use new functionality available
in DB2 10.1.
258 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
This general procedure covers the process of installing DB2 10.1 binary files on
the host that is upgraded to DB2 10.1. If you do not want to update clients at this
time, see 5.4.3, “Upgrading a DB2 instance” on page 261 for details about
upgrading the DB2 instance to Version 10.1. A more detailed explanation of
upgrading from DB2 9.5 and 9.7 to DB2 10.1 is presented in 5.5, “Upgrading
from DB2 9.5 or 9.7 to DB2 10.1” on page 267, along with an explanation of
upgrading from DB2 9.8 when the instance already has the
DB2 pureScale feature.
The current level of the client that you installed determines the way to upgrade to
DB2 10.1. You can directly upgrade to DB2 10.1 clients from DB2 9.5, 9.7, or 9.8.
If you have DB2 9.1 or earlier clients, you must upgrade to a DB2 9.5 client first.
To ensure that your upgrade goes successfully, confirm that the following
conditions are met:
You have root user authority.
You have SYSADM, SYSCTRL, or SYSMAINT authority and root access to
run db2iupgrade and the db2icrt.
You meet the installation requirements for DB2 database products. Some
operating systems require a 64-bit kernel.
You reviewed the supported connectivity between clients and DB2
database servers.
Important: You do not need to update all your DB2 clients at the same time.
You can still run older clients with DB2 10.1; however, your client cannot
access the new functionality until it is upgraded appropriately.
Complying with these criteria can help you achieve a successful upgrade to DB2
10.1 clients.
General procedure
The general procedure to upgrade a DB2 client to Version 10.1 is outlined here.
An upgrade is possible either by installing and creating a DB2 10.1 client
instance or by upgrading an existing client instance. Creating a DB2 10.1 client
instance is useful when you want to keep multiple client copies running on the
same machine.
These steps provide the general guidelines for upgrading the DB2 client by
upgrading an existing client instance:
1. Log on to the system with root user authority.
2. Install the appropriate DB2 10.1 client as a new copy by running db2setup,
and then select Install New on the Install a Product pane. If upgrading from a
DB2 9.5 or DB2 9.7 Data Server Client, install a new DB2 10.1 Data Server
Client. If upgrading from a previous Data Server Runtime client, install a new
DB2 10.1 Data Server Runtime client copy.
3. Upgrade your existing client instances by running db2iupgrade:
$DB2DIR/instance/db2iupgrade <InstName>
Where:
– DB2DIR refers to the location that is specified during the DB2 10.1
client installation.
– InstName refers to the login name of the client instance owner.
260 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
The default installation path for UNIX is the /opt/IBM/db2/V10 directory and
for Linux it is the /opt/ibm/db2/V10.1 directory.
A second method is to create a DB2 client instance. Run the following command:
$DB2DIR/instance/db2icrt -s client <InstName>
In this case, DB2DIR is set to the location that you specified during the DB2 10.1
client installation and InstName is the login name of the instance owner.
After upgrading the DB2 client to Version 10.1, remember to import the same
client connectivity environment you had previously, including the database
manager configuration parameter and DB2 profile registry settings. Run
db2cfimp with the configuration profile that you backed up as one of the
pre-upgrade tasks. After performing this command, compare the before and after
values to ensure that they are compatible with your application.
Restrictions
Before starting an upgrade, ensure that it fits within the supported configurations
described in 5.2, “Supported upgrade paths” on page 253.
General procedure
When you run the db2iupgrade command, the following actions occur:
1. The db2ckupgrade command is called. If it finds any condition that prevents
the upgrade from succeeding, the command fails and returns the DBI1205E
error code.
2. The installation path to the db2iupgrade binary is used to determine the level
of code to which the instance is upgraded.
3. The instance profile registry variables are upgraded. Global profile registry
variables that are created by the user are not upgraded.
4. The database manager configuration is updated, including updates to
configuration parameters such as the JDK_PATH.
5. If the audit facility is enabled, the db2audit.cfg audit configuration file
is updated.
6. The SSL parameter value in the SSLconfig.ini configuration file (if it exists)
is used to set the new database manager configuration parameters, and the
instance profile registry setting DB2COMM=SSL is updated.
When these actions are completed, you can upgrade the database
Note that you have not enabled the DB2 pureScale feature yet. This step is
performed after the database is upgraded to V10.1.
262 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
5.4.4 Upgrading the database
After you upgrade the instances to DB2 10.1, upgrade each database under
each instance. Before starting this process, ensure that each of these factors is
in place:
You have SYSADM authority.
All of the local databases that you want to upgrade are cataloged.
You installed DB2 10.1 and upgraded the instance to DB2 10.1.
One of the most helpful tools to make upgrades easier is the db2ckupgrade
command. It verifies that your database is ready for upgrade by
cross-referencing a list of conditions.
Tip: Run db2ckupgrade with the -l parameter to write warning messages for
certain conditions to a log file.
The db2ckupgrade command verifies that each of the following conditions for a
successful upgrade is true:
A cataloged database exists.
A database is not in an inconsistent state.
A database is not in a backup pending state.
A database is not in a restore pending state.
A database is not in a rollforward pending state.
Tables are not in a load pending state.
Understanding the checks that are performed and ensuring that your database is
compliant with them makes the process of upgrading much simpler.
Restrictions
Because they are directly related, the same restrictions that apply to the DB2
servers apply for a database upgrade. For universal conditions that specify the
types of upgrades that can be performed, see 5.2, “Supported upgrade paths” on
page 253.
General procedure
Before starting the procedure to upgrade a database to DB2 10.1, remove any
db2diag.log files and any existing dump files, trap files, and alert log files from
the directory indicated by the diagpath parameter. Removing these files can help
you more easily diagnose and isolate issues that might occur after the upgrade
process begins. After you remove these files, complete the following steps:
1. Log on to the DB2 server as the instance owner or a user with
SYSADM authority.
2. Recatalog the database by running CATALOG DATABASE:
db2 CATALOG DB database_name as database_alias
264 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
3. Run LIST DATABASE DIRECTORY to ensure that the database is in the list of all
cataloged databases in the current instance.
4. Initiate the upgrade by running UPGRADE DATABASE:
db2 UPGRADE DATABASE database-alias USER username USING password
In this example, database-alias refers to the name or the alias of the database
you want to upgrade and the user name and password needed to authenticate a
user with SYSADM authority. In addition to this command, you might want to
consider adding the REBIND ALL parameter, which specifies that a rebind of all
packages is performed during the upgrade.
Returns SQL1704N Database upgrade failed. One of the most common causes of upgrade failure
Reason code 3. is that the log file space is not large enough. After
increasing the log file size, run the UPGRADE
DATABASE command again. After it completes, reset
the value of the logfilsiz, logprimary, and
logsecond database configuration parameters.
Returns SQL1499W warning message followed by The UPGRADE DATABASE command failed to refresh
DM7535W warning message. the table space attributes in the catalog table.
However, the database still upgrades successfully.
Returns SQL1499W warning message followed by The UPGRADE DATABASE command failed to upgrade
ADM4003E warning. the DB2 Text Search catalogs or indexes because
of an error in a stored procedure.
Returns SQL1499W warning message followed by The UPGRADE DATABASE command failed to refresh
ADM7534W warning. the table space attributes in the catalog table.
However, the database still upgrades successfully.
Returns SQL1499W warning message followed by This warning is returned when you qualify or delimit
ADM4102W warning. with quotation marks the identifiers called NULL in
your SQL statements to avoid conflict with the
NULL keyword.
Returns SQL1499W warning message and writes This warning requires you to drop all references to
the ADM4106W warning message. the XML Extender user-defined data types and
drop all XML Extender database objects under the
DB2XML schema. The XML Extender was
discontinued starting with DB2 9.7.
Returns SQL1499W warning message followed by This warning requires you to create new
the ADM4105W warning message. WebSphere MQ functions for the XML data type by
running enable_MQFunctions with the -xml
parameter.
Returns the SQL1499W warning message followed This warning requires you to verify that the
by the ADM9516W warning message. indexrec configuration parameter is set to RESTART
and to run RESTART DATABASE to rebuild indexes
marked as invalid during the database upgrade. If
you do not do this action, the index rebuild starts
upon your first access to the table and you might
experience an unexpected degradation in
response time.
Returns SQL0473N error message. This warning requires you to reverse the database
migration and re-create all user-defined data types
that use a system built-in data type name with a
different name that is not restricted. When finished,
verify that your databases are ready for upgrade.
Returns ADM4003E error message. Requires an upgrade the DB2 Text Search catalog
and indexes manually. For details, see
SYSTS_UPGRADE_CATALOG and SYSTS_UPGRADE_INDEX.
Remember: If you use identifiers called NULL in an SQL statement for column
names, routine parameter names, or variable names, and if you do not fully
qualify or delimit these identifiers with quotation marks, the identifier name
might resolve to the NULL keyword instead. This resolution results in a change
in behavior from previous releases.
266 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
5.5 Upgrading from DB2 9.5 or 9.7 to DB2 10.1
As part of the upgrading a DB2 database server to DB2 10.1, you must also
upgrade your instances and databases.
To successfully upgrade from DB2 9.5 or 9.7, ensure that the following factors
are in place before you begin:
You have root user authority on the Linux and UNIX operating systems.
You installed any DB2 database add-on products that were installed in the
DB2 copy from which you are upgrading.
The following recommended conditions are met before the db2iupgrade
command is issued:
– On Linux and UNIX operating systems, there is 5 GB of free space in the
/tmp directory (where the instance upgrade trace file is written).
– If the upgrade is part of a process to enable the DB2 pureScale feature,
there is a configured default gateway on all hosts that is part of the
DB2 pureScale cluster.
– You gathered pre-upgrade diagnostic information to help diagnose any
problems that might occur after the upgrade. For details, see the
Gathering pre-upgrade diagnostic information section of the DB2
Information Center at the following website:
http://pic.dhe.ibm.com/infocenter/db2luw/v10r1/index.jsp
Important: This section does not explain the process of enabling the
DB2 pureScale feature. To enable it, upgrade instances and databases first,
and then complete the steps in 5.6, “Enabling the DB2 pureScale feature” on
page 270. Upgrade DB2 instances to Version 10.1 before the enabling the
DB2 pureScale feature.
5.5.1 Restrictions
Use the steps provided here to upgrade only from DB2 9.5 or DB2 9.7. As
always, the standard upgrade restrictions apply, as described in 5.2, “Supported
upgrade paths” on page 253. On Linux and UNIX operating systems, do not set
up the instance environment for the root user.
You can use the -not1 special case parameter with the db2ckupgrade command
for DB2 9.5 databases. If this parameter is omitted, the db2ckupgrade command
calls the db2IdentifyType1 command to identify type-1 indexes and to generate
a script to convert type-1 indexes to type-2 indexes for a specific database.
268 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Important: If you did not install all DB2 database add-on products that
were installed in the DB2 copy from which you are upgrading, the instance
upgrade fails and returns a warning message. If you plan to install these
products later or if you no longer need the functionality provided by these
products, use the -F parameter to upgrade the instance.
The db2iupgrade command calls the db2ckupgrade command with the -not1
parameter to verify that the local databases are ready for upgrade. The
update.log file is specified as the log file for the db2ckupgrade command, and
the default log file created for the db2iupgrade command is
/tmp/db2ckupgrade.log.processID. On Linux and UNIX operating systems,
the log file is created in the instance home directory. The db2iupgrade
command does not run if the db2ckupgrade command reports errors. Check
the log file if you encounter any errors.
5. Log on to the DB2 server as a user with sufficient authority to start the
instance, and then run db2start to start the instance.
6. After upgrading the existing DB2 9.5 or DB2 9.7 copy, the database log
directories automatically change.
Review the db2diag.log file, which contains entries that detail the new log
directories. If a user-defined log directory, such as /usr/logpath, is used, the
location of the log files is /usr/logpath/NODE0000/LOGSTREAM0000 after the
upgrade, and the old log directory contains only renamed log files. If the
default database directory is being used, for example,
/home/db2user/db2inst/NODE0000/SQL00001/SQLOGDIR, the location of the log
files is /home/db2user/db2inst/NODE0000/SQL00001/LOGSTREAM0000 after the
upgrade, and the old log directory contains only renamed log files.
After you complete these steps, run a quick check to verify that the instance is
now running on DB2 10.1 by running db2level, which should return a set of
tokens that include a string such as DB2 10.1.X.X (where X is a number).
The next steps for adding the DB2 pureScale feature to your instance depend on
whether the database meets the requirements for the DB2 pureScale feature. If
there is no database created, you can continue to 5.7, “Upgrading a DB2 9.8
server to DB2 10.1” on page 276.
5.6.1 Restrictions
A DB2 pureScale feature-enabled database must use Automatic Storage table
spaces, and both the data and the logs must be on a General Parallel File
System (GPFS).
If you have a database in the DB2 10.1 instance but you have not placed it into a
GPFS file system yet, see 5.6.3, “Resolving possible IBM DB2 pureScale feature
database enablement issues” on page 273. Then continue with “Enabling the
DB2 pureScale feature in DB2 10.1 instances with databases” on page 271.
270 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Enabling the DB2 pureScale feature in DB2 10.1 instances
without databases
To enable the DB2 pureScale feature when there are no databases cataloged in
the instance, complete the following steps:
1. Run db2iupdt from the DB2 10.1 installation directory:
$DB2DIR/instance db2iupdt -cf host2 -cfnet host2-ib0 -m host1 -mnet
host1-ib0 -instance_shared_dev /dev/hdisk1 -tbdev /dev/hdisk2 -u
fencid db2sdin1
Where:
– $DB2DIR is the location of the DB2 10.1 binary files.
– host2 and host2-ib0 are the host name and InfiniBand host name for the
CF host.
– host1 and host1-ib0 are the host name and InfiniBand host name for
the member
– /dev/hdisk1 is the disk used for the sqllib_shared directory.
– /dev/hdisk2 is used for the DB2 cluster services tiebreaker disk.
– fencid is the name of the fenced user.
– db2sdin1 is the instance name.
This command creates the Tivoli System Automation cluster, the GPFS
cluster, and the first shared file system. It also sets up the first member and
the first cluster caching facility.
2. Add another member by running the following command:
$DB2DIR/instance/db2iupdt -add -m host3 -mnet host3-ib0 db2sdin1
3. Add a second cluster caching facility by running the following command:
$DB2DIR/instance/db2iupdt -add -cf host4 -mnet host4-ib0 db2sdin1
272 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
5.6.3 Resolving possible IBM DB2 pureScale feature database
enablement issues
Databases must have logs and data on GPFS file systems and use automatic
storage table spaces before the DB2 instance can be enabled for the DB2
pureScale feature.
Before you begin, make sure that these components are in place:
Install DB2 Enterprise Server Edition Version 10.1 with the
DB2 pureScale feature.
Identify the disks that are available on shared storage that are used for the
sqllib_shared directory and for the database and logs.
These disks should be accessible by the other hosts that are added to the
DB2 pureScale cluster. The disk used for the db2cluster_prepare command
must be at least 10 GB. Prepare a larger disk because it also (by default)
holds the diagnostic data for the DB2 pureScale instance (also known as the
db2dump directory). The sizes of disks used for data and logs vary according to
the requirements of your database or databases.
To move the logs, a GPFS cluster and an available file system must exist with
enough space to hold the database logs. In addition, the DB2 pureScale feature
does not allow for circular logging, which can prevent recovery from occurring
properly. Use a file system that is created on disks with a high throughput
capability, and do not share this file system with any other usage. Dedicate the
file system to just the logs for the DB2 database.
To move logs from their current location to GPFS, complete the following steps:
1. Log on to the DB2 server as the instance owner with DBADM authority.
2. Run the following command to change the location of the log files:
db2 update db cfg for <databaseName> using LOGPATH <newLogPath>
3. Disconnect all users from the database, and then deactivate the database by
running the following command:
db2 deactivate database <databaseName>
4. Reactivate the database to activate the new log path by running the following
command. This step can take time to complete, depending on the number of
log files that must be created.
db2 activate database <databaseName>
274 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
If your database is already using automatic storage, the following options are
available to move to GPFS:
Automatic storage databases
Databases not using automatic storage table spaces
A redirected restore requires that you have access to your backup image, and
that you have the appropriate authorizations to run the command. To start the
redirected restore, run the following command:
db2 restore db SAMPLE on /db2data/db2sdin1/ DBPATH on $HOME NEWLOGPATH
/db2logs/db2sdin1/logs
In this example, the database SAMPLE is being restored so that the data is placed
in the GPFS file system mounted at /db2data in the /db2data/db2sdin1
directory. The DBPATH is in the default home directory and the logs are placed on
another GPFS file system mounted on /db2logs in the
/db2logs/db2sdin1/logs directory.
5.7.1 Restrictions
The procedure described here is used only to upgrade from DB2 9.8. As always,
the standard upgrade restrictions described in 5.2, “Supported upgrade paths”
on page 253 apply.
On Linux and UNIX operating systems, do not set up the instance environment
for the root user.
276 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
5.7.2 General procedure
To upgrade existing DB2 9.8 instances to DB2 10.1, copy the installation binary
files on to all the hosts and perform a check on any existing database. Then,
complete the following steps:
1. Log on to any member host of the DB2 server as the root user and copy the
installation binary files to a non GPFS file system. You need to complete this
step only on one host that is part of the DB2 pureScale feature instance. You
might need to extract the installation binary files so that you can access the
needed files.
2. Log on to the DB2 pureScale feature instance as the instance owner.
3. Run db2stop to stop the database manager. If there are any connections to
the database, run db2 force applications all to disconnect all users. Then
run db2stop after all users are disconnected from all databases.
4. From the current host, run db2stop instance on <host name> for each host.
This command prevents the accidental start of the member or cluster caching
facility processes in the instance. For example, if you have hosts A, B, C, and
D in the DB2 pureScale instance, run this command four times, once for
each host.
5. Log on to the DB2 server as root.
6. Put the cluster management software (Tivoli System Automation) into
maintenance mode by running the following command on one of the hosts to
put all of the hosts into maintenance:
db2cluster -cm -enter -maintenance -all
Run this command from the existing DB2 9.8 installation directory. It stops the
peer domain services on all hosts and prevents the peer domain from
restarting during system maintenance.
7. Run the following command to put the cluster file system in to maintenance
mode on all hosts:
db2cluster -cfs -enter -maintenance -all
Run this command from the DB2 9.8 installation directory. It stops all hosts
from accessing the cluster GPFS during system maintenance.
278 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
The db2ckupgrade.log file is created in the current directory and includes
details about errors and warnings. Review the errors and warnings and take
any necessary corrective action. Note that each time you reissue this
command, all previous log files are overwritten. You can rename the log files
to avoid losing the error details.
15.Stop the DB2 instance, which you started to run the previous command, and
then log on to the DB2 server host as the root user.
16.Now, upgrade the existing DB2 9.8 instances by running db2iupgrade from
the target DB2 10.1 copy location. Run this command from the DB2 10.1
installation path on all hosts. The best approach is to run this command on all
of the members first and then run the command on all of the CFs. Use the
following command syntax:
$DB2DIR/instance/db2iupgrade [ -u fencedID ] InstName
Where:
– $DB2DIR refers to the location specified during the DB2 10.1 installation.
– fencedID refers to the user name under which the fenced user-defined
functions (UDFs) and stored procedures run.
– InstName refers to the login name of the instance owner.
Important: If you did not install all DB2 database add-on products that
were installed in the DB2 copy from which you are upgrading, the instance
upgrade fails and returns a warning message. If you plan to install these
products later or if you no longer need the functionality provided by these
products, use the -F parameter to upgrade the instance.
17.Check to verify that the peer domain was migrated from the previous version
to the newly installed version by running lsrpdomain. Notice that the online
domain shows No in the MixedVersions column. If the column shows Yes, you
need to complete this migration step by running the following command:
runact -c IBM.PeerDomain CompleteMigration Options=0
If this command runs successfully, the MixedVersions column changes to No.
18.Log in to the DB2 database server and start the instance as a user with
sufficient authority.
19.Restart the instance on each host by running the following command:
db2start instance on <hostname>
Then run db2start.
280 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
If necessary, set the media attributes using the ALTER STOGROUP statement.
Automatic storage table spaces inherit media attribute values, including the
overhead, device read rate, and data tag attributes, from the default storage
group. After upgrading to DB2 10.1, the existing table spaces retain their
settings and the overhead and device read rate attributes for the storage
group are set to undefined.
Manage any changes in DB2 server behavior caused by the new registry
variables and configuration parameters (and their associated default values)
that are introduced in DB2 10.1. Each of these settings can affect how the
DB2 server operates after the upgrade.
If automatic collection of statistics failed on certain system catalog tables
during the database upgrade, update the statistics on those system
catalog tables.
Rebind packages in the upgraded databases if you did not use the REBINDALL
option on the UPGRADE DATABASE command. Then rebind the packages in the
upgraded database to validate the packages and to use the updated statistics
or new index information.
Refresh data in existing materialized query tables (MQTs) by using the
REFRESH TABLE statement. MQTs on unicode databases using language
aware collation, where the MQT definition involves a LIKE predicate or
substring function involved in a basic predicate, must be refreshed.
Migrate DB2 explain tables to retain any explain table information that you
previously gathered.
If there were tables with XML columns created in a DB2 9.5 release, convert
the XML storage object to the DB2 10.1 format by re-creating the tables so
that they have access to functions, such as compression on XML data and
collection of statistics, to estimate the inline length for XML columns.
If you obtained customized code page conversion tables from the DB2
support service, copy all of the files for those tables from the DB2OLD/conv
directory to the DB2DIR/conv directory (where DB2OLD is the location of the
DB2 9.5 or DB2 9.7 copy and DB2DIR is the location of the DB2 10.1 copy).
You do not need to copy standard code page conversion tables.
Use the new EVMON_UPGRADE_TABLES procedure to upgrade existing target
tables for event monitors that write to tables and to unformatted event
(UE) tables.
Verify that the DB2 server upgrade was successful and test applications
and tools.
Back up databases.
When your DB2 server performance is stable, update the statistics for your
upgraded databases to take advantage of optimizer improvements and collect
statistics for new functionality. During a database upgrade to DB2 10.1, the
statistics collected from existing database tables retain their values. Statistics for
new characteristics on tables and indexes have a value of -1 to indicate that
there is no information gathered. However, you need only these statistics if you
are using new functionality.
After updating the statistics for your upgraded databases, run the REORGCHK
command to determine if index or table reorganization is necessary. Table and
index reorganization can help improve performance.
282 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
5.8.3 After upgrading a database
After you complete a database upgrade as described in 5.4.4, “Upgrading the
database” on page 263, compare the database configuration settings with the
settings from before the upgrade. Verify the following settings:
Database configuration parameters
Table spaces information
Packages information for applications only (there is no need to check this
information for system-generated packages, which can change after an
upgrade)
After you verify these settings, verify that your database upgrade is successful by
connecting to it and issuing a small query (Example 5-2).
Alternatively, if you have sample files installed, run the testdata.db2 script
(Example 5-3).
286 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Related publications
The publications listed in this section are considered suitable for a more detailed
discussion of the topics covered in this book.
You can search for, view, download, or order these documents and other
Redbooks, Redpapers, Web Docs, draft and additional materials, at the following
website:
ibm.com/redbooks
Online resources
These websites are also relevant as further information sources:
Configuring geographically dispersed DB2 pureScale clusters:
http://www.ibm.com/developerworks/data/library/long/dm-1104purescale
gdpc
DB2 10 for Linux, UNIX, and Windows Information Center:
http://pic.dhe.ibm.com/infocenter/db2luw/v10r1/index.jsp
IBM AIX:
http://www.ibm.com/systems/power/software/aix
IBM BladeCenter HS22 Installation and User's Guide:
http://ibm.com/support/entry/portal/docdisplay?lndocid=MIGR-5079689
288 Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
Delivering Continuity and Extreme Capacity with the IBM DB2 pureScale Feature
(0.5” spine)
0.475”<->0.875”
250 <-> 459 pages
Back cover ®
Describes how to use The IBM DB2 pureScale feature offers clustering technology
the IBM DB2 that helps deliver high availability and exceptional scalability INTERNATIONAL
pureScale feature transparent to applications. The DB2 pureScale feature helps TECHNICAL
you to meet your business needs around availability and SUPPORT
Includes information scalability, and is also easy to configure and administer. ORGANIZATION
about tuning the DB2 This IBM Redbooks publication addresses the DB2 pureScale
pureScale feature that is available in IBM DB2 10.1 for Linux, UNIX, and
environment Windows operating systems. It can help you build skills and BUILDING TECHNICAL
deploy the DB2 pureScale feature. This book bundles all the INFORMATION BASED ON
Provides detailed information necessary for a in-depth analysis into the PRACTICAL EXPERIENCE
functions of the DB2 pureScale feature, including the actual
installation and
hardware requirements. It includes validated step-by-step
setup instructions IBM Redbooks are developed by
hardware and software installation instructions. In addition,
the IBM International Technical
this book provides detailed examples about how to work Support Organization. Experts
effectively with a DB2 pureScale cluster and how to plan and from IBM, Customers and
run an upgrade for all DB2 related components to DB2 10.1. Partners from around the world
create timely technical
This book is intended for database administrators (DBAs) information based on realistic
who use IBM DB2 10.1 for Linux, UNIX, and Windows scenarios. Specific
operating systems who want to explore and get started with recommendations are provided
the DB2 pureScale feature. to help you implement IT
solutions more effectively in
your environment.