Tuesday, September 16, 2008

RAC/CRS installation

Here we are continuing with the RAC installation on an installed CRS.
We say that its a two node RAC installation. let it be stamy04 and stamy05
1. Before going for RAC installation to confirm if crs is present, we can just do
'ps -ef |grep crs'
Searching for the process crs if its running. we get the bin location of the installed crs.
Go there and check for crs_stat and it lists the status of the crs. If it lists process like LISTENER and .gsd .ora files we know our crs is up and working.
Alternative in the bin directory go for ./crsctl check crs
if things are fine you find ::::
CSS appears healthy
CRS appears healthy
EVM appears healthy

Can go to other node to confirm the same situation there also.

We can view RAC as two standalone databases installation on 2 nodes( i am using a 2 node cluster). So it will have three standard steps:
1. db install(software install)
2. netca
3. dbca

db install command will be very similar to the silent command fired for a standalone installation. we just have to take care to add few other parameters.
a) first goto the corrosponding response file (.rsp) file. and edit at the CLUSTER_NODES location. CLUSTER_NODES= { "node1","node2"} add all nodes of your cluster to it.
b) fire the command . now i have a problem that i cannot enter the node1 or node2 but have to fire the command from a third location, so i will use a ssh connection for this.
The command goes as:
ssh @node1 /runInstaller -responseFile FROM_LOCATION=/stage/products.xml ORACLE_HOME= $ORACLE_HOME(oracle home path) ORACLE_HOME_NAME= -silent -ignoreSysPrereqs -nowait -waitForCompletion -noConfig -clusterware oracle.crs, -crsLocation

So the only addition from normal silent installation is clusterware oracle.crs, and crslocation.

c) Additionally if one wants to explore all the options provided with the runinstaller just go

/runInstaller -help

and you will find all options and their meanings. there are things like -cfs or -local which might confuse and the usage will depend on experience.

d) Problem comes with Netca as you dont have the -help option to find out what arguments to give.
here i am pasting something i got from some blog. which will help for silent installation of netca and for majority it would of some help.

THE LINK FOR THIS BLOG IS

http://www.pythian.com/blogs/1045/oracle-silent-mode-part-7-installing-an-111-rac-database

Install the Oracle RAC Database Base Release

Once the clusterware has been installed, installing RAC Database software is very similar to installing a non-RAC database software, you just need to specify which servers you want the software to be installed on. The first step is downloading the software and unzipping it:

$ unzip linux.x64_11gR1_database.zip
$ cd database
$ export DISTRIB=`pwd`

To install the database software, you don’t need to modify the response files. You only have to run a command like the one below, in the case of an Enterprise Edition:

export DISTRIB=`pwd`

runInstaller -silent \
-responseFile $DISTRIB/response/enterprise.rsp \
FROM_LOCATION=$DISTRIB/stage/products.xml \
ORACLE_BASE=/u01/app/oracle \
ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 \
ORACLE_HOME_NAME=ORADB111_Home1 \
CLUSTER_NODES={"rac-server1","rac-server2",\
"rac-server3","rac-server4"} \
n_configurationOption=3 \
s_nameForDBAGrp="dba" \
s_nameForASMGrp="dba"

Or in the case of a Standard Edition:

runInstaller -silent                                   \
-responseFile $DISTRIB/response/standard.rsp \
FROM_LOCATION=$DISTRIB/stage/products.xml \
ORACLE_BASE=/u01/app/oracle \
ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 \
ORACLE_HOME_NAME=ORADB111_Home1 \
CLUSTER_NODES={"rac-server1","rac-server2"} \
n_configurationOption=3

As you can see, only a few parameters differ from the non-RAC database installation described in Part 1 of this series:

  • CLUSTER_NODES contains the list of cluster nodes you want to install the database software on.
  • FROM_LOCATION is used when the response file doesn’t point to the location of the products.xml file.
  • s_nameForDBAGrp, s_nameForASMGrp, and s_nameForOPERGrp are used to specify non-default groups for SYSDBA, SYSASM, and SYSOPER.

Once the software is installed, you have to execute the root.sh script from the ORACLE_HOME. Connect as root on every server and run:

rac-server1# /u01/app/oracle/product/11.1.0/db_1/root.sh
rac-server2# /u01/app/oracle/product/11.1.0/db_1/root.sh
rac-server3# /u01/app/oracle/product/11.1.0/db_1/root.sh
rac-server4# /u01/app/oracle/product/11.1.0/db_1/root.sh

Install the Oracle RAC database Patch Set

The first 11.1 Patch Set is not available at the time of this writing.

Configure the Listeners

The fastest way to create and configure the listeners is to use NETCA as below:

$ export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
$ export PATH=$ORACLE_HOME/bin:$PATH
$ netca /silent \
/responsefile $ORACLE_HOME/network/install/netca_typ.rsp \
/nodeinfo rac-server1,rac-server2,rac-server3,rac-server4

Unlike other tools, NETCA uses the “/” character instead of “-” for its flags. With 11.1, the DISPLAY environment variable can stay empty.

Configure Automatic Storage Management

If you plan to use ASM from the newly installed ORACLE_HOME or another one you’ve installed earlier, you can use DBCA to configure it in silent mode. The syntax is the same as the 10.2 asm configuration syntax:

$ dbca -silent                   \
-nodelist rac-server1,rac-server2,\
rac-server3,rac-server4 \
-configureASM \
-asmSysPassword change_on_install \
-diskString "/dev/sd*" \
-diskList "/dev/sde,/dev/sdf" \
-diskGroupName DGDATA \
-redundancy EXTERNAL \
-emConfiguration NONE

Create a RAC Database with DBCA

You can use DBCA again to create the RAC database. The syntax is the same as that explained in the 10.2 RAC post:

$ dbca -silent                             \
-nodelist rac-server1,rac-server2,\
rac-server3,rac-server4 \
-createDatabase \
-templateName General_Purpose.dbc \
-gdbName ORCL \
-sid ORCL \
-SysPassword change_on_install \
-SystemPassword manager \
-emConfiguration NONE \
-storageType ASM \
-asmSysPassword change_on_install \
-diskGroupName DGDATA \
-characterSet WE8ISO8859P15 \
-totalMemory 500
================================================================

Back to business:
1.This is a guide to 11g installation. So you can avoid ORACLE_BASE which was not there in earlier version. Other options will work as possible.
2. From where did ASM come from?
RAC can be a standalone database on the various nodes or it can be on ASM which has disks on various nodes to manage data. A more effective way of doing things!!
So if you have ASM below the RAC setup do see the installations for ASM
else forget it and come along with me..

IF its so well documented why to repeat things. My problem is i am using a third machine to remotely fire all commands and i do not find a solution how to fire netca commands because first we need to set $ORACLE_HOME env.

Finally some R n D we get the solution to the above problem as:
user@machine_name 'export ORACLE_HOME=$ORACLE_HOME; $ORACLE_HOME/bin/netca /orahome $ORACLE_HOME /instype custom /inscomp client,oraclenet,javavm,server,ano /insprtcl tcp,tcps /cfg local /authadp NO_VALUE /nodeinfo stamy04,stamy05 /responseFile $ORACLE_HOME/network/install/netca_typ.rsp /silent'

So for us a ";" works!!! :)

The DbCa works as illustrated in the blog i have named earlier or the text written above w.r.t blog.
except for a cliche. The problem here is that the dbca is unable to recognize the shared location as a shared location. Here we took the two nodes and ran a simple program which just engages mounting and dismounting the shared location and touching the files. So that the dbca could figure out that their is a shared location which is engaged in some process. and thus knows the shared location.

On a shell prompt
for EACH in `seq 1 80`
do
each $EACH
mount -o remount shared
tuch shared/X$EACh
sleep 5
rm shared/X$EACH
we tried on both machine and then from a third machine gave a try to dbca onto the local node.
Hence RAC installation compeletes


No comments: