A distributed application is an application that has already been modified for use in a cluster. It is cluster-aware; that is, it knows it is running in a cluster. Just running an application in a cluster does not make that application cluster-aware. Components of distributed applications often use the application programming interface (API) libraries that ship with the TruCluster Server product to communicate across member systems and coordinate their access to shared data.
The following subsystem APIs are fully compatible with those that were provided in earlier TruCluster products:
Cluster alias (clua_*.3)
Distributed lock manager (DLM)
(dlm_*.3)
Memory Channel (imc_*.3)
For more information about using the cluster alias, DLM, and Memory Channel APIs, see Chapter 8, Chapter 9, and Chapter 10, respectively.
This chapter discusses the following topics:
Preparing to move distributed applications to TruCluster Server (Section 6.1)
Creating Oracle Parallel Server on TruCluster Server (Section 6.2)
Moving Oracle Parallel Server to TruCluster Server (Section 6.3)
6.1 Preparing to Move Distributed Applications to TruCluster Server
When preparing to move distributed applications to TruCluster Server, note the following:
Device names may be hard coded in data files. You can rename the data files, create symbolic links, or re-create the database. Symbolic links are easiest to manage. Create symbolic links that point to the raw devices and update the permissions.
Note
While you can rename OPS data files, the renaming of Informix XPS data files is not supported; use symbolic links instead. See the Informix Installation Guide for more information.
Do not edit control files. Save your original control files.
Relink the Oracle binary code after you have created a single-member TruCluster Server cluster because there are new entry points in the connection manager library for TruCluster Server.
6.2 Running Oracle Parallel Server on TruCluster Server
This section explains how to get the Oracle Parallel Server (OPS) option of Oracle 8i Release 3 (8.1.7) up and running in a TruCluster Server Version 5.1 or later cluster. Oracle8i 8.1.7 takes advantage of the direct I/O feature introduced in TruCluster Server Version 5.1 to allow you to configure OPS on a TruCluster Server Version 5.1B or later cluster file system. Previous versions of Oracle required the use of raw disk partitions or volumes in a cluster. See the TruCluster Server Cluster Administration manual for a discussion of direct I/O in a cluster.
Note
To run Oracle9i Real Application Cluster (RAC) on Tru64 UNIX and TruCluster Server Version 5.1B, refer to the Installation Guide offered at the following site: http://otn.oracle.com/products/oracle9i/pdf/Oracle_9i_on_Tru64_UNIX.pdf
This document describes Oracle9i RAC and how to install and configure Tru64 UNIX, TruCluster Server, and Oracle in a clustered environment.
To run OPS on TruCluster Server, follow these steps:
Install and configure Oracle8i Release 3 (8.1.7) using the instructions in the Oracle8i Release 3 (8.1.7) documentation. You only need to install Oracle8i on one cluster member.
Oracle has special requirements, including that certain kernel
attributes be set to specific values, that specific UNIX groups
(dba,
oinstall) be created,
and that special environment variables be initialized.
Configure the Oracle Parallel Server option, using the instructions in the Oracle8i Release 3 (8.1.7) documentation.
Configure the Net8 listener to use a cluster alias for load balancing of client requests. You can also use the multi-threaded server (MTS) capability of OPS to provide load balancing of client requests. See the Oracle8i documentation.
To use a cluster alias, add the following line to the
/etc/clua_services
file to set up the properties of
the port that the Oracle8i listener uses:
listener 1521/tcp in_multi
Setting the
in_multi
attribute for port 1521 means
that the cluster alias subsystem will distribute connection requests
directed to a cluster alias among all members of the alias.
Reload the cluster alias service definitions by entering the following command on each cluster member:
# cluamgr -f
After you have set up OPS within the cluster, and have verified that it
can be accessed by both local and remote clients, you must ensure that
each member, when it is booted, starts its database instance and, when
it is shut down, stops its database instance.
The recommended method
involves placing a script in the
/sbin/init.d
directory;
see the Oracle8i
Installation Guide, Release 3 (8.1.7) for
Compaq Tru64 UNIX
for more information.
You can also create a cluster application availability (CAA) action script to automatically start and stop the database instance, but you will have to restrict OPS to one member of the cluster. For more information about starting and stopping OPS, see the Oracle8i Release 3 (8.1.7) documentation.
6.3 Moving Oracle Parallel Server to TruCluster Server
To move OPS to TruCluster Server, note the following:
If you are moving from TruCluster Software Products Version 1.6 or
earlier, pay careful attention to device names.
There are no
special device names for DRD-managed storage.
If your database
references
/dev/drd
or
/dev/rdrd, create symbolic links, as described in step
3 of
Section 6.2, to point to the new devices.
OPS allows renaming of datafiles. If you prefer to rename datafiles instead of creating symbolic links, follow these steps:
Save your original control files. Do not edit these control files.
Start up the database using the
nomount
option.
Rename the datafile to a generic file name using the following command:
SVRMGR> alter database rename file ...
After renaming the datafile, use the following command to validate the database. This guarantees that your database is consistent and detects any incorrect symbolic links.
SVRMGR> analyze table validate structure cascade