Removed raw devices vs. filesystem comparison
Added warning note to 2.6 kernel enhancements section
Added non-RPM instructions for FixPak installs (Gentoo section)
Corrected/added XREF elements for Resources section
Added zSeries to supported hardware
Corrected supported Java SDK level for IA-64 hardware
This commit is contained in:
ihakes 2005-02-07 20:04:31 +00:00
parent 0d7bc2c666
commit ad8bec9368
1 changed files with 65 additions and 211 deletions

View File

@ -29,6 +29,13 @@
<authorinitials>idmh</authorinitials>
<revhistory>
<revision>
<revnumber>1.1.2</revnumber>
<date>2005-02-07</date>
<authorinitials>idmh</authorinitials>
<revremark>Updated non-RPM install instructions.
Minor updates to clarify audience and add some late breaking information.</revremark>
</revision>
<revision>
<revnumber>1.1.1</revnumber>
<date>2005-01-25</date>
@ -36,7 +43,6 @@
<revremark>Added Gentoo install instructions (provided by Dan Scott)
</revremark>
</revision>
<revision>
<revnumber>1.0.1</revnumber>
<date>2005-01-06</date>
@ -44,7 +50,6 @@
<revremark>Fixed typos in Red Hat 2.6 Enhancements section
</revremark>
</revision>
<revision>
<revnumber>1.0.0</revnumber>
<date>2004-12-09</date>
@ -59,7 +64,7 @@
This HOWTO is intended for anyone interested in installing and
using 32-bit IBM DB2&reg; Universal Database on Linux&reg;. If you're
interested in 64&ndash;bit or other architectures, we refer you to the
official documentation sources (see the Resources section for a
official documentation sources (see the <xref linkend="resources" /> section for a
link).
</para>
@ -72,7 +77,7 @@ link).
<para>This HOWTO is intended for anyone interested in installing and
using 32-bit IBM DB2&reg; Universal Database on Linux&reg;. If you're
interested in 64&ndash;bit or other architectures, we refer you to the
official documentation sources (see the Resources section for a
official documentation sources (see the <xref linkend="resources" /> section for a
link).</para>
<para>The information found in this document is based on our experiences
installing and configuring DB2 UDB Version 8.2.</para></sect2>
@ -171,6 +176,7 @@ Athlon)</para></listitem>
<listitem><para>POWER&trade; (any iSeries&trade; or pSeries&reg; that
supports
Linux)</para></listitem>
<listitem><para>zSeries</para></listitem>
</itemizedlist></para></sect3>
<sect3><title>Disk space requirements</title>
<para>Take into account the disk space requirements before you install
@ -212,9 +218,8 @@ Center. This is a separately installable product that requires at least
100 MB when installing the core English language files. Additional space
is required for additional languages. However, if disk space is an
issue, you can configure DB2 UDB to access the Information Center from
the Web. More detail about this really great feature is provided in the
section called "Installing the DB2 UDB Information Center"
.</para></sect3>
the Web. More detail about this great feature is provided in the
<xref linkend="help"/> section.</para></sect3>
<sect3><title>Memory requirements</title>
<para>You should allocate a minimum of 256 MB of RAM for a product like
the DB2 UDB Enterprise Server Edition, but additional memory should be
@ -305,11 +310,12 @@ in Version 8.2.
<entry colname="COL6" align="center"><para>x</para></entry>
<entry colname="colspec1" align="center"><para>x</para></entry>
<entry colname="COL7" align="center"><para>x</para></entry>
<entry colname="colspec2" align="center"><para>x</para></entry></row></tbody></tgroup></table>For
a list of all of the distributions that are officially supported, as
<entry colname="colspec2" align="center"><para>x</para></entry></row></tbody></tgroup></table>
For a list of all of the distributions that are officially supported, as
well as the latest information about kernels, libraries, integrated
cluster environments, and papers, refer to the DB2 UDB for Linux
validation Web site listed in the Resource
cluster environments, and papers, visit the
<ulink url="http://www.ibm.com/software/data/db2/linux/validate/">
DB2 UDB for Linux validation Web</ulink> site listed in the <xref linkend="resources" />
section.</para></sect3>
<sect3><title>Required kernel levels and libraries</title>
<sect4><title>Kernel parameter values</title>
@ -374,7 +380,7 @@ manually update the kernel.shmmax, kernel.msgmni, and kernel.sem
parameters prior to installing DB2
UDB.</para></sect4>
<sect4><title>Manually updating kernel parameters</title>
<para>However, if you need to change these default settings, you can
<para>If, for some reason, you need to change these default settings, you can
update them manually. To check your current shared memory segment,
semaphore array, and message queue limits, enter the ipcs -l command.
Your output should look something like this:
@ -492,8 +498,8 @@ level</para></entry></row></thead>
2</para></entry></row>
<row>
<entry colname="COL1"><para>Linux IA64</para></entry>
<entry colname="COL2"><para>SDK 1.3.1 Service Release
6</para></entry></row>
<entry colname="COL2"><para>SDK 1.4.1 Service Release
2</para></entry></row>
<row>
<entry colname="COL1"><para>Linux x86-64 (hybrid)</para></entry>
<entry colname="COL2"><para>32-bit SDK 1.4.1 Service Release
@ -757,191 +763,9 @@ recommended.</para></sect3></sect2>
<sect2><title>Storage planning</title>
<para>In this section these storage considerations are discussed:
<itemizedlist>
<listitem><para>Raw devices versus file systems
<itemizedlist>
<listitem><para>Raw device configuration</para></listitem>
<listitem><para>File system configuration</para></listitem>
</itemizedlist>
</para>
</listitem>
<listitem><para>Log storage</para></listitem>
<listitem><para>Temporary table space storage</para></listitem>
</itemizedlist></para>
<sect3><title>Raw devices versus file systems</title>
<para>This section describes and compares raw devices and file systems
as storage mechanisms for DB2 UDB on Linux, and how to configure
them.</para>
<sect4><title>Raw device configuration</title>
<para>Raw devices can only be used for Database Managed Storage (DMS).
DMS table spaces require more administration, but provide superior
performance over System Managed Storage. Using raw I/O improves
performance because it bypasses the buffering performed by the Linux
kernel and allows processes to interact with the physical device
directly. In comparison, the file system uses system-based I/O, which
means that data is buffered twice: first at the database manager level
and then at the kernel (or file system) level. At this level, the
kernel intercepts the calls and transfers the data to its own buffer
before passing it on to the physical device or process. The additional
buffering impedes performance.</para>
<para>To perform raw I/O on a block device, you must first bind the
Linux kernel's pool of raw device nodes to that block device. This is
done by running the <command>raw</command> command as root.
The <command>raw</command> utility is normally
supplied by the Linux distribution.</para>
<para>For example, if your disk partition is <filename class='partition'>/dev/hda12</filename> and you want to
bind it to <filename class='partition'>/dev/raw/raw1</filename>, enter the command:
<screen>bash# raw /dev/raw/raw1 /dev/hda12</screen>
Next, configure the
<filename>/etc/rc.d/boot.local</filename> file so that DB2 UDB can access the raw device at
boot time. This configuration is done by adding entries to
<filename>/etc/rc.d/boot.local</filename>:
<screen>raw /dev/raw/raw1 /dev/hda12 raw /dev/raw/raw2 /dev/hda13</screen>
To show
all current raw devices available, issue the following command:
<screen>raw -qa</screen>
You should receive output similar
to:
<screen>/dev/raw/raw1: bound to major 3, minor 12
/dev/raw/raw2: bound to major 3, minor 13</screen>
For detailed instructions on how to set up raw I/O on your Linux computer,
refer to the IBM DB2 UDB Administration Guide: Implementation documentation.</para></sect4>
<sect4><title>File system configuration</title>
<para>A popular method for configuring disk space for DB2 UDB on Linux
is to use separate file systems to store and run DB2 UDB. File systems
can be used by DB2 UDB either as system managed storage (SMS) or as
database managed storage (DMS). SMS table spaces are commonly used
because they provide good performance with very little administration
cost. File systems have many benefits. For example, they can be
distributed across a network and have network-oriented authentication
and replication capabilities, which makes them essential for a
multiple-partition database system.</para>
<para>You should create different partitions during your Linux OS
installation. It has become customary for certain basic directories,
such as <filename class='directory'>/db2home</filename> to be placed
in separate file systems, or partitions, for several reasons:
<itemizedlist>
<listitem><para>Disk capacity - there is a limited amount of space on
each disk, and you might run out of space if you use a single disk for
multiple purposes.</para></listitem>
<listitem><para>Performance - the root directory has to be searched
linearly every time any path name in Linux is accessed. If the root
directory is cluttered, this will impair performance of the entire
system.</para></listitem>
<listitem><para>Backup - it is better to separate frequently changing
data from seldom changing data. This way you can save system resources
by backing up some file systems more frequently than
others.</para></listitem>
<listitem><para>User convenience - it is easier to find things if the
naming convention is well-organized.</para></listitem>
</itemizedlist>
File system configuration, or partitioning, is typically performed by using the
<command>fdisk</command> tool. Red Hat Linux has a graphical disk configuration
utility; for SuSE Linux, you can also use the graphical YaST tool. Linux
provides several journal file system formats, such as Ext3, JFS, XFS and
ReiserFS.</para>
<para>For example, to show all defined file systems, issue the
<command>df</command> command. You should receive output that is similar
to this:
<screen>
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 4200828 1588840 2611988 38% /
/dev/hda5 54416 4682 46925 10% /boot
/dev/hda8 3099260 32828 2909000 2% /database
/dev/hda9 1035660 32828 950224 4% /db2log1
/dev/hda10 2071384 32828 1933332 2% /db2temp
/dev/hda7 1035660 32828 950224 4% /db2home_Local
/dev/hda11 3099260 20 2941808 1% /software_Local
/dev/hda19 1035660 32828 950224 4% /db2log2
</screen>
To show all NFS mounted file systems,
issue the <command>showmount -a</command> command on the host where the file system
physically exists. You should receive output that is similar to this:
<screen>udblnx03.local:/software
udblnx04.local:/software
udblnx05.local:/software</screen></para>
<para>There are many different ways to configure disk partitions and
file systems, depending on your environment. You should follow these
recommendations when configuring your system:
<itemizedlist>
<listitem><para>For single-partition and multiple-partition database
systems, you should create a separate file system for the DB2 UDB user
home directories. Avoid creating databases on this file system. For
multiple-partition environments, you should create a separate DB2 UDB
home file system on one of the machines in the cluster to be used as the
instance home directory. This file system is to be shared between all
machines in the cluster via NFS (that is, NFS-exported from the NFS
server machine, and NFS-mounted on the remaining
machines).</para></listitem>
<listitem><para>You should create a separate file system for database
storage. For multiple-partition database systems, there should be a
separate database file system on each physical system that participates
in the partitioned database.</para></listitem>
<listitem><para>For performance or availability reasons, you should
avoid putting user data on the catalog node. When restoring the catalog
node, the restore is faster when there is no data on this
node.</para></listitem>
<listitem><para>You should create separate partitions for the primary
copy of DB2 UDB logs, DB2 UDB mirrored logs, and DB2 UDB temporary table
spaces. In addition, you may want to create a separate file system for
user table spaces in order to separate them from the database files.
This configuration is commonly used in many production
environments.</para></listitem>
</itemizedlist>
Here is an example of one possible configuration:
<table><title>Partition configuration</title>
<tgroup cols="2">
<colspec colname="COL1"></colspec>
<colspec colname="COL2"></colspec>
<thead>
<row>
<entry valign="middle" colname="COL1" align="center"><para>Partition
name</para></entry>
<entry valign="middle" colname="COL2" align="center"><para>Description</para></entry></row></thead>
<tbody>
<row>
<entry colname="COL1"><para>/</para></entry>
<entry colname="COL2"><para>Linux</para></entry></row>
<row>
<entry colname="COL1"><para>/boot</para></entry>
<entry colname="COL2"><para>Linux</para></entry></row>
<row>
<entry colname="COL1"><para>/swap</para></entry>
<entry colname="COL2"><para>Linux Swap space</para></entry></row>
<row>
<entry colname="COL1"><para>/db2home</para></entry>
<entry colname="COL2"><para>For storing the home directories for DB2 UDB
users (for example, db2inst1, db2fenc1, dasusr1)</para></entry></row>
<row>
<entry colname="COL1"><para>/database</para></entry>
<entry colname="COL2"><para>For storing the
database</para></entry></row>
<row>
<entry colname="COL1"><para>/db2log1</para></entry>
<entry colname="COL2"><para>Used to storing primary copy of
logs</para></entry></row>
<row>
<entry colname="COL1"><para>/db2log2</para></entry>
<entry colname="COL2"><para>Used to store DB2 UDB mirrored
logs</para></entry></row>
<row>
<entry colname="COL1"><para>/db2temp</para></entry>
<entry colname="COL2"><para>For storing DB2 UDB temporary table
spaces</para></entry></row>
<row>
<entry colname="COL1"><para>/software</para></entry>
<entry colname="COL2"><para>Used for storing software. For example, we
downloaded the DB2 UDB install image into this
directory.</para></entry></row>
<row>
<entry colname="COL1"><para>/tablespaces</para></entry>
<entry colname="COL2"><para>Holds all user table
spaces</para></entry></row></tbody></tgroup></table>
<note><para>Mirroring log files helps protect a database from accidental
deletion of an active log and data corruption caused by disk
error. While this functionality increases the high availability of a
system, log mirroring may impact system performance as all log data will
be written to both the log path and the mirror log
path.</para></note></para></sect4></sect3>
<sect3><title>Log storage</title>
<para>By default, DB2 UDB sets the log path to the default database path
during database creation.</para>
@ -1455,8 +1279,10 @@ this new kernel feature. As the instance owner:
<screen>db2set DB2LINUXAIO=TRUE</screen></para>
<para>Optional: update the DB2 UDB JDK_PATH parameters so DB2 UDB uses
SLES's installed Java 2 package. As the instance owner:
<screen>db2 UPDATE DBM CFG USING JDK_PATH /opt/IBMJava2-142</screen>
db2 UPDATE ADMIN CFG USING JDK_PATH /opt/IBMJava2-142</screen></para>
<screen>db2 UPDATE DBM CFG USING JDK_PATH /opt/IBMJava2-142
db2 UPDATE ADMIN CFG USING JDK_PATH /opt/IBMJava2-142
</screen>
</para>
<para>Surprisingly, my installation didn't have Mozilla installed by
default. To have the DB2 UDB help display properly, Mozilla should be
installed using YaST.</para></sect3></sect2>
@ -1683,7 +1509,7 @@ resolve the issue.</para>
2.6.9-gentoo-r13 kernel (2005-01-17). Following the
<ulink url="http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/com.ibm.db2.udb.doc/start/t0006833.htm">manual install</ulink>
instructions in the DB2 Information Center, we use the RPM method of
installing DB2 UDB V8.2, through a modified <computeroutput>db2_install</computeroutput>
installing DB2 UDB V8.2, through a modified <command>db2_install</command>
script. This is just one of many ways you could accomplish this task, but this method
has been tested (at least once) and it works.</para>
<sect3><title>Pre-installation notes</title>
@ -1694,20 +1520,20 @@ If you want to run a multiple-partition environment, you will need to emerge eit
<sect3><title>Installation notes</title>
<para>
Gentoo uses the latest version of the GNU coreutils package of utilities, which
includes the <computeroutput>tail</computeroutput> command. The DB2 install script
(<computeroutput>db2_install</computeroutput>) and several instance administration
shell scripts rely on deprecated command line arguments to <computeroutput>tail</computeroutput>
includes the <command>tail</command> command. The DB2 install script
(<command>db2_install</command>) and several instance administration
shell scripts rely on deprecated command line arguments to <command>tail</command>
that have been removed entirely from the latest GNU <computeroutput>coreutils</computeroutput> version
of <computeroutput>tail</computeroutput>. Therefore, you must copy the contents of the install CD
and modify the <computeroutput>db2_install</computeroutput> script before you can successfully run the install.
of <command>tail</command>. Therefore, you must copy the contents of the install CD
and modify the <command>db2_install</command> script before you can successfully run the install.
</para><para>
The RPM packages supplied with the DB2 install CD contain dependency listings that cannot
be satisfied inside a Gentoo environment, because Gentoo does not use RPM as a native
packaging method. To overcome these dependencies, you also need to modify the <computeroutput>db2_install</computeroutput>
packaging method. To overcome these dependencies, you also need to modify the <command>db2_install</command>
script to ignore dependencies and force the installation of DB2 onto your system.
</para><para>
Perform the following steps to modify the <computeroutput>db2_install</computeroutput> script
for the required <computeroutput>tail</computeroutput> and <computeroutput>rpm</computeroutput>
Perform the following steps to modify the <command>db2_install</command> script
for the required <command>tail</command> and <command>rpm</command>
changes and install the product:</para>
<orderedlist>
<listitem>
@ -1744,7 +1570,7 @@ To:
</listitem>
<listitem>
<para>The DB2 installer prompts you to enter the keyword of the product you want to install.
for example, issuing the <computeroutput>db2_inst</computeroutput> command for the DB2 UDB Express
for example, issuing the <command>db2_inst</command> command for the DB2 UDB Express
Edition for Linux install displays the following screen:
<screen>
Specify one or more of the following keywords,
@ -1766,6 +1592,26 @@ DB2.EXP
<para>
The DB2 installer will now install many RPM packages into the /opt/IBM/db2/V8.1/ directory.
</para>
<sect4><title>Installing DB2 UDB FixPaks on a non-RPM distribution</title>
<para>When installing a DB2 FixPak onto an existing DB2 installation, the RPM
utility is used, which will cause problems on a distribution that does
not use the RPM installation method by default. Since Gentoo is one of
those distributions, you must make the following changes to the
<command>installFixPak</command> script.
</para>
<para>In the <command>installFixPak</command> script, change this
line:
<screen>
echo "Updating to ${fullfsname?} ... "
rpm -ivh ${fullfsname?}
</screen>
to read:
<screen>
echo "Updating to ${fullfsname?} ... "
rpm --force --nodeps --ivh ${fullfsname?}
</screen>
</para>
</sect4>
</sect3>
<sect3><title>Post-installation notes</title>
<para>Now that you have installed DB2, you need to create the groups, users,
@ -1793,7 +1639,7 @@ useradd -u 1002 -g dasadm1 -m -d /home/dasusr1 dasusr1
</listitem>
<listitem>
<para>Before you can create the DB2 Administration Server and database instance, you have
to modify the db2iutil library to update calls to the <computeroutput>tail</computeroutput>
to modify the db2iutil library to update calls to the <command>tail</command>
command to the current GNU syntax. As root, open the /opt/IBM/db2/V8.1/instance/db2iutil
file in an editor and make the following changes (or apply the changes to the file using
the patch utility):
@ -2084,8 +1930,16 @@ that DB2 UDB installs:
<para>DB2 UDB Version 8.2 can take advantage of a number of performance
enhancements introduced in the 2.6 kernel. There is a good paper by Rav
Ahuja, Dan Behman and John Keenleyside that goes in depth on the
specific enhancements of DB2 UDB V8.2 (see the Resources Section); we'll
specific enhancements of DB2 UDB V8.2 (see the <xref linkend="resources" /> Section); we'll
cover a few of the highlights and how to implement them.
</para>
<note>
<para>
Note that these enhancements are for advanced users only. Implement
each with care and be sure to thorougly test each change individually
before moving on to the next enhancement.
</para>
</note>
<itemizedlist>
<listitem><para>Asynchronous I/O handling</para>
<para>Asynchronous I/O is a kernel processing
@ -2161,7 +2015,7 @@ desired</para></listitem>
<listitem><para>Before running db2start, execute this command to tell
DB2 UDB to use the large page configuration:
<screen>db2set DB2_LGPAGE_BP=YES</screen></para></listitem>
</itemizedlist></para></listitem></itemizedlist></para></sect1>
</itemizedlist></para></listitem></itemizedlist></sect1>
<sect1 id="using"><title>Using DB2 UDB</title>
<para>This section gives you the basic information you need to start
working with DB2 UDB on Linux. It includes instructions on issuing DB2