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 soft 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. This is due to the 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.1A 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.1A or later Cluster File System. Previous versions of Oracle require 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.
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.
On the Tru64 UNIX Version 5.1A system, enter the following
hwmgr
command to locate the physical device of
each distributed raw disk (DRD) service:
# hwmgr -view devices -member provolone
For example, entering the
hwmgr
command on the
provolone
cluster member produces the following:
HWID: DSF Name Model Location ---------------------------------------------------------------------- 36: /dev/disk/dsk3c RZ28 bus-1-targ-1-lun-0 provolone.zk4.com 37: /dev/disk/dsk4c RZ28D bus-1-targ-2-lun-0 provolone.zk4.com 38: /dev/disk/dsk5c RZ29B bus-1-targ-3-lun-0 provolone.zk4.com 39: /dev/disk/dsk6c RZ28D bus-1-targ-4-lun-0 provolone.zk4.com 40: /dev/disk/dsk7c RZ28L-AS bus-1-targ-5-lun-0 provolone.zk4.com 63: /dev/disk/floppy1c 3.5in fdi0-unit-0 provolone.zk4.com 73: /dev/disk/dsk8c RZ1CB-CS bus-0-targ-0-lun-0 provolone.zk4.com 74: /dev/disk/cdrom1c RRD45 bus-0-targ-4-lun-0 provolone.zk4.com
.
.
.
Create soft links that point to the raw devices and update the permissions. Do not edit the control file to remove DRD names.
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
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 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