Oracle ASM 19c Installation: Complete Guide to Oracle Restart Grid Infrastructure

Oracle Automatic Storage Management (ASM) provides a robust storage management solution for Oracle databases. In this comprehensive guide, we’ll walk through ASM 19c Installation (we will use patch set 25) in a standalone “Oracle Restart” grid infrastructure configuration on Oracle Enterprise Linux (OEL) 9.5.

Table of Contents

  1. Prerequisites
  2. System Preparation
  3. Creating Users and Groups
  4. Directory Structure Setup
  5. Environment Configuration
  6. Grid Software Installation
  7. ASM Disk Configuration
  8. Creating ASM Disk Groups
  9. Starting and Verifying ASM
  10. Troubleshooting Common Issues

Prerequisites

Before starting the installation process, ensure you have:

  • Oracle Enterprise Linux (OEL) installed
  • At least 100GB storage mounted as /u01
  • Oracle 19c Grid Infrastructure software downloaded from Oracle eDelivery
  • Required patches from Oracle Support
  • System meets minimum memory and CPU requirements for Oracle 19c

System Preparation

Begin by updating your system and installing the Oracle database preinstall package:

# Login as root
sudo su -

# Update the system
yum update

# Install Oracle database preinstall package
yum install oracle-database-preinstall-19c

The preinstall package automatically configures many kernel parameters required for Oracle installations, saving you time and reducing the risk of configuration errors.

Creating Users and Groups

Next, create the necessary user groups for Oracle ASM and database operations:

# Create Oracle database groups
groupadd oinstall
groupadd dba
groupadd oper
groupadd backupdba
groupadd dgdba
groupadd kmdba

# Create ASM-specific groups
groupadd asmadmin
groupadd asmdba
groupadd asmoper
groupadd osoper

# Update oracle user and create grid user
usermod -a -G dba,oper,backupdba,dgdba,kmdba oracle
usermod -a -G asmdba,osoper oracle
useradd -u 54323 -g oinstall -G asmadmin,asmdba,asmoper,racdba grid

You might see “group already exists” errors for some commands, which is normal if the preinstall package has already created these groups.

Directory Structure Setup

Create the necessary directory structure and set appropriate permissions:

# Create directory structure for Oracle user
mkdir -p /u01/app/oracle/product/19.0.0/db_1

# Create directory structure for Grid user
mkdir -p /u01/app/grid
mkdir -p /u01/app/19.0.0/grid

# Set ownership and permissions
chown -R grid:oinstall /u01
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01

The directory structure follows Oracle’s Optimal Flexible Architecture (OFA) standard, which organizes Oracle software and database files in a logical, consistent manner.

Environment Configuration

Configure the environment for Grid users:

Grid User Environment

Next, set up the environment for the Grid user:

su - grid
vi .bash_profile

Add the following content to the Grid user’s .bash_profile:

ORACLE_SID=+ASM; export ORACLE_SID
ORACLE_BASE=/u01/app/grid; export ORACLE_BASE
ORACLE_HOME=/u01/app/19.0.0/grid; export ORACLE_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN

PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/local/bin
export PATH

export TEMP=/tmp
export TMPDIR=/tmp
umask 022

Oracle ASM 19c installation (Grid Software)

Now we’ll install the Grid Infrastructure software:

Extracting and Patching the Software

# Login as the grid user
su - grid

# Extract the Grid Infrastructure software
unzip V982068-01.zip -d /u01/app/19.0.0/grid

# Extract the patch
unzip p36916690_190000_Linux-x86-64.zip

# Extract the OPatch utility
unzip p6880880_190000_Linux-x86-64.zip

# Check the existing OPatch version
cd $ORACLE_HOME
./OPatch/opatch version

The output should show:

OPatch Version: 12.2.0.1.17

OPatch succeeded.

Now replace the OPatch utility with the new version:

mv OPatch/ OPatch.12.2.0.1.17
mv /u01/software/OPatch/ .
./OPatch/opatch version

The output should show the updated version:

OPatch Version: 12.2.0.1.45

OPatch succeeded.

Configure Additional Swap Space

Oracle ASM installation requires adequate swap space. Create additional swap if needed:

# Login as root
sudo su -

# Create a swap file
dd if=/dev/zero of=/swapfile bs=1M count=6144
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile

# Add the swap file to /etc/fstab for persistence
vi /etc/fstab
# Add: /swapfile swap swap defaults 0 0

# Verify the swap space
free -g

You should see output similar to:

               total        used        free      shared  buff/cache   available
Mem:              28           0           0           0          28          27
Swap:              5           0           5

Running the Grid Setup

Create a response file named ResponseFileGridSetup.rsp with the appropriate configuration parameters for your environment, then run the Grid Infrastructure setup:

Refer to our Response file blog

./gridSetup.sh -silent -ignoreInternalDriverError -responseFile /u01/software/ResponseFileGridSetup.rsp INVENTORY_LOCATION=/u01/app/oraInventory -applyRU /u01/software/36916690 SELECTED_LANGUAGES=en oracle.install.asm.SYSASMPassword=yoursecurepassword oracle.install.asm.monitorPassword=yoursecurepassword

The output will show progress and eventually indicate success:

Preparing the home to patch...
Applying the patch /u01/software/36916690...
Successfully applied the patch.
The log can be found at: /tmp/GridSetupActions2025-05-01_12-42-53PM/installerPatchActions_2025-05-01_12-42-53PM.log
Launching Oracle Grid Infrastructure Setup Wizard...

[WARNING] [INS-32047] The location (/u01/app/oraInventory) specified for the central inventory is not empty.
   ACTION: It is recommended to provide an empty location for the inventory.
[WARNING] [INS-13014] Target environment does not meet some optional requirements.
   CAUSE: Some of the optional prerequisites are not met. See logs for details. gridSetupActions2025-05-01_12-42-53PM.log
   ACTION: Identify the list of failed prerequisite checks from the log: gridSetupActions2025-05-01_12-42-53PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
 /u01/app/19.0.0/grid/install/response/grid_2025-05-01_12-42-53PM.rsp

You can find the log of this install session at:
 /tmp/GridSetupActions2025-05-01_12-42-53PM/gridSetupActions2025-05-01_12-42-53PM.log

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

Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:

[sanjeeva-test01]

Execute /u01/app/19.0.0/grid/root.sh on the following nodes:

[sanjeeva-test01]

Successfully Setup Software with warning(s). Moved the install session logs to: /u01/app/oraInventory/logs/GridSetupActions2025-05-01_12-42-53PM

Running the Root Scripts

As instructed, run the root scripts:

# Login as root
sudo su -

# Run the inventory script
sh /u01/app/oraInventory/orainstRoot.sh

# Run the root.sh script
sh /u01/app/19.0.0/grid/root.sh

Configure ASM Disks Using UDEV Rules

Prepare the physical disks for ASM:

# Login as root
sudo su -

# Partition the disks (example for /dev/sdd)
fdisk /dev/sdd

Follow the prompts to create a new primary partition using the entire disk. Repeat for other disks like /dev/sde.

Next, create UDEV rules to map the disk partitions to ASM disk names:

# Get the PARTUUID for the partitions
blkid /dev/sdd1
blkid /dev/sde1

Create UDEV rules file:

vi /etc/udev/rules.d/99-oracle-asmdevices.rules

Add rules like these, replacing the PARTUUIDs with your actual values:

KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/sbin/blkid -s PARTUUID -o value /dev/%k", RESULT=="f5f8d48f-01", SYMLINK+="oracleasm/disks/REDO01", OWNER="grid", GROUP="asmadmin", MODE="0660"  
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/sbin/blkid -s PARTUUID -o value /dev/%k", RESULT=="239e6945-01", SYMLINK+="oracleasm/disks/REDO02", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/sbin/blkid -s PARTUUID -o value /dev/%k", RESULT=="d2f5cc92-01", SYMLINK+="oracleasm/disks/REDO03", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/sbin/blkid -s PARTUUID -o value /dev/%k", RESULT=="eea48c3e-01", SYMLINK+="oracleasm/disks/ARCH01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/sbin/blkid -s PARTUUID -o value /dev/%k", RESULT=="fa329063-01", SYMLINK+="oracleasm/disks/FRA01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/sbin/blkid -s PARTUUID -o value /dev/%k", RESULT=="4a17a820-01", SYMLINK+="oracleasm/disks/DATA01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/sbin/blkid -s PARTUUID -o value /dev/%k", RESULT=="c14094dc-01", SYMLINK+="oracleasm/disks/DATA02", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/sbin/blkid -s PARTUUID -o value /dev/%k", RESULT=="7ef38522-01", SYMLINK+="oracleasm/disks/DATA03", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/sbin/blkid -s PARTUUID -o value /dev/%k", RESULT=="e2b8082d-01", SYMLINK+="oracleasm/disks/DATA04", OWNER="grid", GROUP="asmadmin", MODE="0660"

Reload the UDEV rules and trigger them:

udevadm control --reload-rules
udevadm trigger

Verify the disks are properly mapped:

ls -ltra /dev/oracleasm/disks/*
ls -ld /dev/sd*1

You should see output like:

lrwxrwxrwx. 1 root root 10 May  1 13:44 /dev/oracleasm/disks/REDO03 -> ../../sde1
lrwxrwxrwx. 1 root root 10 May  1 13:44 /dev/oracleasm/disks/REDO02 -> ../../sdd1
lrwxrwxrwx. 1 root root 10 May  1 13:44 /dev/oracleasm/disks/REDO01 -> ../../sdc1

Executing De-config and Config ASM

If you encounter issues during configuration, you may need to run the roothas.sh script with the -deconfig flag first:

sh /u01/app/19.0.0/grid/crs/install/roothas.sh -deconfig -force

Then run the roothas.sh script without flags:

sh /u01/app/19.0.0/grid/crs/install/roothas.sh

The output should indicate successful configuration:

Using configuration parameter file: /u01/app/19.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/sanjeeva-test01/crsconfig/roothas_2025-05-01_01-03-25PM.log
2025/05/01 13:03:36 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 sanjeeva-test01 successfully pinned.
2025/05/01 13:03:47 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'

sanjeeva-test01     2025/05/01 13:04:36     /u01/app/grid/crsdata/sanjeeva-test01/olr/backup_20250501_130436.olr     760403972
2025/05/01 13:04:37 CLSRSC-327: Successfully configured Oracle Restart for a standalone server

ASM Disk Configuration

Now we need to add ASM resources and configure disks:

# Add ASM and listener resources
srvctl add asm
srvctl add listener -l LISTENER

# Try to start ASM (may fail until disk groups are created)
srvctl start asm

Initialize the ASM Instance

Create a parameter file for the ASM instance:

# Login as grid user
su - grid

# Create the parameter file
vi $ORACLE_HOME/dbs/init+ASM.ora

Add the following content:

+ASM.__oracle_base='/u01/app/grid'#ORACLE_BASE set from in memory value
#+ASM.asm_diskgroups='REDO01','REDO02','REDO03','DATA','FRA','ARCH' #Manual Mount
*.asm_diskstring='/dev/oracleasm/disks/*'
*.asm_power_limit=1
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'

Creating ASM Disk Groups

Now we can create the ASM disk groups:

# Login as grid user
su - grid

# Connect to ASM instance as SYSASM
sqlplus / as sysasm

Execute the following SQL commands to create the disk groups:

-- Create REDO01 disk group
CREATE DISKGROUP REDO01 EXTERNAL REDUNDANCY DISK '/dev/oracleasm/disks/REDO01';
ALTER DISKGROUP REDO01 SET ATTRIBUTE 'compatible.asm' = '19.0.0.0.0';

-- Create REDO02 disk group
CREATE DISKGROUP REDO02 EXTERNAL REDUNDANCY DISK '/dev/oracleasm/disks/REDO02';
ALTER DISKGROUP REDO02 SET ATTRIBUTE 'compatible.asm' = '19.0.0.0.0';

-- Create REDO03 disk group
CREATE DISKGROUP REDO03 EXTERNAL REDUNDANCY DISK '/dev/oracleasm/disks/REDO03';
ALTER DISKGROUP REDO03 SET ATTRIBUTE 'compatible.asm' = '19.0.0.0.0';

-- Create ARCH disk group
CREATE DISKGROUP ARCH EXTERNAL REDUNDANCY DISK '/dev/oracleasm/disks/ARCH01';
ALTER DISKGROUP ARCH SET ATTRIBUTE 'compatible.asm' = '19.0.0.0.0';

-- Create FRA disk group
CREATE DISKGROUP FRA EXTERNAL REDUNDANCY DISK '/dev/oracleasm/disks/FRA01';
ALTER DISKGROUP FRA SET ATTRIBUTE 'compatible.asm' = '19.0.0.0.0';

-- Create DATA disk group with normal redundancy
CREATE DISKGROUP DATA NORMAL REDUNDANCY
  DISK
    '/dev/oracleasm/disks/DATA01' NAME DATA01,
    '/dev/oracleasm/disks/DATA02' NAME DATA02,
    '/dev/oracleasm/disks/DATA03' NAME DATA03,
    '/dev/oracleasm/disks/DATA04' NAME DATA04
  ATTRIBUTE
    'compatible.asm' = '19.0.0';

After creating the disk groups, update the init+ASM.ora file to include the disk groups:

vi $ORACLE_HOME/dbs/init+ASM.ora

Uncomment the line:

+ASM.asm_diskgroups='REDO01','DATA','FRA','REDO02','ARCH'

Starting and Verifying ASM

Restart the ASM instance and verify that everything is working:

# Restart ASM manually using the updated parameter file
sqlplus / as sysasm

Then in SQL*Plus:

SHUTDOWN IMMEDIATE;
STARTUP PFILE='$ORACLE_HOME/dbs/init+ASM.ora';
EXIT;

Now you can use crsctl to verify the resources:

crsctl stat res -t

You should see output showing all resources online:

--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
               ONLINE  ONLINE       sanjeeva-test01          STABLE
ora.DATA.dg
               ONLINE  ONLINE       sanjeeva-test01          STABLE
ora.FRA.dg
               ONLINE  ONLINE       sanjeeva-test01          STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       sanjeeva-test01          STABLE
ora.REDO01.dg
               ONLINE  ONLINE       sanjeeva-test01          STABLE
ora.REDO02.dg
               ONLINE  ONLINE       sanjeeva-test01          STABLE
ora.REDO03.dg
               ONLINE  ONLINE       sanjeeva-test01          STABLE
ora.asm
               ONLINE  ONLINE       sanjeeva-test01          Started,STABLE
ora.ons
               OFFLINE OFFLINE      sanjeeva-test01          STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       sanjeeva-test01          STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.evmd
      1        ONLINE  ONLINE       sanjeeva-test01          STABLE
--------------------------------------------------------------------------------

Troubleshooting Common Issues

If you encounter issues during ASM installation, here are some common solutions:

ASM Instance Fails to Start

  1. Verify disk permissions: ls -l /dev/oracleasm/disks/*
  2. Check the ASM parameter file: cat $ORACLE_HOME/dbs/init+ASM.ora
  3. Review the ASM alert log: less $ORACLE_BASE/diag/asm/+asm/+ASM/trace/alert_+ASM.log

UDEV Rules Not Working

  1. Verify the PARTUUID in your UDEV rules: blkid /dev/sd*1
  2. Check UDEV rule syntax: cat /etc/udev/rules.d/99-oracle-asmdevices.rules
  3. Reload and trigger rules: udevadm control --reload-rules udevadm trigger

Oracle Restart Issues

  1. Check the service status: crsctl check has
  2. Start Oracle High Availability Service if needed: crsctl start has
  3. Examine the resource status: crsctl stat res -t

Conclusion

You’ve now successfully installed Oracle ASM 19c with patch 25 in a standalone “Oracle Restart” grid infrastructure configuration. This setup provides robust storage management for your Oracle databases, with features such as automatic rebalancing, mirroring, and automatic disk failure management.

With ASM properly configured, you can proceed to install and configure your Oracle database to use these ASM disk groups for optimal performance and reliability.

For more information on Oracle ASM and grid infrastructure, refer to the official Oracle documentation.


This blog post was created as a comprehensive guide to Oracle ASM 19c installation. For official documentation, please refer to Oracle’s website. If you have any questions or need clarification on any steps, please leave a comment below.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.