About

Martin Klier

usn-it.de

Install Oracle 23ai ASM on Linux from Exadata Sources

Why Oracle 23ai from Exadata?

With Oracle Database 23ai being postponed to a later date (“tba”) in November 2024, and many people not being part of the Oracle Beta Program, it might be useful to install a regular database 23ai (not the Developer Free Edition), but of course for testing purposes only! This has to be done with the already available Exadata install sources, like 23.5 from edelivery.oracle.com. It is a little bit of a challenge, especially for the ASM setup.

Installing the Exadata software itself is no problem on Linux, the installer is mostly the same as it is for Linux, but when it comes to starting instances, the parameter

_exadata_feature_on=true

has to be set if the instance is not started on Exadata hardware. As the gridSetup.sh does not allow to set custom parameters for the ASM instance, it rejects to start up and thus, the Grid Setup fails. So we need a different approach. One is, to set up a 19c Oracle Clusterware and upgrade it, but this is not a valid path to try and gain experience with the 23ai installer and silent setup. Due to that, this path was out of scope. Here is the description how to set up 23ai Grid Infrastructure (Oracle Clusterware) for Exadata directly on a vanilla Oracle Linux 9.

Environment and Preparations

First, as in any setup, make sure the environment is set in the shells you are going to use for the setup. I usually create an environment script ~/bin/grid:

#!/bin/bash
export ORACLE_SID=+ASM
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/23ai/grid
PATH=/home/oracle/.local/bin:/home/oracle/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:$ORACLE_HOME/bin
export PATH
export NLS_LANG=AMERICAN_AMERICA
export NLS_DATE_FORMAT="DD.MM.YYYY-HH24:mi:ss"
export PS1="[\u@\h \W]\$ ($ORACLE_SID) "

Map the disk devices with UDEV

In all my Oracle setups, I make sure that all ASM devices are mapped to a static alias in the

/dev/disk/by-id/ASM*

namespace. I never use the ASM Filter Driver or ASMlib, I simply don’t like the dependencies on Kernel versions etc. they bring. And they have no benefit for what I usually do.

For the first step, we only need the OCW diskgroup, the others come later, but this is not part o this blog, just an example:

ENV{ID_SERIAL}=="36000c29b18197d7563a4539e2dbb79b2", OWNER:="oracle", GROUP:="oinstall", MODE:="0660", SYMLINK+="disk/by-id/ASMOCW"
ENV{ID_SERIAL}=="36000c29599b85e87ae42f969cf9a4590", OWNER:="oracle", GROUP:="oinstall", MODE:="0660", SYMLINK+="disk/by-id/ASMORAREDO1"
<...>

Create the Home and unzip the binaries

. ~/bin/grid
mkdir -p $ORACLE_HOME
unzip ~/install/V1043786-01.zip -d $ORACLE_HOME

GI Response File

The response file is used for all steps, even though not all configured items can be created in the initial run.

oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v23.0.0
INVENTORY_LOCATION=/u01/app/oraInventory
installOption=HA_CONFIG
ORACLE_BASE=/u01/app/oracle
clusterUsage=RAC
zeroDowntimeGIPatching=false
skipDriverUpdate=false
OSDBA=oinstall
OSOPER=oinstall
OSASM=oinstall
scanType=LOCAL_SCAN
configureAsExtendedCluster=false
configureGNS=false
configureDHCPAssignedVIPs=false
storageOption=FLEX_ASM_STORAGE
useIPMI=false
sysasmPassword=MYDIRTYSECRET
diskGroupName=OCW
redundancy=EXTERNAL
auSize=4
diskList=/dev/disk/by-id/ASMOCW
diskString=/dev/disk/by-id/ASM*
asmsnmpPassword=MYDIRTYSECRET
configureAFD=false
ignoreDownNodes=false
configureBackupDG=false
backupDGName=RECO
backupDGRedundancy=NORMAL
backupDGAUSize=1
managementOption=NONE
omsPort=0
executeRootScript=false
sudoPath=/usr/local/bin/sudo
sudoUserName=oracle

Initial gridSetup run to fail

The core of our problem is, that at this step we can’t give gridSetup.sh any individual parameters for the ASM Configuration Assistent (asmca). So we only let it install the software. This HAS TO BE in ‘-silent’ mode, otherwise it can’t restart the setup process later. This initial gridSetup run will deliver various errors, but stop before ASM setup, which is what we need. All missed steps can be healed by re-running gridSetup later.

The purpose of this part is, to provide us with a working cssd, which is needed by ASM later. (This is btw. what does not happen if you do this in GUI mode.)

. ~/bin/grid
$ORACLE_HOME/gridSetup.sh -silent -ignoreInternalDriverError -responseFile /home/oracle/install/grid.rsp

This is also the point, when root.sh has to be run manually. We are asked to do so, as in any setup.

ASM Configuration Assistant (ASMCA)

The first gridSetup execution stopped without setting up ASM. Now we have the chance to smuggle in our Exadata parameter:

. ~/bin/grid
$ORACLE_HOIME/bin/asmca \
    -silent \
    -configureASM \
    -param "_exadata_feature_on=true" \
    -sysAsmPassword MYDIRTYSECRET \
    -asmsnmpPassword MYDIRTYSECRET    \
    -diskString '/dev/disk/by-id/ASM*'      \
    -diskGroupName OCW              \
    -disk /dev/disk/by-id/ASMOCW            \
    -redundancy EXTERNAL

Finishing gridSetup with executeConfigTools

This final execution of gridSetup.sh will re-start where the last step quit, recognize the present ASM instance, and continue from there. The main purpose of this step is to run all the configuration items at the end of the regular GI setup.

. ~/bin/grid
$ORACLE_HOME/gridSetup.sh  -executeConfigTools -responsefile ~/install/grid.rsp -silent

End

That’s basically it – now you are going to create all the other services like additional listeners or disk groups you need.

For the database it’s way easier to get an Oracle 23ai instance running: As DBCA in GUI mode supports adding parameters manually, we can easily smuggle in “_exadata_feature_on=true” in “All Parameters” or, in case of a ‘-silent’ setup, add it to the response file in the list of parameters for the initial instance:

initParams= \
_exadata_feature_on=true,\
undo_tablespace=UNDOTBS1,\
<...>

Stay safe and have a lot of fun with your personal Oracle 23ai test space!
– Usn

Thank you

Thanks especially Julian Frey and the other gang at Sym42 for helping me over some brain bugs to get there!

New Oracle User Group ora2know – not DOAG

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.