Grid Infrastructure 19c ASM Installation

Updated: Aug 14, 2020

Automatic Storage Management (ASM)

Let's talk a little bit about Automatic Storage Management (ASM) it has been one of the features that was introduced since the Oracle 10g version and has been improving throughout its updates. With ASM it is possible to have a storage pool as a disk controller in sets of groups because its extension of OMF (Oracle Managed Files) functionality.

With this understanding it is possible to reach some conclusions:

  • A datafile, controlfile, redo log file and among other files is considered by FileSystem ASM to be an Oracle ASM File over an Oracle ASM Disk Group;

  • An Oracle ASM Disk Group is a storage unit of the FileSystem, which consists of 1 or more disks from the operating system.

Want to progress in your DBA career, download our Oracle scripts now and collaborate with us, CLICK FOR ALL


Preparation List installation:


Before installation, Oracle recommends that you use checklists to plan, this is part of the entire process to achieve the minimum installation requirements for Grid and ASM.


Requirements:

  • VirtualBox Installation (know more)

  • Install Oracle Enterprise Linux (OEL 7) on VirtualBox (know more).


Preparation Operating System Installation Grid Infrastructure:


Requirements:


  • Installation Grid Infrastructure 19c 64-bit on Oracle Linux 7 64-bit (RHEL7 or CentOS7).

  • RAM memory At least 2 GB of RAM Installation Grid Infrastructure 19. To avoid slowness, we recommend 4 GB of RAM.

  • Oracle recommends that you allocate 100 GB to allow additional space for patches.

  • More 4 Disc 12 Gigas already configured in the Virtural Machine

  • Minimum 4G SWAP and always the current memory value.

  • Secure Linux set to Permissive.


Download software Grid Infrastructure (19.3) for Linux x86-64:

Oracle Database 19c (19.3) for Linux x86-64 (LINUX.X64_193000_grid_home.zip)

https://www.oracle.com/database/technologies/oracle19c-linux-downloads.html


Let's prepare Installation:

A tip, ideal and to do the full S.O update, remembering that this is not mandatory yet another recommendation.

# yum update -y

Package Installation:


It is necessary to install the packages that are listed below, it is possible that some of them are already installed.

yum install -y bc    
yum install -y binutils
yum install -y compat-libcap1
yum install -y compat-libstdc ++ - 33
yum install -y dtrace-modules
yum install -y dtrace-modules-headers
yum install -y dtrace-modules-provider-headers
yum install -y dtrace-utils
yum install -y elfutils-libelf
yum install -y elfutils-libelf-devel
yum install -y fontconfig-devel
yum install -y glibc
yum install -y glibc-devel
yum install -y ksh
yum install -y libaio
yum install -y libaio-devel
yum install -y libdtrace-ctf-devel
yum install -y libstdc++-devel *
yum install -y libXrender
yum install -y libXrender-devel
yum install -y libX11
yum install -y libXau
yum install -y libXi
yum install -y libXtst
yum install -y libgcc
yum install -y librdmacm-devel
yum install -y libstdc ++
yum install -y libstdc ++ - devel
yum install -y libxcb
yum install -y make
yum install -y net-tools # Clusterware
yum install -y nfs-utils # ACFS
yum install -y python # ACFS
yum install -y python-configshell # ACFS
yum install -y python-rtslib # ACFS
yum install -y python-seis # ACFS
yum install -y unixODBC
yum install -y targetcli # ACFS
yum install -y smartmontools
yum install -y sysstat
yum install oracleasm-support -y
yum install bind* -y
yum install unzip -y
yum install xauth -y

Kernel parameter values:


Now using any text editor (vi, vim, nano) we will put the settings in the file "vi /etc/sysctl.conf" and it can also be found in "vi /etc/sysctl.d/98-oracle.conf".

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

To change the current values of the kernel parameters:

# /sbin/sysctl --system
## Or
#/sbin/sysctl -p

Review the values, if they are incorrect, edit the file again as the command below will show you parameters.

# /sbin/sysctl -a

Add the following lines to a file called "vi /etc/security/limits.d/limits.conf" file.

orades   soft   nofile    1024
orades   hard   nofile    65536
orades   soft   nproc    16384
orades   hard   nproc    16384
orades   soft   stack    10240
orades   hard   stack    32768
orades   hard   memlock    134217728
orades   soft   memlock    134217728

Networks parameter values:


Configure hosts:


It must have a name for the server. In this example we will use the following:

Ip: 192.168.1.19;

Hostname: orades-19c;

With any text editor add to the file "vi /etc /hosts"

127.0.0.1 localhost localhost.localdomain localhost4  
192.168.1.19 orades-19c.localdomain orades-19c 

Configuring SELINUX with a text editor edit vi /etc/selinux/config as follows:

SELINUX=Disabled

Run the following command. (If the command does not force the change, it is likely that the server must be restarted).

# setenforce Disabled

Let's go to the Linux firewall and disable it as the commands:

# systemctl stop firewalld 
# systemctl disable firewalld

Configuring Groups and Directories:


Create the new groups and users.

groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 oper
groupadd -g 504 backupdba
groupadd -g 505 dgdba
groupadd -g 506 kmdba
groupadd -g 507 asmdba
groupadd -g 508 asmoper
groupadd -g 509 asmadmin

useradd -m -u 501 -g oinstall -G dba,asmadmin,asmdba,asmoper -d /home/oragrid -s /bin/bash oragrid

useradd -u 510 -g oinstall -G dba,oper,asmdba,asmoper,asmadmin orades

Set user password.

passwd oragrid

passwd orades

Database 19c software will be installed in the following directories that must be created below:

mkdir -p /u01/app/orades/product/19.0.0/db_1
mkdir -p /u01/app/oragrid
chown -R oragrid:oinstall /u01/app
chown -R orades:oinstall /u01/app/orades
chmod -R 775 /u01/

Log into the oracle user oragrid and configure the variables in .bash_profile. Add the following parameters as below:


Command:

vi /home/oragrid/.bash_profile

Add row;

# Oracle oragrid
export ORACLE_SID=+ASM
export GRID_HOME=/u01/app/oragrid
export ORACLE_HOME=$GRID_HOME
PATH=$ORACLE_HOME/bin:$PATH; export PATH
export PATH=/usr/sbin:/usr/local/bin:/$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

Log into the oracle user orades and configure the variables in .bash_provile. Add the following parameters as below:


Command:

vi /home/orades/.bash_profile

Add row;

# Oracle Settings
export TMP=/tmp
export TMPDIR=/$TMP
export ORACLE_BASE=/u01/app/orades
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/db_1
export GRID_HOME=/u01/app/oragrid
export ORACLE_SID=orades
export ORACLE_TERM=xterm
export PATH=/usr/sbin:/usr/local/bin:/$PATH
export PATH=$ORACLE_HOME/bin:/$PATH
export LD_LIBRARY_PATH=/$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Preparation for creating ASM disks


This step is very important here is where we will prepare the disks:


With command below we will list the existing disks (user root). If with this command you have not seen the disks, go back to the VM and create the disks correctly.

fdisk -l

We have the following 10 GB disks to be used according to the requirements mentioned above.

Disk /dev/sdb: 12.9 GB, 10737418240 bytes
Disk /dev/sdc: 12.9 GB, 10737418240 bytes
Disk /dev/sdd: 12.9 GB, 10737418240 bytes
Disk /dev/sde: 12.9 GB, 10737418240 bytes

We will use the command that provides disk partitioning functions, in all four (sdb, sdc, sdd, sde).

fdisk /dev/sdb
fdisk /dev/sdc
fdisk /dev/sdd
fdisk /dev/sde

Example log:

[root@orades-19c ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xf500d7b2.

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-25165823, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-25165823, default 25165823):
Using default value 25165823
Partition 1 of type Linux and of size 12 GiB is set

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.


Prepared all Disks now we will use the command "oracleasm configure"

/usr/sbin/oracleasm configure -i

Example log:

[root@orades-19c ~]# /usr/sbin/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 []: oragrid
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
Writing Oracle ASM library driver configuration: done
[root@orades-19c ~]#

Now enable the library with command below:

/usr/sbin/oracleasm init

Enter the following commands to mark a disk as an Oracle Automatic Storage Management (ASM) disk:


Note:

  • The disk names you specify can contain uppercase letters, numbers, and the underscore character. They must start with an uppercase letter.

oracleasm createdisk ASM_DISK01 /dev/sdb1
oracleasm createdisk ASM_DISK02 /dev/sdc1
oracleasm createdisk ASM_DISK03 /dev/sdd1
oracleasm createdisk ASM_DISK04 /dev/sde1