Oracle RAC Step by Step Installation on Unix -2

Hi,

I will explain the installation of Oracle RAC ( Real Application Cluster ) on Unix ( IBM – AIX )  which is High availability solution of Oracle in this tutorial series.

 

If you don’t know what is the Oracle RAC and RAC Architecture, read following article to understand what is the Oracle RAC.

 

What is the Oracle RAC and Architecture of Real Application Cluster

 

If you have read above article, then we can start installation of Oracle RAC on IBM AIX.

 

The following scripts must be executed on IBM AIX before installation to create the priviliges, groups, and disks of the required Oracle User.

 

The following scripts are executed for the necessary settings of the Oracle user and /oracle ( Oracle Software )  directory.

 

oracledsk=`lspv | grep None |  awk '{"bootinfo -s "$1 | getline size;if(size==102400) {print $1}}' | head -1`

/usr/sbin/mkvg -y'oraclevg' -s'256' '-f' $oracledsk

/usr/sbin/mklv -y'oraclelv' -t'jfs2' -a'c' -e'x' oraclevg 198

/usr/sbin/mklv -y'oraloglv' -t'jfs2log' -e'x' oraclevg 1

/usr/sbin/crfs -v jfs2 -d'oraclelv' -m'/oracle' -A''`locale yesstr | awk -F: '{print \$1}'`'' -p'rw' -a agblksize='4096' -a logname=

'oraloglv' -a isnapshot=''`locale nostr | awk -F: '{print \$1}'`''

mkgroup -'A' id='501' oinstall

mkgroup -'A' id='502' dba

mkgroup -'A' id='503' oper

mkuser id='1001' pgrp='oinstall' groups='oinstall,dba,oper' home='/home/users/oracle' shell='/usr/bin/bash' oracle

mount /oracle



If You will install Oracle RAC with Grid User and / grid directory, the following commands are executed for the user and necessary settings for the /grid directory.

 

 

/usr/sbin/mklv -y'gridlv' -t'jfs2' -a'c' -e'x' oraclevg 198

/usr/sbin/crfs -v jfs2 -d'gridlv' -m'/grid' -A''`locale yesstr | awk -F: '{print \$1}'`'' -p'rw' -a agblksize='4096' -a logname='ora

loglv' -a isnapshot=''`locale nostr | awk -F: '{print \$1}'`''

mkuser id='204' pgrp='oinstall' groups='oinstall,dba' home='/home/users/grid' shell='/usr/bin/bash' grid

mount /grid

Memory tarafındaki ilgili ayarlar için aşağıdaki script çalıştırılır.

memory=`lparstat | grep mem= | awk '{print $7}' | cut -d'=' -f2 | tr -d 'MB'`

ppSize=`lslv  hd6 | grep "PP SIZE:" | awk '{print $6}'`

currentPageSize=`lsps -s | tail -1 | awk '{print $1}' | tr -d 'MB'`

multiplier=2

if [ $memory -le 2048 ]; then multiplier=3; fi

targetPageSize=$(( $memory * $multiplier / 2 ))

if [ $memory -gt 16384 ]; then targetPageSize=16384; fi

diffPageSize=$(( $targetPageSize - $currentPageSize ))

if [ $diffPageSize -gt 0 ]; then 

        if [ $diffPageSize -gt 4048 ]; then 

        swapdsk=`lspv | grep None |  awk '{"bootinfo -s "$1 | getline size;if(size==20480) {print $1}}'`

        /usr/sbin/mkvg -y'swapvg' -s'32' '-f' $swapdsk

        /usr/sbin/mklv -y'swaplv' -x'2048' -t'paging' swapvg 512

        swapon /dev/'swaplv'

        chps -a'y' swaplv

        swapoff /dev/'hd6'

        rmps 'hd6'; else

        chps -s $(( $targetPageSize / $ppSize )) hd6;

        fi

fi 

 

lspv | grep None | awk '{system("chmod 660 \/dev\/r"$1)}'

lspv | grep None | awk '{system("chown grid:oinstall \/dev\/r"$1)}'


 

 

Required groups and priviliges for Oracle and Grid users are provided with the following scripts.

 

echo "oracle:oracle" | chpasswd

echo "grid:grid" | chpasswd

 

echo "oracle ALL=NOPASSWD:/oracle/product/agent11g/root.sh, /usr/bin/sh, /usr/bin/ksh" >> /etc/sudoers

echo "oracle ALL=NOPASSWD:/oracle/oraInventory/orainstRoot.sh" >> /etc/sudoers

 

chmod -R 750 /oracle

chmod -R 750 /grid

chown -R grid:oinstall /grid

chown -R grid:oinstall /home/users/grid

chown -R oracle:oinstall /home/users/oracle

chown -R oracle:oinstall /oracle




Some of scripts required for RAC installation on IBM-AIX servers are as follows.

Following scripts change vmo parameters and security limits on IBM AIX

 

sed "/domain/d" /etc/resolv.conf > temp.resolv

mv temp.resolv /etc/resolv.conf

 

sed "/LoginGraceTime/d" /etc/ssh/sshd_config > temp.sshd

echo "LoginGraceTime 0" >> temp.sshd

mv temp.sshd /etc/ssh/sshd_config

 

chmod 755 /etc/resolv.conf

chmod 644 /etc/ssh/sshd_config

#sendmail - XXXXX olan yere mail server adresi yazýlacak

perl -pi -e  's/\bDS\b/DSexchange.deveci.local/g' /etc/mail/sendmail.cf


# vmo parameters

 

/usr/sbin/chdev -l sys0 -a maxuproc=16384

/usr/sbin/chdev -l sys0 -a ncargs=128  

/usr/sbin/no -p -o tcp_ephemeral_low=9000 -o tcp_ephemeral_high=65500

/usr/sbin/no -p -o udp_ephemeral_low=9000 -o udp_ephemeral_high=65500

 

yes | vmo -p -o maxperm%=90 -o maxclient%=90 -o minperm%=3

yes | vmo -r -o page_steal_method=1

 

#security limits

echo "oracle:" >> /etc/security/limits

echo "  fsize = -1" >> /etc/security/limits

echo "  cpu = -1" >> /etc/security/limits

echo "  data = -1" >> /etc/security/limits       

echo "  stack = -1" >> /etc/security/limits

echo "  rss = -1" >> /etc/security/limits

 

echo "grid:" >> /etc/security/limits

echo "  fsize = -1" >> /etc/security/limits

echo "  cpu = -1" >> /etc/security/limits

echo "  data = -1" >> /etc/security/limits       

echo "  stack = -1" >> /etc/security/limits

echo "  rss = -1" >> /etc/security/limit

 

 

The following scripts must be run also on IBM AIX before installation.

the values of the following parameters  ( TCP, UDP etc ) must be checked.

 

/usr/sbin/no -a | grep ipqmaxlen

/usr/sbin/no -a | grep rfc1323

/usr/sbin/no -a | grep sb_max

/usr/sbin/no -a | grep tcp_recvspace

/usr/sbin/no -a | grep tcp_sendspace

/usr/sbin/no -a | grep udp_sendspace

/usr/sbin/no -a | grep udp_recvspace



The values of the above parameters must be changed with the following script.

/usr/sbin/no -r -o ipqmaxlen=512
/usr/sbin/no -r -o sb_max=10526720
/usr/sbin/no -r -o udp_sendspace=1052672
/usr/sbin/no -r -o udp_recvspace=10526720
/usr/sbin/no -r -o tcp_sendspace=65536
/usr/sbin/no -r -o tcp_recvspace=65536
/usr/sbin/no -r -o rfc1323=1

 

 

Virtual memory parameters are checked by the following script.

vmo -a | grep minperm

vmo -a | grep maxperm

vmo -a | grep maxclient

vmo -a | grep lru_file_repage

vmo -a | grep strict_maxclient

vmo -a | grep strict_maxperm

vmo -a | grep page_steal_method

 

 

 

 

The value of the above parameters is changed with the root user on both servers as follows

 

vmo -p -o minperm%=3

vmo -p -o maxperm%=90

vmo -p -o maxclient%=90

vmo -p -o lru_file_repage=0

vmo -p -o strict_maxclient=1

vmo -p -o strict_maxperm=0

vmo -r -o page_steal_method=1





To increase Shell Limits, the default value of the /etc/security/limits file must be as follows. For this, the contents of the limits file must be opened with the root user and the parameters changed as follows.

Shell Limitlerini artırmak için /etc/security/limits dosyasının default kısmındaki parametrelerin değeri aşağıdaki gibi olmalıdr. Bunun için root kullanıcısıyla limits dosyasının içeriği açılıp parametreler aşağıdaki gibi olacak şekilde değiştirilmelidir.

 

root:rac01:/root:>vi /etc/security/limits 

"/etc/security/limits" 116 lines, 1954 characters 

default:

        rss = -1

        stack = -1

        nofiles = -1




The following parameter must be added to the /etc/environment file with the Root user.

AIXTHREAD_SCOPE=S





After the above parameters are executed on the server side, servers needs to be Reboot.

 

For running NTP properly (Network Time Protocol) between the two nodes, the NTP must be stopped and started with the following script with the root user.

NTP service is stopped with the following script.

root:rac01:/tmp/OraInstall2014-05-13_06-43-34PM:>/usr/bin/stopsrc -s xntpd
0513-044 The /usr/sbin/xntpd Subsystem was requested to stop.




NTP service is started again with the following script.

 

root:rac01:/tmp/OraInstall2014-05-13_06-43-34PM:>/usr/bin/startsrc -s xntpd -a "-x"
0513-059 The xntpd Subsystem has been started. Subsystem PID is 2949160.

 

 

I will continue to explain Oracle RAC Installation in the next article.

 

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

https://ittutorial.org/oracle-database-19c-tutorials-for-beginners/

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

2 comments

  1. My name is Surendhar and currently I’m working as Oracle DBA.
    I would like improve my DBA Skill, so please give training on Oracle RAC, Golden Gate, ExaData.

Leave a Reply

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