Building a Two-Node Oracle RAC 26ai Lab on VirtualBox – Complete Implementation

Oracle AI Database 26ai two-node RAC lab with RAC1 and RAC2 servers connected to RACDB on VirtualBox

Alhamdulillah, this article documents my completed two-node Oracle RAC lab built on VirtualBox using Oracle Linux 9.8 and Oracle AI Database 26ai. It covers the lab architecture, shared ASM storage, Grid Infrastructure installation, SCAN and VIP configuration, RAC database creation with DBCA, and the validation commands used to confirm that both instances and the PDB were running successfully.

1. Lab overview

The lab runs on a Windows Server 2025 host with Oracle VirtualBox. Two Oracle Linux 9.8 virtual machines form the RAC cluster. A separate BIND DNS virtual machine provides name resolution for the node names, VIPs and SCAN name.

ComponentConfiguration
HostWindows Server 2025 with VirtualBox
Guest OSOracle Linux 9.8
Cluster nodesrac1 and rac2
DNSDedicated BIND DNS VM
DatabaseOracle AI Database 26ai, 23.26.1.0.0
Database nameRACDB
Global database nameRACDB.lab.local
CDB / PDBRACDB / RACPDB1
Cluster mode / ASMFlex cluster with Flex ASM

2. Network design

The Grid Infrastructure installer identified both cluster nodes and their configured host names. The screenshot below shows the node information used during cluster configuration.

Grid Infrastructure installer showing cluster node information for rac1 and rac2
Grid Infrastructure cluster node information.

Each RAC node has a public interface, a private interconnect interface and a NAT interface. The public network is used for client and cluster-facing connectivity, while the private network is dedicated to the RAC interconnect. IP addresses in the tables below have been partially masked for privacy; substitute the actual lab addresses when reproducing the configuration.

NetworkRAC1RAC2
Public192.168.56.XX192.168.56.XX
Private interconnect10.10.10.XX10.10.10.XX
Node VIP192.168.56.XX192.168.56.XX
NAT10.0.2.XX10.0.2.XX
Grid Infrastructure network interface usage screen with public and private interfaces
Public and private network interface roles.

The SCAN name is rac-scan.lab.local and resolves through DNS to three SCAN VIP addresses (masked here for privacy). SCAN listeners use TCP port 1521.

nslookup rac-scan.lab.local
lsnrctl status LISTENER_SCAN1

Name resolution returned all three SCAN addresses, and the SCAN listener status showed the RAC database and PDB services registered and READY.

SCAN VIP and SCAN listener status output
SCAN VIP and SCAN listener status.

3. Shared VirtualBox storage and ASM

RAC requires shared storage that both nodes can access. For this lab, the ASM virtual disks were created as Shareable VDI files and attached to both RAC VMs. The shared disks were kept separate from each VM’s operating-system disk.

ASM disk groupShared disk allocationRedundancyPurpose
CRSThree 10 GB disksNORMALCluster registry and voting files
DATA30 GB diskEXTERNALDatabase files
RECO30 GB diskEXTERNALRecovery area

Persistent device ownership and permissions were configured with udev rules in /etc/udev/rules.d/99-oracle-asm.rules. The ASM devices were assigned to the Grid owner and the appropriate ASM group with mode 0660.

Grid Infrastructure installer creating the CRS ASM disk group with NORMAL redundancy
Creating the CRS disk group with NORMAL redundancy during Grid Infrastructure configuration.

All five ASM VDI files were shared between rac1 and rac2, with separate VDI files for each disk group. The CRS disk group was configured with three voting disks using NORMAL redundancy, while DATA and RECO used EXTERNAL redundancy. The three CRS voting disks were online, and CRS, DATA and RECO were mounted on both nodes. External redundancy means ASM does not provide disk-group mirroring, so the underlying storage protection must be considered separately.

# Confirm ASM instances are running on both nodes
srvctl status asm
# Confirm the three CRS voting disks are online
crsctl query css votedisk

4. Grid Infrastructure and cluster validation

The Grid Infrastructure home was /u01/app/23.0.0/grid. Grid Infrastructure was installed and configured on both nodes. The cluster reported Flex mode, and both nodes were Active.

Grid Infrastructure installer configuration option screen
Grid installer configuration option.
Grid Infrastructure cluster configuration screen
Cluster configuration screen.
Grid Infrastructure installation and configuration progress screen
Grid Infrastructure installation and configuration progress.

Clusterware, CSS and EVM were online on both nodes. ASM was running on rac1 and rac2. The CRS, DATA and RECO disk groups were mounted, and the three voting disks were online.

# List cluster nodes with node numbers
olsnodes -n
# Show node status (Active / Inactive)
olsnodes -s -n
# Confirm cluster mode (Flex)
crsctl get cluster mode status
# Show all Clusterware resources and their state
crsctl stat res -t

5. Oracle Database software

The database home was configured as /u01/app/oracle/product/23.0.0/dbhome_1. The installed Oracle AI Database release was 23.26.1.0.0. The database home was present on both nodes, with matching patch inventory.

The Database home (dbhome_1) inventory included patch 38743688 (OCW) and patch 38743669 (Database RU 23.26.1). The Grid Infrastructure home (/u01/app/23.0.0/grid) has its own inventory, which also included additional Grid Infrastructure patch components.

6. Creating the RAC database with DBCA

After validating Grid Infrastructure, ASM and the database software, I created the RAC database using Database Configuration Assistant (DBCA).

DBCA select database operation screen
DBCA – select database operation.
DBCA RAC database deployment type selection
RAC deployment type.
DBCA node selection with rac1 and rac2
Node selection – rac1 and rac2.
DBCA database identification screen with RACDB and RACPDB1
Database name and identification.
DBCA storage option using ASM disk group DATA
ASM storage selection (+DATA).
DBCA Fast Recovery Area configuration on RECO disk group
Fast Recovery Area on +RECO.
DBCA memory configuration screen
Memory configuration.
DBCA redo log group configuration
Redo log group configuration.

The final DBCA settings were:

SettingValue
Database name / SID prefixRACDB / racdb
Global database nameRACDB.lab.local
Instancesracdb1 on rac1; racdb2 on rac2
ArchitectureContainer database enabled
PDBRACPDB1
UndoLocal undo
Character setAL32UTF8
National character setAL16UTF16
Block size8192 bytes
SGA / PGA2048 MB / 1024 MB per instance
Processes320
Data filesASM, +DATA
Recovery area+RECO, configured at 20,000 MB
LoggingARCHIVELOG enabled

During the prerequisite checks, DBCA reported a HugePages warning for this lab configuration.

DBCA prerequisite check showing a HugePages warning
HugePages prerequisite warning encountered during this lab.

DBCA completed successfully. The SPFILE and password file were stored in ASM. The database was registered with Clusterware using automatic management.

DBCA database creation complete screen
DBCA database creation complete.

7. Validate database registration and instances

First, I checked the database configuration and runtime status through SRVCTL.

srvctl config database -db RACDB
srvctl status database -db RACDB
srvctl status service -db RACDB

The database was registered with instances racdb1 and racdb2 on rac1 and rac2. Both instances were running, and the application service was active on both nodes.

Both RAC instances racdb1 and racdb2 OPEN and ACTIVE
Both RAC instances OPEN and ACTIVE.

I also queried GV$INSTANCE to verify the instances from the database:

SET LINESIZE 150 PAGESIZE 100
COL INST_ID FORMAT 99
COL INSTANCE_NAME FORMAT A15
COL HOST_NAME FORMAT A20
COL STATUS FORMAT A10
COL DATABASE_STATUS FORMAT A15
SELECT
INST_ID,
INSTANCE_NAME,
HOST_NAME,
STATUS,
DATABASE_STATUS
FROM
GV$INSTANCE
ORDER BY
INST_ID;

The query returned two instances: racdb1 on rac1.lab.local and racdb2 on rac2.lab.local. Both reported OPEN and ACTIVE.

GV$INSTANCE query output showing two RAC instances
GV$INSTANCE two-node validation.

8. Validate the PDB on both instances

The PDB RACPDB1 was open in READ WRITE mode on both RAC instances.

SET LINESIZE 120 PAGESIZE 100
COL INST_ID FORMAT 99
COL NAME FORMAT A15
COL OPEN_MODE FORMAT A12
SELECT
INST_ID,
NAME,
OPEN_MODE
FROM
GV$PDBS
WHERE
NAME = 'RACPDB1'
ORDER BY
INST_ID;
Database and PDB RACPDB1 open modes on both RAC instances
Database and PDB open modes on both instances.

9. RAC service configuration

The application service was named RACDB_RACPDB1 and was associated with PDB RACPDB1. It was configured with cardinality 2, PRIMARY role, automatic management policy and both RAC instances as preferred instances.

srvctl config service -db RACDB
srvctl status service -db RACDB

The service was running on racdb1 and racdb2. The configured failover type was NONE; therefore, an existing client session should not be assumed to survive an instance failure. A new connection can be routed to a surviving instance when the service is available there.

10. Test client connectivity through SCAN

I configured a TNS alias that uses the SCAN name and the RAC application service:

RACPDB1 =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = rac-scan.lab.local)
(PORT = 1521)
)
(CONNECT_DATA =
(SERVICE_NAME = RACDB_RACPDB1.lab.local)
)
)

From SQL*Plus, I connected interactively so that the password was entered at the prompt rather than embedded in a command or connection string.

sqlplus /nolog
CONNECT SYSTEM@RACPDB1

The connection succeeded. I used the following query to identify the database, container and instance that accepted the connection:

SET LINESIZE 120
COL DB_NAME FORMAT A10
COL CON_NAME FORMAT A12
COL INSTANCE_NAME FORMAT A15
COL SERVER_HOST FORMAT A15
SELECT
SYS_CONTEXT('USERENV','DB_NAME') DB_NAME,
SYS_CONTEXT('USERENV','CON_NAME') CON_NAME,
SYS_CONTEXT('USERENV','INSTANCE_NAME') INSTANCE_NAME,
SYS_CONTEXT('USERENV','SERVER_HOST') SERVER_HOST
FROM DUAL;

The connection test returned the following session details:

DB_NAME CON_NAME INSTANCE_NAME SERVER_HOST
---------- ------------ --------------- ---------------
RACDB RACPDB1 racdb2 rac2

The client connected using the SCAN-based service alias. The SCAN listener redirected the connection to the local listener on rac2, where the session was established on instance racdb2. This is a successful connectivity check. It does not by itself prove that repeated connections will distribute evenly across both nodes, and it is not a failover test.

11. Final cluster resource check

After both RAC nodes had completed startup, I captured the final Clusterware resource status using:

crsctl stat res -t

The final output showed the key cluster resources ONLINE and STABLE on both nodes. The optional helper, CDP, CVU helper and Rapid Home Provisioning resources remained OFFLINE; these were not required for the database and service validation performed in this lab.

The following is the actual final resource output captured from the lab:

--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.chad
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.helper
OFFLINE OFFLINE rac1 IDLE,STABLE
OFFLINE OFFLINE rac2 IDLE,STABLE
ora.net1.network
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.ons
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
ora.CRS.dg(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
ora.DATA.dg(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac1 STABLE
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE rac1 STABLE
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE rac2 STABLE
ora.RECO.dg(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
ora.asm(ora.asmgroup)
1 ONLINE ONLINE rac1 Started,STABLE
2 ONLINE ONLINE rac2 Started,STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
ora.cdp1.cdp
1 OFFLINE OFFLINE STABLE
ora.cdp2.cdp
1 OFFLINE OFFLINE STABLE
ora.cdp3.cdp
1 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE rac1 STABLE
ora.cvuhelper
1 OFFLINE OFFLINE STABLE
ora.rac1.vip
1 ONLINE ONLINE rac1 STABLE
ora.rac2.vip
1 ONLINE ONLINE rac2 STABLE
ora.racdb.db
1 ONLINE ONLINE rac2 Open,HOME=/u01/app/oracle/product/23.0.0/dbhome_1,STABLE
2 ONLINE ONLINE rac1 Open,HOME=/u01/app/oracle/product/23.0.0/dbhome_1,STABLE
ora.racdb.racdb_racpdb1.svc
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
ora.racdb.racpdb1.pdb
1 ONLINE ONLINE rac1 READ WRITE,STABLE
2 ONLINE ONLINE rac2 READ WRITE,STABLE
ora.rhpserver
1 OFFLINE OFFLINE STABLE
ora.scan1.vip
1 ONLINE ONLINE rac1 STABLE
ora.scan2.vip
1 ONLINE ONLINE rac1 STABLE
ora.scan3.vip
1 ONLINE ONLINE rac2 STABLE
--------------------------------------------------------------------------------

The database instance resources, application service and PDB were ONLINE on both nodes. All three ASM disk groups (CRS, DATA and RECO), both node VIPs, all three SCAN VIPs and all three SCAN listeners were also ONLINE and STABLE.

Database-level validation

I also queried GV$INSTANCE to confirm the instance names, host names and runtime status directly from the database:

INST_ID INSTANCE_NAME HOST_NAME STATUS DATABASE_STATUS
------- ------------- ----------------- ------ ---------------
1 racdb1 rac1.lab.local OPEN ACTIVE
2 racdb2 rac2.lab.local OPEN ACTIVE

The PDB state was checked across both instances using GV$PDBS:

INST_ID PDB_NAME OPEN_MODE
------- --------- ---------------
1 RACPDB1 READ WRITE
2 RACPDB1 READ WRITE

Both RAC instances were OPEN and ACTIVE, and the PDB RACPDB1 was open in READ WRITE mode on both instances. Together with the SRVCTL checks for the database, service, node VIPs and SCAN listeners, these results confirmed the healthy two-node baseline before the planned availability test.

Resource areaFinal validation result
Cluster nodesrac1 and rac2 Active
Clusterware / CSS / EVMOnline on both nodes
ASMRunning on both nodes
CRS, DATA and RECO disk groupsMounted on both nodes; no offline disks
Voting disksThree voting files online
Node VIPsBoth ONLINE and STABLE
SCAN VIPs and SCAN listenersAll three ONLINE and STABLE
RAC database instancesracdb1 and racdb2 OPEN / ACTIVE
Application serviceRACDB_RACPDB1 ONLINE on both instances
PDB RACPDB1READ WRITE on both instances

12. Backup before high-availability testing

Before starting controlled failure testing, I chose to protect the complete lab. The plan is to shut down both RAC nodes cleanly and back up the two VM system disks, all five shared ASM VDI files, and the separate DNS VM to an external USB hard drive.

This is particularly important because ordinary VM snapshots should not be treated as a complete, consistent backup of a RAC cluster using shareable disks. The shared ASM storage must be protected as a coordinated offline set. A backup copy should be verified before any failover experiment begins.

13. What is next?

With the two-node database created and SCAN connectivity verified, the next planned lab exercise is a controlled instance availability test:

  1. Capture the healthy baseline for database instances and services.
  2. Stop only racdb1 using SRVCTL.
  3. Verify that racdb2 and the application service remain available.
  4. Establish a new client connection through SCAN and identify the serving instance.
  5. Restart racdb1 and verify that both instances return to the expected state.

This test has not yet been performed as part of this article. It will be documented after the offline backup is complete and the test results are captured.

Conclusion

This project provided a practical way to build and validate a two-node Oracle RAC 26ai environment on VirtualBox. The completed milestones include Grid Infrastructure, Flex ASM, shared ASM disk groups, voting disks, SCAN and VIP configuration, RAC database creation with DBCA, PDB validation, service registration and a successful SCAN client connection.

A working lab makes it possible to practise administration and troubleshooting procedures in a controlled environment. I will use this environment for further RAC availability, service management, backup and recovery exercises.

Alhamdulillah, the two-node Oracle RAC 26ai database has been created successfully and both instances are running.

Disclaimer: This is a personal learning lab built with VirtualBox. It is not a production deployment reference. Review Oracle’s current certification, support and installation documentation before applying similar designs in production.


Discover more from Syed Anwar Ahmed – Oracle DBA Blog

Subscribe to get the latest posts sent to your email.

Comments

Leave a Reply

Discover more from Syed Anwar Ahmed – Oracle DBA Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading