Installing Oracle Grid Infrastructure 19.25 on Oracle Linux 9.5 Using ASMLIB 3

 From Oracle Linux 8.7 onward, installing Oracle ASM using ASMLIB was challenging due to the need for a kernel downgrade. Recently, Oracle introduced a new version of ASMLIB with enhanced features, enabling the installation of Grid Infrastructure on OEL 8 and 9.

This article will demonstrate how to install Grid Infrastructure 19.25 on Oracle Linux 9.5 using ASMLIB 3.

Prerequisites

Before starting the installation, download the required packages:

  1. oracleasmlib-3.0.0–13.el9.x86_64.rpm
    Download here
  2. oracleasm-support-3.0.0–7.el9.x86_64.rpm
    Download here
  3. oracle-database-preinstall-19c-1.0–1.el9.x86_64.rpm
    Download here

Pre-Installation Steps

In the following steps, we will prepare the operating system for the installation of Grid Infrastructure.

1.Set the Hostname IP

 [root@OL95 ~]# echo "192.168.1.34 OL95">> /etc/hosts

2.Create Required Directories for (ORACLE_HOME, ORACLE_BASE and OraInventory)

[root@OL95 ~]# mkdir /grid/19.25    -p
[root@OL95 ~]# mkdir /grid/base -p
[root@OL95 ~]# mkdir /oraInventory

3.Install Pre-Installation Package

 [root@OL95 ~]# dnf install /source/oracle-database-preinstall-19c-1.0-1.el9.x86_64.rpm

The output was too long, so I summarized it:

Last metadata expiration check: 0:05:33 ago on Thu 27 Mar 2025 04:32:44 AM CET.
Dependencies resolved.
=========================================================================================================================================================================================
Package Architecture Version Repository Size
=========================================================================================================================================================================================
Installing:
oracle-database-preinstall-19c x86_64 1.0-1.el9 @commandline 33 k
Installing dependencies:
avahi-libs x86_64 0.8-21.el9 InstallMedia-BaseOS 73 k
bc x86_64 1.07.1-14.el9 InstallMedia-BaseOS 135 k
bind-libs x86_64 32:9.16.23-24.0.1.el9_5 InstallMedia-AppStream 1.2 M
bind-license noarch 32:9.16.23-24.0.1.el9_5 InstallMedia-AppStream 12 k
bind-utils x86_64 32:9.16.23-24.0.1.el9_5 InstallMedia-AppStream 225 k
checkpolicy x86_64 3.6-1.el9 InstallMedia-AppStream 362 k
fstrm x86_64 0.6.1-3.el9 InstallMedia-AppStream 28 k
glibc-devel x86_64 2.34-125.0.1.el9_5.1 InstallMedia-AppStream 52 k
glibc-headers x86_64 2.34-125.0.1.el9_5.1 InstallMedia-AppStream 908 k
gssproxy x86_64 0.8.4-7.el9 InstallMedia-BaseOS 120 k
initscripts x86_64 10.11.7-1.0.1.el9 InstallMedia-BaseOS 285 k
kernel-headers x86_64 5.14.0-503.11.1.el9_5 InstallMedia-AppStream 4.5 M
ksh x86_64 3:1.0.6-3.0.1.el9 InstallMedia-AppStream 886 k
libICE x86_64 1.0.10-8.el9 InstallMedia-AppStream 71 k
Transaction Summary
=========================================================================================================================================================================================
Install 73 Packages

Total size: 24 M
Installed size: 65 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : libtirpc-1.3.3-9.el9.x86_64 1/73
Installing : libuv-1:1.42.0-2.el9_4.x86_64 2/73
Installing : libXau-1.0.9-8.el9.x86_64 3/73

4.Creating groups and a user for ASM, and setting a password for the user

[root@OL95 ~]# groupadd -g 54327 asmdba
[root@OL95 ~]# groupadd -g 54328 asmoper
[root@OL95 ~]# groupadd -g 54329 asmadmin

[root@OL95 ~]# useradd -u 1001 -g oinstall -G asmdba,asmadmin,asmoper,dba grid

[root@OL95 source]# passwd grid
Changing password for user grid.
New password:
BAD PASSWORD: The password is a palindrome
Retype new password:
passwd: all authentication tokens updated successfully.

Install ASMLIB Packages

We previously downloaded two packages for ASMLIB, and we will now proceed to install them.

1.Install oracleasm-support:

[root@OL95 ~]# dnf localinstall /source/oracleasm-support-3.0.0-7.el9.x86_64.rpm

Last metadata expiration check: 0:36:03 ago on Thu 27 Mar 2025 04:32:44 AM CET.
Dependencies resolved.
======================================================================================================================================================
Package Architecture Version Repository Size
======================================================================================================================================================
Installing:
oracleasm-support x86_64 3.0.0-7.el9 @commandline 161 k

Transaction Summary
======================================================================================================================================================
Install 1 Package

Total size: 161 k
Installed size: 358 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : oracleasm-support-3.0.0-7.el9.x86_64 1/1
Running scriptlet: oracleasm-support-3.0.0-7.el9.x86_64 1/1
Note: Forwarding request to 'systemctl enable oracleasm.service'.
Synchronizing state of oracleasm.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable oracleasm
Created symlink /etc/systemd/system/multi-user.target.wants/oracleasm.service → /usr/lib/systemd/system/oracleasm.service.

Verifying : oracleasm-support-3.0.0-7.el9.x86_64 1/1

Installed:
oracleasm-support-3.0.0-7.el9.x86_64

Complete!

2.Install oracleasmlib:

[root@OL95 ~]# dnf localinstall /source/oracleasmlib-3.0.0-13.el9.x86_64.rpm

Last metadata expiration check: 0:25:37 ago on Thu 27 Mar 2025 04:32:44 AM CET.
Dependencies resolved.
======================================================================================================================================================
Package Architecture Version Repository Size
======================================================================================================================================================
Installing:
oracleasmlib x86_64 3.0.0-13.el9 @commandline 48 k

Transaction Summary
======================================================================================================================================================
Install 1 Package

Total size: 48 k
Installed size: 99 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : oracleasmlib-3.0.0-13.el9.x86_64 1/1
Running scriptlet: oracleasmlib-3.0.0-13.el9.x86_64 1/1
Verifying : oracleasmlib-3.0.0-13.el9.x86_64 1/1

Installed:
oracleasmlib-3.0.0-13.el9.x86_64

Complete!

Configure ORACLEASM

Configuring ASMLIB 3 is quite similar to the previous version, and we will demonstrate it below.

1.Initialize ORACLEASM

[root@OL95 ~]#  oracleasm init
Mounting ASMlib driver filesystem: Not applicable with kernel 5.15.0
Setting up iofilter map for ASM disks: done

Note: The “Not applicable with kernel 5.15.0” message is expected for OEL 9.

2.Run Configuration Command

[root@OL95 ~]# oracleasm configure –i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Maximum number of disks that may be used in ASM system [2048]:
Enable iofilter if kernel supports it (y/n) [y]: y
Writing Oracle ASM library driver configuration: done

3.Start and Enable the Service

[root@OL95 ~]# systemctl start oracleasm
[root@OL95 ~]# systemctl enable oracleasm
Synchronizing state of oracleasm.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable oracleasm
[root@OL95 ~]# systemctl status oracleasm
oracleasm.service - Load oracleasm Modules
Loaded: loaded (/usr/lib/systemd/system/oracleasm.service; enabled; preset: disabled)
Active: active (exited) since Thu 2025-03-27 05:11:05 CET; 9s ago
Process: 22905 ExecStartPre=/usr/bin/udevadm settle -t 120 (code=exited, status=0/SUCCESS)
Process: 22906 ExecStart=/usr/sbin/oracleasm.init start_sysctl (code=exited, status=0/SUCCESS)
Main PID: 22906 (code=exited, status=0/SUCCESS)
CPU: 343ms

Mar 27 05:11:04 OL95 systemd[1]: Starting Load oracleasm Modules...
Mar 27 05:11:05 OL95 oracleasm.init[22906]: Initializing the Oracle ASMLib driver: OK
Mar 27 05:11:05 OL95 oracleasm.init[22906]: Scanning the system for Oracle ASMLib disks: OK
Mar 27 05:11:05 OL95 systemd[1]: Finished Load oracleasm Modules.

4.Enable io_uring Feature

To use ASMLIB in OEL 9, we must enable the io_uring feature, which is disabled by default.

[root@OL95 ~]# echo "kernel.io_uring_disabled = 0">>/etc/sysctl.conf
[root@OL95 ~]# sysctl –p

After enabling this feature, we can view its information using the oracleasm status command:

[root@OL95 ~]# oracleasm status
Checking if the oracleasm kernel module is loaded: no (Not required with kernel 5.15.0)
Checking if /dev/oracleasm is mounted: no (Not required with kernel 5.15.0)
Checking which I/O Interface is in use: io_uring (KABI_V3)
Checking if io_uring is enabled: yes
Checking if ASM disks have the correct ownership and permissions: yes
Checking if ASM I/O filter is set up: yes

5.Create an ASM Disk

In the next step, we will create a disk using the oracleasm command:

[root@OL95 ~]# oracleasm createdisk asm01 /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@OL95 ~]# oracleasm listdisks
ASM01

In contrast to the old version of ASMLIB, version 3 (in OEL 9) does not include the /dev/oracleasm directory:

[root@OL95 ~]# ll /dev/oracleasm
ls: cannot access '/dev/oracleasm': No such file or directory

We can search for and locate the correct path of this disk(ASM01):

[root@OL95 ~]# find /dev -name 'ASM01'
/dev/disk/by-label/ASM01

As you can see, the correct path has been updated to /dev/disk/by-label:

[root@OL95 ~]# ll /dev/disk/by-label/ASM01
lrwxrwxrwx. 1 root root 10 Mar 27 05:27 /dev/disk/by-label/ASM01 -> ../../sdb1

Now everything is ready for the installation of Grid Infrastructure. I plan to install it silently.

Install Grid Infrastructure

1.Unzip the Software

[grid@OL95 ~]$ cd /grid/19.25
[grid@OL95 19.25]$ unzip /source/grid_home_19R25_GoldImage.zip

2.Run the Installation Script Silently:

[grid@OL95 ~]$cd /grid/19.25
[grid@OL95 19.25]$ ./gridSetup.sh -silent \
INVENTORY_LOCATION=/oraInventory \
SELECTED_LANGUAGES=en \
ORACLE_BASE=/grid/base \
oracle.install.option=HA_CONFIG \
oracle.install.asm.OSDBA=asmdba \
oracle.install.asm.OSOPER=asmoper \
oracle.install.asm.OSASM=asmadmin \
oracle.install.crs.config.autoConfigureClusterNodeVIP=false \
oracle.install.asm.diskGroup.name=ASM \
oracle.install.asm.diskGroup.redundancy=EXTERNAL \
oracle.install.asm.diskGroup.diskDiscoveryString=ORCL:* \
oracle.install.asm.diskGroup.disks=ORCL:ASM01 \
oracle.install.asm.SYSASMPassword=Deraz_Kolah_122_Kebria \
oracle.install.asm.monitorPassword=Deraz_Kolah_122_Kebria \
-ignorePrereqFailure

The output will look like this:

Launching Oracle Grid Infrastructure Setup Wizard...

The response file for this session can be found at:
/grid/19.25/install/response/grid_2025-03-28_08-34-17AM.rsp

You can find the log of this install session at:
/tmp/GridSetupActions2025-03-28_08-34-17AM/gridSetupActions2025-03-28_08-34-17AM.log

As a root user, execute the following script(s):
1. /oraInventory/orainstRoot.sh
2. /grid/19.25/root.sh

Execute /grid/19.25/root.sh on the following nodes:
[OL95]

Successfully Setup Software with warning(s).
As install user, execute the following command to complete the configuration.
/grid/19.25/gridSetup.sh -executeConfigTools -responseFile /grid/19.25/install/response/grid_2025-03-28_08-34-17AM.rsp [-silent]
Note: The required passwords need to be included in the response file.

Moved the install session logs to:
/oraInventory/logs/GridSetupActions2025-03-28_08-34-17AM

According to the output of the above command, we need to run additional commands to install Oracle ASM

3.Run Root Scripts

[root@OL95 ~]# /oraInventory/orainstRoot.sh
Changing permissions of /oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /oraInventory to oinstall.
The execution of the script is complete.
[root@OL95 ~]# /grid/19.25/root.sh
Check /grid/19.25/install/root_OL95_2025-03-28_08-37-23-319359661.log for the output of root script

[root@OL95 ~]# cat /grid/19.25/install/root_OL95_2025-03-28_08-37-23-319359661.log
Performing root user operation.

The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /grid/19.25
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /grid/19.25/crs/install/crsconfig_params
The log of current session can be found at:
/grid/base/crsdata/ol95/crsconfig/roothas_2025-03-28_08-37-24AM.log
2025/03/28 08:37:25 CLSRSC-363: User ignored prerequisites during installation
Redirecting to /bin/systemctl restart rsyslog.service
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node ol95 successfully pinned.
2025/03/28 08:37:44 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'

ol95 2025/03/28 08:39:16 /grid/base/crsdata/ol95/olr/backup_20250328_083916.olr 760403972
2025/03/28 08:39:18 CLSRSC-327: Successfully configured Oracle Restart for a standalone server

4.Run Final Configuration

In the final step, we need to create a response file and run the gridSetup.sh script using it:

[grid@OL95 ~]$ cat /grid/19.25/install/response/gridsetup.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v19.0.0
INVENTORY_LOCATION=/oraInventory
oracle.install.option=HA_CONFIG
ORACLE_BASE=/grid
/base
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.SYSASMPassword=Deraz_Kolah_122_Kebria
oracle.install.asm.diskGroup.name=ASM
oracle.install.asm.diskGroup.redundancy=EXTERNAL
oracle.install.asm.diskGroup.disks=ORCL:ASM01
oracle.install.asm.diskGroup.diskDiscoveryString=ORCL:*
oracle.install.asm.monitorPassword=Deraz_Kolah_122_Kebria


[grid@OL95 19.25]$ ./grid
Setup.sh -silent -executeConfigTools -responseFile /grid/19.25/install/response/gridsetup.rsp
Launching Oracle Grid Infrastructure Setup Wizard...

You can find the logs of this session at:
/oraInventory/logs/GridSetupActions2025-03-28_08-40-59AM

You can find the log of this install session at:
/oraInventory/logs/UpdateNodeList2025-03-28_08-40-59AM.log
Successfully Configured Software.

Verify Installation

The installation completed successfully without any errors. I will connect to the ASM instance to check the ASM disk and disk group:

[grid@OL95 19.25]$ ps -eaf|grep pmon
grid 12410 1 0 08:42 ? 00:00:00 asm_pmon_+ASM
grid 13199 1515 0 08:43 pts/0 00:00:00 grep --color=auto pmon

[grid@OL95 19.25]$ asmcmd
ASMCMD> lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 1048576 2047 1980 0 1980 0 N ASM/

[grid@OL95 19.25]$ sqlplus "/as sysasm"
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Mar 28 08:49:45 2025
Version 19.25.0.0.0
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.25.0.0.0
SQL> col PATH format a10
SQL> select NAME, PATH from v$asm_disk;

NAME PATH
------------------------------ ----------
ASM01 ORCL:ASM01

Vahid Yousefzadeh
Oracle Database Administrator
Telegram channel :https://t.me/oracledb

Comments

Popular posts from this blog

Oracle 23ai — Speed up IMPDP Using NOVALIDATE Constraints

Staging Tables in Oracle 23ai

Oracle 23ai — Track Table and Partition Scan Access