6    Moving Distributed Applications to TruCluster Server

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:

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:

6.1    Preparing to Move Distributed Applications to TruCluster Server

When preparing to move distributed applications to TruCluster Server, note the following:

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:

  1. 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.

  2. 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
     
    .
    .
    .

  3. Create soft links that point to the raw devices and update the permissions. Do not edit the control file to remove DRD names.

  4. 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.

  5. Reload the cluster alias service definitions by entering the following command on each cluster member:

    # cluamgr -f
     
    

  6. 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: