Oracle Rac preinstall steps and asm config

Hello Friend's,

In This Post we will discuss about Rac configration prerequisite and ASM configration

Pre-requisite Rac database :

Rac IP's :

cat /etc/hosts

#Public IP#######################
10.10.4.41 dm04db01.database.com dm04db01
10.10.4.42 dm04db02.database.com dm04db02
#################################
#Private IP######################
192.168.178.201 dm04db01-priv.database.com dm04db01-priv
192.168.178.202 dm04db02-priv.database.com dm04db02-priv
#################################
#VIP ############################
10.10.4.51 dm04db01-vip.database.com dm04db01-vip
10.10.4.52 dm04db02-vip.database.com dm04db02-vip
##################################
#SCAN IP##########################
10.10.4.70 dm04scan.database.com dm04scan
10.10.4.71 dm04scan.database.com dm04scan
##################################

Step 1 : Create VM's with 2 network adapters and 3 additional disks

                                                                                                                            


Add Disk on Vm1 and use the use exisiting disk option on vm 2 to add shard disk

Step 2 : Make changes in file ifcfg-ens33 and ifcfg-ens34 as below for ip on both nodes :

Same needs to be done on node 2 :

[root@dm04db01 Desktop]# vi etc/sysconfig/network-scripts/ifcfg-ens33

TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static"
DEFROUTE="no"
IPV4_FAILURE_FATAL="no"
IPV6INIT="no"
IPV6_AUTOCONF="no"
IPV6_DEFROUTE="no"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
UUID="00675282-3a77-4137-8619-250678316075"
DEVICE="ens33"
ONBOOT="yes"
IPADDR=10.10.4.41


[root@dm04db01 Desktop]# vi etc/sysconfig/network-scripts/ifcfg-ens34

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=no
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=no
IPV6_DEFROUTE=no
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens34
UUID=32d1d149-6564-409d-8c9e-8af20ca07489
DEVICE=ens34
ONBOOT=yes
IPADDR=192.168.178.201

systemctl restart NetworkManager.service

Put the below entries in VMX file of vm to avoid disk locking :

disk.locking = "FALSE"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize = "0"
diskLib.dataCacheMinReadAheadSize = "0"
diskLib.dataCachePageSize = "4096"
diskLib.maxUnsyncedWrites = "0"

Step 3 : Group Creation

/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd -g 506 asmdba
/usr/sbin/groupadd -g 507 asmoper

Step 4 : User Creation

/usr/sbin/useradd -u 501 -c "Oracle Grid Infrastructure Owner" -g oinstall -G asmadmin,asmdba,asmoper,dba grid
/usr/sbin/useradd -u 502 -c "Oracle RDBMS Owner" -g oinstall -G dba,oper,asmdba,asmoper oracle

Step 5 : Entries in /etc/sysctl.conf

kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_max=262144
net.core.rmem_max = 4194304
net.core.wmem_max=262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576

Step 6 : Entries in /etc/security/limits.conf

oracle  soft    nofile  131072
oracle hard nofile 131072
oracle soft nproc 131072
oracle hard nproc 131072
oracle soft core unlimited
oracle hard core unlimited
oracle soft memlock 3500000
oracle hard memlock 3500000
grid soft nofile 131072
grid hard nofile 131072
grid soft nproc 131072
grid hard nproc 131072
grid soft core unlimited
grid hard core unlimited
grid soft memlock 3500000
grid hard memlock 3500000

Step 7 : Create oracle and Grid home directories

mkdir -p /oracle/app/oraInventory
chown -R grid:oinstall /oracle/app/oraInventory
chmod -R 775 /oracle/app/oraInventory

mkdir -p /oracle/app/grid/gr_home
chown -R grid:oinstall /oracle/app/grid/gr_home
chmod -R 775 /oracle/app/grid/gr_home

mkdir -p /oracle/app/orawork
mkdir /oracle/app/orawork/cfgtoollogs #needed to ensure that dbca is able to run after the rdbms installation.
chown -R oracle:oinstall /oracle/app/orawork
chmod -R 775 /oracle/app/orawork

mkdir -p /oracle/app/grid
chown -R grid:oinstall /oracle/app/grid
chmod -R 775 /oracle/app/grid

mkdir -p /oracle/app/orawork/product/12.2.0.1/db_1
chown -R oracle:oinstall /oracle/app/orawork/product/12.2.0.1/db_1
chmod -R 775 /oracle/app/orawork/product/12.2.0.1/db_1

Step 8 : RPM Packages needed /media/*/Server/ YUM Config :

How to Create Local HTTP Yum/DNF Repository on OEL 8

For Linux 7 follow the below steps .

[root@dm04db02 Packages]# mkdir /oracle/repo
[root@dm04db02 Packages]#
[root@dm04db02 Packages]#
[root@dm04db02 Packages]# cp * /oracle/repo


[root@dm04db02 Packages]# rpm -ivh createrepo-0.9.9-28.el7.noarch.rpm
warning: createrepo-0.9.9-28.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ################################# [100%]
package createrepo-0.9.9-28.el7.noarch is already installed


[root@dm04db02 Packages]# createrepo /oracle/repo/
Spawning worker 0 with 1271 pkgs
Spawning worker 1 with 1270 pkgs
Spawning worker 2 with 1270 pkgs
Spawning worker 3 with 1270 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete


[root@dm04db02 Packages]# yum clean all
Loaded plugins: langpacks, ulninfo
Cleaning repos: ol7_UEKR4 ol7_latest
Cleaning up everything
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos


[root@dm04db02 Packages]# cd /etc/yum
yum/ yum.repos.d/
[root@dm04db02 Packages]# cd /etc/yum
yum/ yum.repos.d/
[root@dm04db02 Packages]# cd /etc/yum.repos.d/
[root@dm04db02 yum.repos.d]# ls
public-yum-ol7.repo


[root@dm04db02 yum.repos.d]# mv public-yum-ol7.repo public-yum-ol7.repo_old


[root@dm04db02 yum.repos.d]# vi oellab.repo

[oellabrepo]
name=oellabrepo
baseurl=file:///oracle/repo
enabled=1
gpgcheck=0


[root@dm04db02 yum.repos.d]# yum repolist
Loaded plugins: langpacks, ulninfo
oellabrepo | 2.9 kB 00:00:00
oellabrepo/primary_db | 4.8 MB 00:00:00
repo id repo name status
oellabrepo oellabrepo 5,081
repolist: 5,081


RPM Needed to install :

yum install binutils -y
yum install compat-libcap1 -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install make -y
yum install nfs-utils -y
yum install net-tools -y
yum install smartmontools -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
yum install gcc -y
yum install gcc-c++ -y
yum install libXext -y
yum install libXext.i686 -y
yum install zlib-devel -y
yum install zlib-devel.i686 -y

Step 9 : Asm RPM Packags Required for

rpm -ivh  kmod-oracleasm-2.0.8-17.el7.x86_64.rpm
rpm -ivh oracleasmlib-2.0.12-1.el7.x86_64.rpm
rpm -ivh oracleasm-support-2.1.11-2.el7.x86_64.rpm

Step 10 : Make a valid disk Partition of new disks on only one node :

[root@dm04db02 Server]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 6527.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): u
Changing display/entry units to sectors

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First sector (63-104857599, default 63):
Using default value 63
Last sector or +size or +sizeM or +sizeK (63-104857599, default 104857599):
Using default value 104857599

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

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


Carry same steps for fdisk /dev/sdc and /dev/sdd too

Step 11 : Run These command by root user to configure user

If that doesn't work then a 'rpm -Uvh --force some.rpm' should work.

[root@dm04db01 Asm_rpm_el7]# 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 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 []: asmdba
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

Step12 : Command to create ASM disks as root user

#/usr/sbin/oracleasm createdisk disk_name device_partition_name

E.g /usr/sbin/oracleasm createdisk OCR_VOTE01 /dev/sdc1
E.g /usr/sbin/oracleasm createdisk DATA /dev/sdb1

command to list and scan asm disks

/usr/sbin/oracleasm listdisks

/usr/sbin/oracleasm scandisks

Now start with grid install 12.2 :

Follow the link for Grid Installation on standalone server : 

Grid Installation for Standalone server 12R2c

disk path or disk string will be /dev/oracleasm/disk*

Previous
Next Post »