8.1 OracleAS Cold Failover Cluster: Introduction

In OracleAS Cold Failover Cluster configurations, you have an active and a passive node, and shared storage that can be accessed by either node.

During normal operation, the active node runs Oracle Application Server processes and processes requests from clients. If the active node fails, then a failover event occurs. The passive node takes over and becomes the active node. It mounts the shared storage and runs the processes.

Configurations

You can install OracleAS Cold Failover Cluster in these configurations:

8.2.1 Map the Virtual Hostname and Virtual IP Address

Each node in an OracleAS Cold Failover Cluster configuration is associated with its own physical IP address. In addition, the active node in the cluster is associated with a virtual hostname and virtual IP address. This allows clients to access the OracleAS Cold Failover Cluster using the virtual hostname.

Virtual hostnames and virtual IP addresses are any valid hostname and IP address in the context of the subnet containing the hardware cluster.

Note:

Map the virtual hostname and virtual IP address only to the active node. Do not map the virtual hostname and IP address to both active and secondary nodes at the same time. When you failover, only then map the virtual hostname and IP address to the secondary node, which is now the active node.

Note:

Before attempting to complete this procedure, ask the system or network administrator to review all the steps required. The procedure will reconfigure the network settings on the cluster nodes and may vary with differing network implementations.

The following example configures a virtual hostname called vhost.mydomain.com, with a virtual IP of 138.1.12.191:

Register the virtual hostname and IP address with DNS for the network.

For example, register the vhost.mydomain.com/138.1.12.191 pair with DNS.

Determine the primary public network interface.

The primary public network interface for Ethernet encapsulation is typically eth0. Use the following command and search for a network interface that has an inet addr value of the physical IP address of the node:

/sbin/ifconfig

Find an available index number for the primary public network interface.

For example, if the following is the output of the /sbin/ifconfig command and eth0 is determined to be the primary public interface in step 2, then eth0:1 is available for an additional IP address:

Use the instructions listed in step 2 to confirm the new entry for the primary_public_interface:available_index entry created in step 4.

Try to connect to the node using the virtual hostname and virtual IP address from another node. For example, entering both of the following commands from a different node should provide a login to the node you configured in this procedure:

telnet hostname.domain
telnet ip_address

For example, enter:

telnet vhost.mydomain.com
telnet 138.1.12.191

On Failover

If the active node fails, then the secondary node takes over. If you do not have a clusterware agent to map the virtual IP from the failed node to the secondary node, then you have to do it manually. You have to remove the virtual IP mapping from the failed node, and map it to the secondary node.

On the failed node, remove the virtual IP address by running the following command as the root user:

/sbin/ifconfigconfigured_interfacedown

For example, enter the following command if eth0:1 is configured with the virtual IP address:

/sbin/ifconfig eth0:1 down

Note:

Use the commands in step 2 of the previous procedure to confirm that the virtual IP address has been removed.

On the passive node, add the virtual IP address.

On the passive node, follow steps 2 to 5 of the previous procedure to add and confirm the virtual IP address on the passive node.

8.2.2 Set Up a File System That Can Be Mounted from Both Nodes

Although the hardware cluster has shared storage, you need to create a file system on this shared storage such that both nodes of the OracleAS Cold Failover Cluster can mount this file system. You will use this file system for the following directories:

If you are running a volume manager on the cluster to manage the shared storage, refer to the volume manager documentation for steps to create a volume. Once a volume is created, you can create the file system on that volume.

If you do not have a volume manager, you can create a file system on the shared disk directly. Ensure that the hardware vendor supports this, that the file system can be mounted from either node of the OracleAS Cold Failover Cluster, and that the file system is repairable from either node if a node fails.

To check that the file system can be mounted from either node, do the following steps:

Set up and mount the file system from node 1.

Unmount the file system from node 1.

Mount the file system from node 2 using the same mount point that you used in step 1.

Unmount it from node 2, and mount it on node 1, because you will be running the installer from node 1.

Note:

Only one node of the OracleAS Cold Failover Cluster should mount the file system at any given time. File system configuration files on all nodes of the cluster should not include an entry for the automatic mount of the file system upon a node restart or execution of a global mount command. For example, on UNIX platforms, do not include an entry for this file system in /etc/vfstab file.

8.2.3 Review Recommendations for Automatic Storage Management (ASM)

If you plan to use ASM instances for the OracleAS Metadata Repository database, consider these recommendations:

If you plan to use ASM with Oracle database instances from multiple database homes on the same node, then you should run the ASM instance from an Oracle home that is different from the database homes.

The ASM home should be installed on every cluster node. This prevents the accidental removal of ASM instances that are in use by databases from other homes during the de-installation of a database Oracle home.

8.2.4 Check That Clusterware Is Running (Automated Failovers only)

If you plan to automate failovers in the OracleAS Cold Failover Cluster, then each node in a cluster must be running hardware vendor clusterware.

To check that the clusterware is running, use the command appropriate for your clusterware.

8.2.5 Modify listener.ora file for Existing Database

If there is an existing database on the system on which you are installing and you are performing an installation that includes OracleAS Metadata Repository, you need to modify the listener.ora file for the existing database before proceeding with the installation. Perform the following steps to modify the listener.ora file:

Make sure you set the ORACLE_HOME and ORACLE_SID environment variables for the existing database.

storage device that can be accessed by both nodes. You install OracleAS Infrastructure on this shared storage device.

During normal operation, one node ("node 1") acts as the active node. It mounts the shared storage to access the OracleAS Infrastructure files, runs OracleAS Infrastructure processes, and handles all requests.

If the active node goes down for any reason, the clusterware fails over OracleAS Infrastructure processes to the other node ("node 2"), which now becomes the active node. It mounts the shared storage, runs the processes, and handles all requests.

These nodes appear as one computer to clients through the use of a virtual address. To access the OracleAS Infrastructure, clients, including middle-tier components and applications, use the virtual address associated with the cluster. The virtual address is associated with the active node (node 1 during normal operation, node 2 if node 1 goes down). Clients do not need to know which node (node 1 or node 2) is servicing requests.

You use the virtual hostname in URLs that access the infrastructure. For example, if vhost.mydomain.com is the virtual hostname, the URLs for the Oracle HTTP Server and the Application Server Control would look like the following:

URL for:

Example URL

Oracle HTTP Server, Welcome page

http://vhost.mydomain.com:7777

Oracle HTTP Server, secure mode

https://vhost.mydomain.com:4443

Application Server Control

http://vhost.mydomain.com:1156

Oracle Application Server Middle Tiers

You can install and run the middle tiers on other nodes (nodes that are not running OracleAS Infrastructure). During installation, you set up the middle tiers to use services from the OracleAS Infrastructure installed on the shared storage device.

You can also install and run the middle tiers on the cluster nodes without using an OracleAS Cold Failover Cluster configuration for the middle tiers. In this case, you install middle tiers using the regular installation process. If you do this, make sure the middle tier ports will not conflict with the OracleAS Infrastructure ports when a failover occurs.

This post-installation step configures the CSS daemon. This step is required only if you are using ASM (Automatic Storage Management) feature of the Oracle database, and you do not have an existing Oracle database.

For OracleAS Cold Failover Cluster (Infrastructure), you install both OracleAS Metadata Repository and Oracle Identity Management in the same Oracle home by selecting Identity Management and Metadata Repository in the Select Installation Type screen. This option creates a new database for the OracleAS Metadata Repository and a new Oracle Internet Directory.

Global Database Name: Enter a name for the OracleAS Metadata Repository database. Append a domain name to the database name. This domain name for the global database name can be different from your network domain name.

The domain name portion of the global database name has the following naming restrictions:

The database name portion of the global database name has the following naming restrictions:

Must contain alphanumeric characters only

Must not be longer than eight characters

Must not contain PORT or HOST in uppercase characters. If you want the name to contain "host" or "port", use lowercase characters.

Example: orcl.mydomain.com

Note: Be sure that you do not enter two or more periods together, for example, orcl.mydomain.com. The installer does not check for this, and this will lead to errors later during the installation process.

SID: Enter the system identifier for the OracleAS Metadata Repository database. Typically this is the same as the global database name, but without the domain name. The SID must be unique across all databases.

SIDs have the following naming restrictions:

Must contain alphanumeric characters only

Must not be longer than eight characters

Must not contain PORT or HOST in uppercase characters. If you want the name to contain "host" or "port", use lowercase characters.

Instance Name: Enter a name for this infrastructure instance. Instance names can contain alphanumeric characters and the _ (underscore) character. If you have more than one Oracle Application Server instance on a computer, the instance names must be unique. See Section 3.5, "Oracle Application Server Instances and Instance Names" for instance name details.

Example: infra

ias_admin Password and Confirm Password: Enter and confirm the password for the ias_admin user. This is the administrative user for this infrastructure instance.

The following step is required only if you meet both of these requirements:

You plan to use the Automatic Storage Management (ASM) feature of Oracle Database 10g for the OracleAS Metadata Repository.

Your computer does not have an existing Oracle Database 10g.

If you meet these requirements, you need to configure the Cluster Synchronization Services (CSS) daemon on the other node. The CSS daemon synchronizes ASM instances with the database instances that use the ASM instances for database file storage.

To configure the CSS daemon:

Stop all the processes in the OracleAS Cold Failover Cluster (Infrastructure) home.

Stop the CSS daemon. You can do this by running the following command as root.

# /etc/init.d/init.cssd stop

Fail over the IP and the disk to the other node.

On the other node, run the following command as root:

# $ORACLE_HOME/root.sh

ORACLE_HOME is where you installed the OracleAS Cold Failover Cluster (Infrastructure).

However, the OracleAS Single Sign-On and Oracle Delegated Administration Services components run in an active-active configuration. You have a load balancer to direct requests to the nodes running these components.

This post-installation step configures the CSS daemon. This step is required only if you are using ASM (Automatic Storage Management) feature of the Oracle database, and you do not have an existing Oracle database.

In a distributed OracleAS Cold Failover Cluster (Infrastructure) configuration, you install both OracleAS Metadata Repository and Oracle Identity Management components (except for OracleAS Single Sign-On, Oracle Delegated Administration Services, and OCA) in the same Oracle home by selecting Identity Management and OracleAS Metadata Repository in the Select Installation Type screen. This option creates a new database for the OracleAS Metadata Repository and a new Oracle Internet Directory.

The steps are the same as those listed in step 2, "Install OracleAS Infrastructure", except that in the Select Configuration Options screen, do not select OracleAS Single Sign-On, Oracle Application Server Delegated Administration Services, and OracleAS Certificate Authority (OCA).

Step 3 Perform Post-Installation Steps

The following step is required only if you meet both of these requirements:

You plan to use the Automatic Storage Management (ASM) feature of Oracle Database 10g for the OracleAS Metadata Repository.

Your computer does not have an existing Oracle Database 10g.

If you meet these requirements, you need to configure the CSS daemon on the other node. The CSS daemon synchronizes ASM instances with the database instances that use the ASM instances for database file storage.

To configure the CSS daemon:

Stop all the processes in the OracleAS Cold Failover Cluster (Infrastructure) home.

Stop the CSS daemon. You can do this by running the following command as root.

# /etc/init.d/init.cssd stop

Fail over the IP and the disk to the other node.

On the other node, run the following command as root:

# $ORACLE_HOME/root.sh

ORACLE_HOME is where you installed the OracleAS Cold Failover Cluster (Infrastructure).

This configuration is suitable if you have the OracleAS Metadata Repository database in a separate highly available environment and you want to use an active-passive configuration for the Oracle Identity Management components. You install the Oracle Identity Management components on a shared disk different from the share disk that contains the OracleAS Metadata Repository database.

This configuration includes:

two clustered nodes

storage devices local to each node

two shared disks that can be accessed by both nodes. One shared disk contains the Oracle home for the database (on which you will load the OracleAS Metadata Repository), and on the other shared disk, you will install Oracle Identity Management.

During normal operation, node 1, which is the primary node, is the active node. It mounts both shared disks to access the Oracle Identity Management and database files, runs the Oracle Identity Management and database processes, and handles all requests.

If node 1 goes down for any reason, the clusterware fails over the Oracle Identity Management and database processes to node 2. Node 2 becomes the active node, mounts both shared disks, runs the processes, and handles all requests.

To access the active node in an OracleAS Cold Failover Cluster, clients, including middle-tier components and applications, use the virtual hostname associated with the OracleAS Cold Failover Cluster. The virtual hostname is associated with the active node (node 1 during normal operation, node 2 if node 1 goes down). Clients do not need to know which node (primary or secondary) is servicing requests.

You also use the virtual hostname in URLs that access the infrastructure. For example, if vhost.mydomain.com is the name of the virtual host, the URLs for the Oracle HTTP Server and the Application Server Control would look like the following:

Instance Name: Enter a name for this infrastructure instance. Instance names can contain alphanumeric characters and the _ (underscore) character. If you have more than one Oracle Application Server instance on a computer, the instance names must be unique. See Section 3.5, "Oracle Application Server Instances and Instance Names" for instance name details.

if you want to run Oracle Internet Directory and Oracle Directory Integration Platform on the same tier as your database, and Oracle Delegated Administration Services and OracleAS Single Sign-On on a different tier

if you want to install the OracleAS Metadata Repository in an existing cold failover cluster database

In this tier, during normal operation, the active node mounts the shared disks to access the Oracle Identity Management and database; runs the Oracle Internet Directory, Oracle Directory Integration Platform, and database processes; and handles all requests.

If the active node goes down for any reason, the clusterware fails over the processes to the secondary node (node 2), which becomes the new active node, mounts the shared disks, runs the processes, and handles all requests.

To access the active node, clients, including middle-tier components and applications, use the virtual hostname. The virtual hostname is associated with the active node (which is the primary node during normal operation, the secondary node upon failover). Clients do not need to know which node (primary or secondary) is servicing requests.

You need to use the virtual hostname in URLs to access the active node. For example, if vhost.mydomain.com is the virtual hostname, the URLs for the Oracle HTTP Server and the Application Server Control for this tier would look like the following:

Note that the nodes in this tier are not clustered. Both nodes are active at the same time, and you install the files locally on each node. To access these nodes, clients go through a load balancer. For example, if the name of the load balancer is loadbalance1.mydomain.com, the URLs for the Oracle HTTP Server and the Application Server Control for this tier would look like the following:

Instance Name: Enter a name for this infrastructure instance. Instance names can contain alphanumeric characters and the _ (underscore) character. If you have more than one Oracle Application Server instance on a computer, the instance names must be unique. See Section 3.5, "Oracle Application Server Instances and Instance Names" for instance name details.

Install these components in an OracleAS Cluster (Identity Management) configuration. In this configuration, you install them on the local disks of each node. You perform these installations separately.

You need two sets of clustered nodes. See Figure 8-5. One set runs the OracleAS Metadata Repository and Oracle Internet Directory, and another set runs Oracle Delegated Administration Services and OracleAS Single Sign-On.

For each set, you need a shared storage and a virtual hostname. You install Oracle homes for the various Oracle Application Server components on the shared storage.

The steps are the same as those listed in step 2, "Install OracleAS Infrastructure", except that in the Select Configuration Options screen, do not select OracleAS Single Sign-On and Oracle Application Server Delegated Administration Services.

This post-installation step configures the CSS daemon. This step is required only if you are using ASM (Automatic Storage Management) feature of the Oracle database, and you do not have an existing Oracle database.

Install OracleAS Metadata Repository and Oracle Internet Directory in the same Oracle home by selecting Identity Management and OracleAS Metadata Repository in the Select Installation Type screen. This option creates a new database for the OracleAS Metadata Repository and a new Oracle Internet Directory.

Stop the processes that are running in the Oracle home where you installed Oracle Delegated Administration Services and OracleAS Single Sign-On.

Stop the Application Server Control.

prompt> ORACLE_HOME/bin/emctl stop iasconsole

Stop the components.

prompt> ORACLE_HOME/opmn/bin/opmnctl stopall

Step 7 Perform Post-Installation Steps

The following step is required only if you meet both of these requirements:

You plan to use the Automatic Storage Management (ASM) feature of Oracle Database 10g for the OracleAS Metadata Repository.

Your computer does not have an existing Oracle Database 10g.

If you meet these requirements, you need to configure the CSS daemon on the other node. The CSS daemon synchronizes ASM instances with the database instances that use the ASM instances for database file storage.

To configure the CSS daemon:

Stop all the processes in the OracleAS Cold Failover Cluster (Infrastructure) home.

Stop the CSS daemon. You can do this by running the following command as root.

# /etc/init.d/init.cssd stop

Fail over the IP and the disk to the other node.

On the other node, run the following command as root:

# $ORACLE_HOME/root.sh

ORACLE_HOME is where you installed the OracleAS Cold Failover Cluster (Infrastructure).

This section describes how to install the OracleAS Metadata Repository in a new database (that is, the installer will create a new database for you and populate it with the OracleAS Metadata Repository). You can use this database in an OracleAS Cold Failover Cluster environment.

8.9.1 Edit the ORACLE_HOME/Apache/Apache/htdocs/index.html File

In the ORACLE_HOME/Apache/Apache/htdocs/index.html file, change all occurrences of the physical hostname (example: node1) to the virtual hostname (example: vhost), where node1 appears as a hostname.

Note that if node1 is used as part of the Oracle Application Server instance name, do not change it.

8.9.2 Copy the /var/opt/oracle Directory to the Other Node

After the OracleAS Infrastructure installation is complete, copy the /var/opt/oracle directory from the node where you performed the installation to the other node in the OracleAS Cold Failover Cluster. This ensures that you can run the installer to update the Oracle home from either node in the cluster.

Be sure to keep the two /var/opt/oracle directories in sync. Whenever you run the installer to update the infrastructure, you need to copy the oracle directory to the other node.

The /var/opt/oracle directory is not used during runtime by Oracle Application Server. It is used only by the installer.

Before you can start, stop or check the status of Database Console against a cold failover cluster database, you need to set the ORACLE_HOSTNAME environment variable to the virtual hostname. For example, in Figure 8-1, the virtual hostname is vhost.mydomain.com. You would set ORACLE_HOSTNAME as follows:

C shell:

$ setenv ORACLE_HOSTNAME vhost.mydomain.com

Bourne or Korn shell:

% ORACLE_HOSTNAME=vhost.mydomain.com
% export ORACLE_HOSTNAME

After setting the variable, you can then run the "emctlactiondbconsole" commands, where action is start, stop, or status (for example, emctl start dbconsole).

8.9.4 Edit the oraInst.loc and oratab Files on the Secondary Node

After the OracleAS Infrastructure installation is complete, edit the /etc/oraInst.loc and /etc/oratab files on the secondary node. T

Edit the oratab file on the secondary node as follows:

Create or edit a /etc/oratab file.

Copy the oratab entries from the primary node for the Metadata Repository, created during the OracleAS Cold Failover Cluster installation.

For example, copy the following entries from the oratab file on the primary node to the oratab file on the secondary node where /mnt/app/oracle/OraInfra_10_1_4 is the Oracle Home directory:

Create the oraInst.loc file on the secondary node by copying the oraInst.loc file from the primary node to the secondary node. The oraInst.loc file is not used during runtime by Oracle Application Server. It is used only by the installer.

8.9.5 Create a Clusterware Agent for Automatic Failover

An OracleAS Cold Failover Cluster environment provides the framework for a manual failover of OracleAS Infrastructure. To achieve automatic failover, you must set up an agent using the clusterware. An example of automatic failover is setting up the secondary node to monitor the heart beat of the primary node and when the secondary node detects that the primary node is down, the virtual IP address, shared storage, and all the OracleAS Infrastructure processes are failed over to the secondary node.

This section describes how to install middle tiers that are not in a cold failover cluster configuration against an OracleAS Cold Failover Cluster infrastructure.

For non-cold failover cluster middle tiers to work with OracleAS Infrastructure in an OracleAS Cold Failover Cluster, you can install the middle tiers on computers outside the cluster, or on nodes within the cluster.

Note:

The preferred solution is to install and run the non-cold failover cluster middle tiers on nodes outside the OracleAS Cold Failover Cluster.

8.10.1.1Create a staticports.ini File for the Middle Tier

Ensure that the ports used by the middle tier are not the same as the ports used by the infrastructure. The reason is that the infrastructure can fail over from the primary to the secondary node (and vice versa), and there must not be any port conflicts on either node. The same ports must be reserved for the infrastructure on both nodes.

If the infrastructure is running on the same node where you want to install the middle tier, the installer can detect which ports are in use and select different ports for the middle tier. For example, if the infrastructure is running on the primary node, and you run the installer on the primary node to install the middle tier, then the installer can assign different ports for the middle tier.

However, if the infrastructure is running on a node different from where you want to install the middle tier, the installer cannot detect which ports are used by the infrastructure. For example, if the infrastructure is running on the primary node but you want to install the middle tier on the secondary node, the installer is unable to detect which ports the infrastructure is using. In this situation, you need to set up a staticports.ini file to specify port numbers for the middle tier. See Section 2.6.3, "Using Custom Port Numbers (the "Static Ports" Feature)" for details.

To see which ports the infrastructure is using, view the ORACLE_HOME/install/portlist.ini file, where ORACLE_HOME refers to the directory where you installed the infrastructure.

8.10.1.2 Rename the /etc/oraInst.loc File Used for the Infrastructure

Set up the environment so that the middle tier will have its own inventory directory, instead of using the same inventory directory used by the infrastructure. To do this, you need to rename the /etc/oraInst.loc file to something else so that the installer will prompt you to enter a new inventory directory. The following example renames it to oracle.infra.

(1) This command renames the oracle directory created by the installer when it installed the middle tier.

(2) This command renames the oracle.infra directory back to oracle.

The /etc/oraInst.loc file is not used during Oracle Application Server runtime. The only time you need it is when you run the installer (for example, to de-install an instance or to expand an instance).

Be sure the correct oracle directory is in place before you run the installer.

To install middle tiers against OracleAS Infrastructure in an OracleAS Cold Failover Cluster, follow the middle tier installation procedures as documented in Oracle Application Server Installation Guide for the middle tier release, but with these differences:

In the Register with Oracle Internet Directory screen, enter the virtual hostname in the Hostname field.

If you are installing the middle tier on an OracleAS Cold Failover Cluster node, you must follow these additional requirements:

If you install middle-tiers that are not in a cold failover cluster configuration on the same nodes as an OracleAS Cold Failover Cluster infrastructure, then the ports used for the middle tiers must be different from the ones used for any OracleAS Infrastructure installed on the same cluster. The ports must also be different from those used for other Oracle Homes on the same node. To check the ports assigned to components in any Oracle Home, see the Ports page on the Application Server Control Console.