close
Database

Install Oracle 19c RAC 2 Nodes & Create Multiple SCAN Name On Multiple Subnet – Part1

– Installing/Configuring Oracle 19c RAC 2 Nodes.

– Create multiple scan name on different interface with different IP subnet.

– Register scan name to database for client accessing.

 

I/IP Address And Hostname Details:

 Node 1Node 2
Private + iSCSI /24172.16.9.2: node01-pri.lab.com172.16.9.3: node02-pri.lab.com
Public /24192.168.9.9: node01-pub.lab.com192.168.9.10: node02-pub.lab.com
VIP /24192.168.9.11: node01-vip.lab.com192.168.9.12: node02-vip.lab.com
SCAN IP /24192.168.9.13: crm-scan.lab.com192.168.9.14: crm-scan.lab.com

Openfiler IP: 172.16.9.4/24: openfiler.lab.com

DNS Server: 192.168.9.15: dc01.lab.com

1/Add record on DNS Server:

2/Configure NTP Server on dc01.lab.com

Get-ItemProperty -Path “HKLM:\SYSTEM\CurrentControlSet\Services\w32time\TimeProviders\NtpServer”

Set-ItemProperty -Path “HKLM:\SYSTEM\CurrentControlSet\Services\w32time\TimeProviders\NtpServer” -Name “Enabled” -Value 1

Set-ItemProperty -Path “HKLM:\SYSTEM\CurrentControlSet\services\W32Time\Config” -Name “AnnounceFlags” -Value 5

Restart-Service w32Time

3/Configure NTP Client on Node 01 and Node 02:

4/Install the system Linux prerequisites softwares on 2 nodes:

# yum install -y oracle-database-preinstall-19c.x86_64

# yum install oracleasm-support

5/ Create Groups For Oracle ASM administrator/Opeartion:

# groupadd -g 54327 asmdba

# groupadd -g 54328 asmoper

# groupadd -g 54329 asmadmin

# usermod -aG asmdba,asmoper,asmadmin oracle

# echo “123456” | passwd –stdin oracle

6/ Create the directories for installing Oracle softwares (grid and db):

# mkdir -p /u01/app/19c/grid
# mkdir -p /u01/app/oracle/product/19c/db_1
# chown -R oracle:oinstall /u01
# chmod -R 775 /u01/

7/Configure Bash Profile of Users Oracle:

Add below lines to /home/oracle/.bash_profile:

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_BASE=/u01/app/oracle

export GRID_HOME=/u01/app/19c/grid

export DB_HOME=$ORACLE_BASE/product/19c/db_1

export ORACLE_HOME=$DB_HOME

export ORACLE_TERM=xterm

export BASE_PATH=/usr/sbin:$PATH

export PATH=$ORACLE_HOME/bin:$BASE_PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

8/Configuring Openfiler iSCSI volumes for ASM Shared disks:

– Login Openfiler admin page at: https://IP:446/admin

– Select Services tab > enable iSCSi target services 

– In System tab select Network Access Configuration add subnet of 2 node for allow accessing Shared volumes of openfiler

– Create physical volume for all device on openfiler: Tab volumes->Block Devices

– Click on device->Create partition

– Configure Volume Group for iSCSI Volumes: Tab Volumes-> Volume Groups

– Create 2 iSCSI volumes for OCR disk and DATA disk: Choose Add Volume

– Configure iSCSI Target in Openfiler: Volumes tab ->

Select the Target Configuration will see Target IQN number, Click Add to make this as new iSCSI Target.

iSCSI Targets -> Tab Network ACL->Allow Private Subnet Of 2 Nodes Access

– Choose tab LUN Mapping to map 2 created volumes to new Target

9/Scanning iSCSI  volumes on openfiler target on 2 nodes:

# iscsiadm –m discovery –t st  -p <IP Openfiler> (execute on both nodes)

iscsiadm -m node –loginall all (execute on both nodes)

– Check already scanned 2 LUNs from openfiler

10/Configure Oracle ASM and create OCR disk and DATA disk:

– Copy grid installed source (zip file) to GRID_HOME: /u01/app/19c/grid and unzip

– Install the package cvudisk from the grid home as the “root” user on all nodes

– Format 2 LUNs /dev/sdc and /dev/sdd (execute on one node):

– Configure oracleasm utility (execute on both nodes)

– Initialize the asmlib with the oracleasm init command to load oracleasm module (execute on both nodes)

– Create ASM disk ASM_OCR01 from /dev/sdc1 and ASM_DATA01 from /dev/sdd1 (execute on node 1)

– Scan new ASM disk on both nodes and list again to check

11/Configure SSH Setup between 2 nodes:

– Do this step by user oracle and run script only on node1:

# ./sshUserSetup.sh -user oracle -hosts “node01-pub node02-pub” -noPromptPassphrase -confirm -advanced

12/ Install and Configure Oracle 19c Grid Infrastructure:

– Pre-check for CRS installation using Cluvfy (using user oracle):

#cd $GRID_HOME; ./runcluvfy.sh stage -pre crsinst -n node01-pub,node02-pub –verbose

# cd /u01/app/19c/grid/

# ./gridSetup.sh

– Create OCR_DG disk group for storing cluster configurations and voting disks.

– Set password for SYS and ASMSNMP accounts: oracle@123

– Installing Grid successful

13/Install and Configure Oracle Database 19c:

– Copy source db 19c to ORACLE_HOME and unzip

# ./runInstaller

14/ Database creation:

– Use ASMCA tool create disk group DATA_DG for store data files

# asmca

– Create database by tool dbca

# dbca

– Create database CRMDEV complete

– Check the Status of the database deployed on RAC

– Check public listener and SCAN IP/SCAN Listener on 2 nodes

15/Create other SCAN NAME/SCAN LISTENER for other subnet:

– On 2 node add new interface for new VIP and SCAN IP

 Node 1Node 2
Public /24192.168.30.2: node01-pub-new.lab.com192.168.30.3: node02-pub-new.lab.com
VIP /24192.168.30.11: node01-vip-new.lab.com192.168.30.12: node02-vip-new.lab.com
SCAN IP /24192.168.30.13: arp-scan.lab.com192.168.30.14: arp-scan.lab.com

– Create new records on DNS server

– Create new network and register to new interface for grid:

Run this command by root user

/u01/app/19c/grid/bin/srvctl add network -netnum 2 -subnet 192.168.30.0/255.255.255.0/ens39 -nettype static –verbose

– List again networks/interface on both nodes

– Add vip for 2 node to new register network ID 2

/u01/app/19c/grid/bin/srvctl add vip -node node01-pub -netnum 2 -address 192.168.30.11/255.255.255.0/ens39

/u01/app/19c/grid/bin/srvctl add vip -node node02-pub -netnum 2 -address 192.168.30.12/255.255.255.0/ens39-

 Start the new node VIPs on 2 nodes (use root user):

/u01/app/19c/grid/bin/srvctl start vip -vip 192.168.30.11

/u01/app/19c/grid/bin/srvctl start vip -vip 192.168.30.12

– Create a new listener based on the network number 2 (Use  root user)

Use tool netca to add listener

– As oracle user start the new node Listeners:

– As root user add the new SCAN to the network number 2:

/u01/app/19c/grid/bin/srvctl add scan -scanname arp-scan.lab.com -netnum 2

-Start the new SCAN and as grid user check the configuration

/u01/app/19c/grid/bin/srvctl start scan -netnum 2

– Check scan config with VIP on both node2

– Create new database and register database to scan listener:

alter system set remote_listener=’SCAN-name:port-number‘ scope=both

– On each cluster node, ensure that the tnsnames.ora file refers to the SCAN name for the Net Service Name.

APPDEV =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = arp.scan.lab.com) (PORT = 1821))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ARPDEV
)

Tags : DBADevOpsGrid InfrastructureOracle DatabaseOracle RAC

Leave a Response

error: Content is protected !!