Overview
In the dynamic landscape of enterprise IT, high availability, scalability, and disaster recovery are not just buzzwords; they are fundamental pillars for business continuity. Oracle Real Application Clusters (RAC) has stood as a cornerstone technology for achieving these objectives for decades. With Oracle RAC 19c, the latest Long Term Support release, organizations benefit from enhanced performance, simplified management, and robust resilience features, making it an indispensable component for mission-critical applications like Oracle PeopleSoft. A two-node RAC cluster on Oracle Enterprise Linux (OEL) 8, leveraging Grid Infrastructure 19c, provides a potent, highly available database foundation capable of withstanding various failure scenarios while delivering consistent performance.
This comprehensive article, penned for senior technologists and DBAs, delves into the intricate process of setting up a two-node Oracle RAC 19c cluster on OEL 8. We will navigate through the prerequisites, system preparations, Grid Infrastructure installation, and database creation, providing real-world commands and configurations. Our goal is to equip you with the knowledge to deploy a robust RAC environment, ensuring your PeopleSoft applications, or any other critical Oracle-dependent system, operate with maximum uptime and efficiency.
Prerequisites
A successful Oracle RAC deployment hinges on meticulous preparation. Overlooking any detail can lead to significant delays and complex troubleshooting. This section outlines the essential hardware, software, network, and operating system prerequisites.
Hardware Requirements
- Servers (Nodes): Two physical or virtual machines, each with:
- CPU: Minimum 4 vCPUs (8+ recommended for production).
- Memory: Minimum 16 GB RAM (32+ GB recommended).
- Local Storage: At least 100 GB for OS, Oracle Grid Infrastructure, and Database binaries on each node.
- Shared Storage: Essential for Oracle RAC. This can be SAN (Fibre Channel/iSCSI), NAS (NFS), or Oracle ACFS. For this guide, we'll assume iSCSI for ASM disks.
- OCR/Voting Disks: Minimum 3 disks, each 1 GB. (For high redundancy, 5 disks are better).
- DATA Disk Group: Minimum 2 disks, each 50 GB or more (depending on database size).
- FRA Disk Group: Minimum 2 disks, each 20 GB or more.
Software Requirements
- Operating System: Oracle Enterprise Linux (OEL) 8.x (specifically, OEL 8.4 or higher is recommended for 19c). Ensure all nodes have identical OS versions and patches.
- Oracle Grid Infrastructure Software: Oracle 19c (19.x.0.0.0) for Linux x86-64.
- Oracle Database Software: Oracle 19c (19.x.0.0.0) for Linux x86-64.
Network Configuration
Each node requires multiple network interfaces:
- Public Network: For client connections and administration.
- Private Interconnect Network: High-speed, low-latency, non-routable network for inter-node communication (cache fusion).
We'll use the following IP schema for our two nodes (racnode1 and racnode2):
# Node 1: racnode1
Public IP: 192.168.1.101
Private IP: 10.0.0.1
VIP: 192.168.1.111
# Node 2: racnode2
Public IP: 192.168.1.102
Private IP: 10.0.0.2
VIP: 192.168.1.112
# SCAN IPs (3 IPs recommended for 2 nodes, resolved by DNS or /etc/hosts)
SCAN IP 1: 192.168.1.121
SCAN IP 2: 192.168.1.122
SCAN IP 3: 192.168.1.123
# Hostname resolution (add to /etc/hosts on both nodes)
192.168.1.101 racnode1
192.168.1.102 racnode2
192.168.1.111 racnode1-vip
192.168.1.112 racnode2-vip
10.0.0.1 racnode1-priv
10.0.0.2 racnode2-priv
192.168.1.121 rac-scan rac-scan.technews.com
192.168.1.122 rac-scan rac-scan.technews.com
192.168.1.123 rac-scan rac-scan.technews.com
Operating System Configuration (on both nodes)
Ensure a clean installation of OEL 8.x. Then perform the following:
- Disable SELinux:
sudo sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config sudo setenforce 0 - Disable Firewall (for simplicity in lab, enable and configure in production):
sudo systemctl stop firewalld sudo systemctl disable firewalld - Install Required Packages:
sudo dnf install -y oracle-database-preinstall-19cThis package handles most kernel parameters, user/group creation, and other OS prerequisites.
- Create Oracle Users and Groups (if not done by preinstall package):
sudo groupadd -g 500 oinstall sudo groupadd -g 501 dba sudo groupadd -g 502 oper sudo groupadd -g 503 backupdba sudo groupadd -g 504 dgdba sudo groupadd -g 505 kmdba sudo groupadd -g 506 asmdba sudo groupadd -g 507 asmoper sudo groupadd -g 508 asmadmin sudo useradd -u 500 -g oinstall -G dba,oper,backupdba,dgdba,kmdba,asmdba,asmoper,asmadmin oracle sudo passwd oracle # Set a strong password - Create Oracle Base and Inventory Directories:
sudo mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1 sudo mkdir -p /u01/app/19.0.0/grid sudo mkdir -p /u01/app/oraInventory sudo chown -R oracle:oinstall /u01 sudo chmod -R 775 /u01 - Configure SSH Equivalency (as oracle user):
This is crucial for Grid Infrastructure installation. From
racnode1, generate SSH keys and copy them toracnode2, then test.# On racnode1, as oracle user ssh-keygen -t rsa ssh-copy-id oracle@racnode1 ssh-copy-id oracle@racnode2 # Test connectivity without password from racnode1 ssh racnode2 date - Configure User Environment Variables (in ~/.bash_profile for oracle user):
export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1 export GRID_HOME=/u01/app/19.0.0/grid export ORACLE_SID=+ASM1 export PATH=$PATH:$ORACLE_HOME/bin:$GRID_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$GRID_HOME/libNote: For Grid Home, ORACLE_SID will be +ASM1 or +ASM2 depending on the node. For DB Home, it will be the database SID.
Shared Storage Setup (iSCSI for ASM)
Assuming you have an iSCSI target server providing LUNs, configure iSCSI initiators on both RAC nodes. The following steps are performed on both nodes.
# Install iSCSI initiator utilities
sudo dnf install -y iscsi-initiator-utils
# Discover iSCSI targets (replace 192.168.1.200 with your iSCSI target IP)
sudo iscsiadm -m discovery -t st -p 192.168.1.200
# Log in to the targets
sudo iscsiadm -m node -L all -p 192.168.1.200 --login
# Verify disks (look for new /dev/sdX devices)
sudo fdisk -l | grep "Disk /dev/sd"
Identify your shared disks (e.g., /dev/sdb, /dev/sdc, /dev/sdd, /dev/sde, /dev/sdf). We will use udev rules to ensure persistent, consistent device names across reboots and nodes.
# Create udev rules file
sudo vi /etc/udev/rules.d/99-oracle-asmdisks.rules
# Add entries for your disks (replace sdb, sdc, etc., with your actual disk names)
# Assuming 3 for OCR/Voting, 2 for DATA, 2 for FRA
# Example:
KERNEL=="sd*", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM="/usr/lib/udev/scsi_id --whitelisted --device=/dev/$name", RESULT=="360014400000000000000000000010000", SYMLINK+="oracleasm/asm-disk1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM="/usr/lib/udev/scsi_id --whitelisted --device=/dev/$name", RESULT=="360014400000000000000000000010001", SYMLINK+="oracleasm/asm-disk2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM="/usr/lib/udev/scsi_id --whitelisted --device=/dev/$name", RESULT=="360014400000000000000000000010002", SYMLINK+="oracleasm/asm-disk3", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM="/usr/lib/udev/scsi_id --whitelisted --device=/dev/$name", RESULT=="360014400000000000000000000010003", SYMLINK+="oracleasm/asm-disk4", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM="/usr/lib/udev/scsi_id --whitelisted --device=/dev/$name", RESULT=="360014400000000000000000000010004", SYMLINK+="oracleasm/asm-disk5", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM="/usr/lib/udev/scsi_id --whitelisted --device=/dev/$name", RESULT=="360014400000000000000000000010005", SYMLINK+="oracleasm/asm-disk6", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM="/usr/lib/udev/scsi_id --whitelisted --device=/dev/$name", RESULT=="360014400000000000000000000010006", SYMLINK+="oracleasm/asm-disk7", OWNER="grid", GROUP="asmadmin", MODE="0660"
To get the RESULT (SCSI ID), use: /usr/lib/udev/scsi_id --whitelisted --device=/dev/sdb for each disk. Remember to set OWNER="grid" and GROUP="asmadmin" as the Oracle Grid Infrastructure installer will use these. Note that the oracle-database-preinstall-19c package automatically creates the grid user and asmadmin group.
# Reload udev rules and trigger them
sudo udevadm control --reload-rules
sudo udevadm trigger
# Verify the symlinks
ls -l /dev/oracleasm/
Step-by-Step Implementation
With all prerequisites met, we can proceed with the installation of Oracle Grid Infrastructure and the Oracle Database.
1. Install Oracle Grid Infrastructure 19c
This phase involves installing the Clusterware and ASM software.
- Download and Unzip Grid Infrastructure Software:
Download
LINUX.X64_193000_grid_home.zipfrom Oracle Support. Transfer it to/u01/app/19.0.0/gridonracnode1and unzip as theoracleuser.# On racnode1, as oracle user cd /u01/app/19.0.0/grid unzip /path/to/LINUX.X64_193000_grid_home.zip - Run Grid Infrastructure Installer:
Execute the installer from the Grid Home on
racnode1. This will launch a GUI.# On racnode1, as oracle user cd /u01/app/19.0.0/grid ./gridSetup.shFollow the wizard:
- Select Configuration Option: "Configure and Install Grid Infrastructure for a Cluster".
- Select Cluster Type: "Oracle RAC database".
- ASM Disk Group:
- Disk Group Name:
+CRS(for OCR and Voting Disks) - Redundancy: "External" (if using hardware RAID) or "Normal" (for ASM mirroring, requires 3 disks). We'll use "Normal" for 3 disks.
- Add Disks: Select the 3 disks designated for OCR/Voting (e.g.,
/dev/oracleasm/asm-disk1,/dev/oracleasm/asm-disk2,/dev/oracleasm/asm-disk3).
- Disk Group Name:
- Cluster Name:
raccluster - SCAN Name:
rac-scan.technews.com(ensure this resolves to the 3 SCAN IPs in/etc/hostsor DNS). - SCAN Port:
1521 - Node Information: Add both nodes (
racnode1andracnode2) with their public hostnames. The installer will verify SSH connectivity. - Network Interface Usage:
enp0s3(or similar, your public interface): "Public"enp0s8(or similar, your private interface): "Private"
- ASM Password: Set passwords for ASM SYS and ASMSNMP users.
- Installation Options: Specify Oracle Base (
/u01/app/oracle) and Grid Infrastructure Home (/u01/app/19.0.0/grid). - Inventory Directory:
/u01/app/oraInventory - Operating System Groups:
- Oracle ASM Administrator Group:
asmadmin - Oracle ASM DBA Group:
asmdba - Oracle ASM Operator Group:
asmoper
- Oracle ASM Administrator Group:
- Prerequisite Checks: The installer will run checks. Address any warnings or errors. You might need to click "Fix & Check Again" if the preinstall package didn't cover everything.
- Summary: Review the configuration and click "Install".
- Run Root Scripts:
During the installation, the installer will prompt you to run two root scripts on each node. Execute them in the specified order:
# On racnode1, as root /u01/app/oraInventory/createCentralInventory.sh /u01/app/19.0.0/grid/root.sh # On racnode2, as root /u01/app/19.0.0/grid/root.shAfter running the scripts, return to the installer GUI and click "OK" or "Continue".
- Post-Installation Verification:
Verify the cluster status from either node as the
griduser (ororacleif that's your designated Grid user withasmadmingroup).# As oracle user . /u01/app/19.0.0/grid/bin/oraenv # Set GRID_HOME crsctl status res -t crsctl stat resource -t -initEnsure all resources (CRS, ASM, SCAN, Listeners, VIPs) are online.
2. Configure Additional ASM Disk Groups (for DATA and FRA)
After Grid Infrastructure is up, create disk groups for your database data and Fast Recovery Area (FRA).
# As oracle user, set GRID_HOME
. /u01/app/19.0.0/grid/bin/oraenv
# Launch ASM Configuration Assistant
asmca
In the ASMCA GUI:
- Click "Disk Groups" tab.
- Click "Create".
- DATA Disk Group:
- Disk Group Name:
DATA - Redundancy: "Normal" (requires 2 disks for mirroring).
- Select Disks: Choose
/dev/oracleasm/asm-disk4and/dev/oracleasm/asm-disk5. - Click "OK".
- Disk Group Name:
- FRA Disk Group:
- Disk Group Name:
FRA - Redundancy: "Normal" (requires 2 disks for mirroring).
- Select Disks: Choose
/dev/oracleasm/asm-disk6and/dev/oracleasm/asm-disk7. - Click "OK".
- Disk Group Name:
Verify disk groups:
# As oracle user
asmcmd lsdg
[oracle@racnode1 ~]$ asmcmd lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED NORMAL N 512 4096 1048576 3070 2966 512 1227 0 Y CRS/
MOUNTED NORMAL N 512 4096 1048576 51198 51174 10240 20467 0 N DATA/
MOUNTED NORMAL N 512 4096 1048576 20478 20454 4096 8179 0 N FRA/
3. Install Oracle Database Software 19c
This installs the database binaries on both nodes.
- Download and Unzip Database Software:
Download
LINUX.X64_193000_db_home.zipfrom Oracle Support. Transfer it to/u01/app/oracle/product/19.0.0/dbhome_1onracnode1and unzip as theoracleuser.# On racnode1, as oracle user cd /u01/app/oracle/product/19.0.0/dbhome_1 unzip /path/to/LINUX.X64_193000_db_home.zip - Run Database Installer:
Execute the installer from the Database Home on
racnode1.# On racnode1, as oracle user cd /u01/app/oracle/product/19.0.0/dbhome_1 ./runInstallerFollow the wizard:
- Select Configuration Option: "Set Up Software Only". (We'll create the database with DBCA later).
- Database Installation Option: "Oracle Real Application Clusters database installation".
- Select Nodes: Ensure both
racnode1andracnode2are selected. The installer will verify SSH connectivity. - Database Edition: "Enterprise Edition".
- Oracle Base:
/u01/app/oracle - Software Location:
/u01/app/oracle/product/19.0.0/dbhome_1 - Operating System Groups:
- Database Administrator Group:
dba - Database Operator Group:
oper - Database Backup and Recovery Group:
backupdba - Data Guard Administrative Group:
dgdba - Encryption Key Management Administrative Group:
kmdba
- Database Administrator Group:
- Prerequisite Checks: Address any issues.
- Summary: Review and click "Install".
- Run Root Script:
The installer will prompt you to run a root script on each node.
# On racnode1, as root /u01/app/oracle/product/19.0.0/dbhome_1/root.sh # On racnode2, as root /u01/app/oracle/product/19.0.0/dbhome_1/root.shAfter running, click "OK" in the installer GUI.
4. Create an Oracle RAC Database
Now, we use the Database Configuration Assistant (DBCA) to create our RAC database.
# On racnode1, as oracle user, set DB_HOME
. /u01/app/oracle/product/19.0.0/dbhome_1/bin/oraenv
dbca
Follow the DBCA wizard:
- Database Operation: "Create Database".
- Creation Mode: "Advanced Configuration".
- Database Type: "Oracle Real Application Clusters database". Select both nodes.
- Configuration Type: "Container database (CDB)" (recommended for 19c and PeopleSoft).
- Database Name:
PSFTDB(or your desired name). - Pluggable Database (PDB) Name:
PSFTPDB1(or your desired PDB name). - Storage Type: "Automatic Storage Management (ASM)".
- Database Files Location: Select the
DATAdisk group. - Fast Recovery Area: Select the
FRAdisk group. - Initialization Parameters: Customize memory (SGA/PGA), character sets (AL32UTF8 recommended for PeopleSoft), and other parameters as needed.
- Listener: Select the existing SCAN Listener.
- Passwords: Set passwords for SYS, SYSTEM, and PDBADMIN.
- Creation Options: "Create Database" and optionally "Create database template" or "Generate database creation scripts".
- Summary: Review and click "Finish" to start database creation.
5. Post-Installation Verification
After DBCA completes, verify the database and cluster services.
# As oracle user, set GRID_HOME
. /u01/app/19.0.0/grid/bin/oraenv
# Check cluster resources
crsctl status res -t
# Check database services
srvctl status database -d PSFTDB
srvctl status instance -d PSFTDB -i PSFTDB1,PSFTDB2
srvctl status service -d PSFTDB
# Check listeners
ls