Академический Документы
Профессиональный Документы
Культура Документы
Ok fellows, now that we learned how to create a RAC 11g, I will show how to add a 3rd
node to a RAC.
The pre-requisites for this article is prepare a Two-Node RAC 11g as in the article below
Definition
Memory: 512MB
Processors: 1
Ethernet
Ethernet 2
Linux Software
Kernel 2.6.9-42.0.0.0.1.EL
Partitioning
swap 1024MB
/ (ext3) 7161MB
Network configuration
Servername mrn3
Interface eth0
IP Address 192.168.0.103
Netmask 255.255.255.0
Interface eth1
IP Address 10.0.0.3
Netmask 255.255.255.0
Using the article as reference, configure kernel parameters, install additional packages,
create oracle user and its groups.
Network configuration
In all three nodes, edit the /etc/hosts file and add the interfaces for the new node. The file
should have this configuration:
# Public interface
192.168.0.101 mrn1
192.168.0.102 mrn2
192.168.0.103 mrn3
# Private interface
10.0.0.1 mrn1-priv
10.0.0.2 mrn2-priv
10.0.0.3 mrn3-priv
# Oracle Vips
192.168.0.111 mrn1-vip
192.168.0.112 mrn2-vip
192.168.0.113 mrn3-vip
Now edit /etc/hosts.equiv file and add these lines in all nodes
+mrn1 oracle
+mrn2 oracle
+mrn3 oracle
+mrn1-priv oracle
+mrn2-priv oracle
+mrn3-priv oracle
SSH Configuration
In node mrn3, log as oracle user and execute the following commands in both nodes:
ssh-keygen -t rsa
ssh-keygen -t rsa1
ssh-keygen -t dsa
cd /home/oracle/.ssh
cd /home/oracle/.ssh
Directory Creation
mkdir -p /oracle
mkdir -p /oracrs
mkdir -p /oracrs/ocr
mkdir -p /oracrs/votedisk
mkdir -p /oracle/inventory
mkdir -p /oracle/crshome
mkdir -p /oracle/dbhome
OCFS2 Configuration
This command will include in ocfs2 configuration the information for the new node. Now
copy /etc/ocfs2/cluster.conf from mrn1 to mrn3. Then configure the ocfs2 and o2cb
service in mrn3.
In all three nodes, the /etc/ocfs2/cluster.conf file should contain the following
configuration:
cluster:
node_count = 3
name = mrrac
node:
ip_port = 7777
ip_address = 10.0.0.1
number = 1
name = mrn1
cluster = mrrac
node:
ip_port = 7777
ip_address = 10.0.0.2
number = 2
name = mrn2
cluster = mrrac
node:
ip_port = 7777
ip_address = 10.0.0.3
number = 3
name = mrn3
cluster = mrrac
tunefs.ocfs2 -N 3 /dev/sda1
tunefs.ocfs2 -N 3 /dev/sdb1
Before we start clusterware installation, lets use the Cluster Verity utility to check if all
pre-requisites are ok:
No, using the node mrn1, go to crshome directory and execute this command to add the
new node:
cd /oracle/crshome/oui/bin
CLUSTER_NEW_PRIVATE_NODE_NAMES={mrn3-priv} \
CLUSTER_NEW_VIRTUAL_HOSTNAMES={mrn3-vip}
After the installation, you'll be prompted to execute the following commands as root user:
In mrn1
/oracle/crshome/install/rootaddnode.sh
In mrn3
/oracle/crshome/root.sh
We need to configure the Oracle Notification Service for the new node.
cd $ORACLE_HOME/bin
export ORACLE_HOME=/oracle/dbhome/db1
cd $ORACLE_HOME/oui/bin
Using mrn3 node, connect as oracle and create these symbolic links
ln -s /oracrs/ocr/listener.ora $ORACLE_HOME/network/admin/listener.ora
ln -s /oracrs/ocr/sqlnet.ora $ORACLE_HOME/network/admin/sqlnet.ora
ln -s /oracrs/ocr/tnsnames.ora $ORACLE_HOME/network/admin/tnsnames.ora
LSNR_MRN3 =
(DESCRIPTION_LIST =
(DESCRIPTION =
First, lets create simbolic links for the raw devices used by ASM:
mkdir -p /oracrs/asm
ln -s /dev/raw/raw3 /oracrs/asm/asm1
ln -s /dev/raw/raw4 /oracrs/asm/asm2
ln -s /dev/raw/raw5 /oracrs/asm/asm3
ln -s /oracrs/ocr/spfile+ASM.ora $ORACLE_HOME/dbs/spfile+ASM3.ora
ln -s /oracrs/ocr/spfile+ASM.ora $ORACLE_HOME/dbs/spfile+ASM1.ora
ln -s /oracrs/ocr/spfile+ASM.ora $ORACLE_HOME/dbs/spfile+ASM2.ora
ln -s /oracrs/ocr/spfile+ASM.ora $ORACLE_HOME/dbs/spfile+ASM3.ora
Using mrn1, we need to change some parameters for the all ASM instance:
export ORACLE_SID=+ASM1
sqlplus / as sysdba
Using mrn1, we need to change some parameters for the new ASM instance:
export ORACLE_SID=+ASM1
sqlplus / as sysdba
In node mrn3
export ORACLE_SID=+ASM3
sqlplus / as sysdba
startup
ln -s /oracrs/ocr/spfileMR11G.ora $ORACLE_HOME/dbs/spfileMR11G1.ora
ln -s /oracrs/ocr/spfileMR11G.ora $ORACLE_HOME/dbs/spfileMR11G2.ora
ln -s /oracrs/ocr/spfileMR11G.ora $ORACLE_HOME/dbs/spfileMR11G3.ora
Using mrn1, we need to change some global parameters for all database instances:
export ORACLE_SID=MR11G1
sqlplus / as sysdba
Using mrn1, we need to change some parameters for the new database instance:
SQL> l
SQL> /