You are on page 1of 4

-- ADDING NODE TO AN EXISTING RAC ENVIRONMENT -1-> Check the LUN which is presented on rac1,rac2 nodes(lun no is 3)

`
# cat /proc/scsi/scsi
2-> check the partition (Do'nt Partition and making file system also)
#fdisk -l
3-> Install compatible RPMS on new node
#rpm -qa compat*
#rpm -ivh compat-* --force --nodeps
4-> Put the information of nodes in /etc/hosts on all nodes
# vi /etc/hosts
# public ips
147.43.0.101 rac1
147.43.0.102 rac2
147.43.0.103 rac3
#private ips
10.10.0.1
rac1-priv
10.10.0.2
rac2-priv
10.10.0.3
rac3-priv
#virtual ips which are based on public ips
147.43.0.201 rac1-vip
147.43.0.202 rac2-vip
147.43.0.203 rac3-vip
:wq! -> save and exit
5-> creating groups and user on new node with same group id's and user id of existing
nodes
groups -> oinstall(primary group)
-> dba (secondary group)
(rac1) #id oracle
uid=5003(oracle) gid=5001(oinstall) groups=5001(oinstall),5002(dba)
(rac3) #groupadd -g 5001 oinstall
#groupadd -g 5002 dba
#useradd -u 5003 -g oinstall -G dba -d /u01/home -m oracle
#passwd oracle
6-> Bind with Raw devices on new node
#vi /etc/sysconfig/rawdevices
/dev/raw/raw1 /dev/sdc1 -> for OCR
/dev/raw/raw2 /dev/sdc2 -> for VD
/dev/raw/raw3 /dev/sdc3 -> for DG
:wq! -> save and exit
#service rawdevices restart (on new node)
Check the permissions of rawdevices on new node and change also
#ll /dev/raw
#chown root:oinstall /dev/raw/raw1 -> for OCR
#chown oracle:oinstall /dev/raw/raw2 -> for VD

#chown oracle:oinstall /dev/raw/raw3 -> for DG


7-> configure secure shell for oracle user on all nodes
(rac3) #su - oracle
$ssh-keygen -t rsa
(give 3 times enter)
$cd .ssh
$cat id_rsa.pub > authorized_keys
(rac1)
$cd .ssh
$scp authorized_keys rac3:/u01/home
passwd:****
(rac3)
$pwd (/u01/home)
$cat authorized_keys >> .ssh/authorized_keys
$cat .ssh/authorized_keys
(It's shows infor. of rac1,rac2,rac3)
$cd .ssh
$scp authorized_keys rac1:/u01/home/.ssh
$scp authorized_keys rac2:/u01/home/.ssh
$cat /etc/hosts
(It's shows public and private ip's,check the date by them) from all nodes
(During these process if passwd will ask,means secure shell not configure successfully)
Run the following from rac1, rac2, rac3.
$ssh rac1 date
$ssh rac1-priv date
$ssh rac2 date
$ssh rac2-priv date
$ssh rac3 date
$ssh rac3-priv date
9) If successful run cluvfy utility from any one of nodes,from oracle user
$cd /u01/clusterware/cluvfy (go to clusterware_software dir)
$./runcluvfy.sh stage -pre crsinst -n rac1,rac2,rac3 -verbose
(verbose nothing but it'll display with comments(passed or failed))
-- Steps from RAC1
10-> $export ORACLE_HOME=/u01/home/oracle/product/10.2.0/crs
$export PATH=$ORACLE_HOME/bin:$PATH
10.i-> cd $ORACLE_HOME/oui/bin
10.ii-> ./addNode.sh
11-> $export ORACLE_HOME=/u01/home/oracle/product/10.2.0/asm
$export PATH=$ORACLE_HOME/bin:$PATH
11.i-> cd $ORACLE_HOME/oui/bin
11.ii-> ./addNode.sh

12-> $export ORACLE_HOME=/u01/home/oracle/product/10.2.0/db_1


$export PATH=$ORACLE_HOME/bin:$PATH
12.i-> cd $ORACLE_HOME/oui/bin
12.ii-> ./addNode.sh
13-> From RAC3
$export ORACLE_HOME=/u01/home/oracle/product/10.2.0/db_1
$export PATH=$ORACLE_HOME/bin:$PATH
Create cluster listener using netca
$netca
===================== TWO Methods To Add =====================
1.DBCA
2.Manual Adding Node
1.DBCA
From RAC1
1.$. oraenv
[ora_sid]=prod1
$cd $ORACLE_HOME/admin --> This is RDBMS HOME
$mkdir -p +ASM/pfile
$cd +ASM/pfile
$cp /u01/home/oracle/product/10.2.0/asm/admin/+ASM/pfile/init.ora init+ASM3.ora
2. From RAC1
$dbca
select Instance_management->add_instance->select database(prod) give
sys/manager->select new
node->install->
2.Manual Adding Node
==================================
Go to Rac3
(note) $vi /etc/oratab
+ASM3:/u01/home/oracle/product/10.2.0.1/asm:N
prod3:/u01/home/oracle/product/10.2.0.1/db_1:N
:wq!
1->
$. oraenv
[home]=+ASM3
2-> Go to $ASMORACLE_HOME/dbs location
3->
$mv init+ASM1.ora init+ASM3.ora
4->
$vi init+ASM3.ora
+ASM3.instance_number=3 (on all the nodes)
:wq!
5->

== Adding/Registering ASM Instance to OCR ===


$srvctl add asm -i +ASM3 -n rac3 -o $ORACLE_HOME
$srvctl start asm -i +ASM3 -n rac3

6->

$. oraenv
[home]=prod3
7-> Go to $ORACLE_HOME/dbs location
8->
$mv initprod1.ora initprod3.ora
=======Go to RAC1
9->
$. oraenv
[home]=prod1 ( DB will be up and running )
$ sqlplus '/as sysdba'
sql> alter database add logfile thread 3
group 5 ('+DG1/test/logfile/redo05.log') size 50m,
group 6 ('+DG1/test/logfile/redo06.log') size 50m;
sql> alter database enable public thread 3;
sql> create undo tablespace undotbs3 datafile '+DG1/test/datafile/undo03.dbf' size
300m;
sql> alter system set undo_tablespace=undotbs3 scope=spfile sid='prod3';
sql> alter system set cluster_database_instances=3 scope=spfile sid='*';
sql> alter system set instance_number=3 scope=spfile sid='ahsan3';
sql> exit
$ srvctl stop database -d prod
== Adding/registering Database Instance to OCR ==
$ srvctl add instance -d prod -i prod3 -n rac3
$ srvctl start database -d prod
****************************** THE END *****************************