Escolar Documentos
Profissional Documentos
Cultura Documentos
Rac10gR2OnHPUX............................................................................................................................................1
1. *Introduction.......................................................................................................................................1
1.1. *What you need to know....................................................................................................1
2. *Prepare the cluster nodes for Oracle RAC.....................................................................................................2
3. *Prepare the shared storage for Oracle RAC...................................................................................................2
4. Oracle Clusterware Installation and Configuration.........................................................................................3
5. Oracle Clusterware Patching..........................................................................................................................12
5.1. Patch Oracle Clusterware to 10.2.0.4.............................................................................................12
6. Oracle ASM Home Software Install..............................................................................................................15
7. Oracle ASM Software Home Patching..........................................................................................................18
8. Oracle ASM Listener Creation......................................................................................................................21
8.1. Create Node specific network listeners..........................................................................................21
8.2. Deleting and Adding Listeners......................................................................................................21
9. Oracle ASM Instance and diskgroup Creation..............................................................................................25
10. Oracle RAC Database Home Software Install.............................................................................................29
11. Oracle RAC Software Home Patching........................................................................................................30
12. Oracle RAC Database Creation...................................................................................................................32
12.1. Creating the RAC Database.........................................................................................................32
12.2. Oracle Interconnect Configuration..............................................................................................32
12.3. Public Network Redundancy Configuration................................................................................34
i
Rac10gR2OnHPUX
1. *Introduction
A graphical depiction of this is shown below (picture taken from HP/Oracle CTC presentation):
The high level overview of the tasks (from an Oracle perspective) is as follows:
It should be noted that HP Serviceguard extensions for RAC is not mandatory for deploying RAC 10gR2. Nor
is it necessary to deploy ASM over SLVM. This document does not include information with respect to the
building of the HP Serviceguard cluster nor the configuration of SLVM. For those interested in obtaining that
information, please refer to the HP/Oracle CTC site at: http://hporaclectc.com/
Rac10gR2OnHPUX 1
2. *Prepare the cluster nodes for Oracle RAC
• Oracle Clusterware
Since this particular deployment uses ASM over SLVM, the configuration is typically performed by a system
administrator. That is to say the SA, configures the LUN's required for Oracle Clusterware and ASM. These
will be logical volumes that will be made available for the storage of the files mentioned above - generally the
entire physical disk will be used for a logical volume - which means there would be a 1-1 mapping of logical
volumes to disks. Now, typically a volume group is created which acts as a logical container for logical
volumes. What this means, is that a logical volume group can consist of many logical volumes - which in turn
map to physical disks. So for example, you can have a volume group for the oracle clusterware files, that
consists of 2 logical volumes (if there is external redundancy) - 1 for the OCR file and the other for the voting
disk. To add to that, you can have another volume group that consists of logical volumes to store the oracle
database files - to be used by ASM. The management and control of these volume group's fall under HP's
SLVM - note however that this is not the only way to deploy ASM, at the time of this particular deployment
since HP serviceguard extensions for RAC was also being used this was required. However one can do a
standalone Oracle deployment that does not use a third party cluster manager nor requires the use of SLVM.
I will briefly cover the details of this deployment below, starting off with the following components:
These two components reside on shared logical volumes under the control of HP’s SLVM. They are part of
the following volume group:
vg_rac_crs (/dev/vg_rac_crs)
Similarly the oracle database datafiles are part of the volume group:
vg_rac_data
The details of this volume group are shown in the table below:
#ioscan -fnC
Mount the media for oracle clusterware (runInstaller is present in the second dvdrom disk)
#xhost +
#su - oracle
$export DISPLAY=172.25.3.25:0.0
Invoke the oracle universal installer, as the oracle user (the command below, runs the installer, with tracing
enabled to assist with troubleshooting – should any issues arise during the installation).
• Notes
• Notes
Click Next to be presented with the ‘Specify Home Details’ (shown below), you will specify the
ORACLE_HOME location here for oracle clusterware. You will also give this home a name – which will be
served as a reference for future installations/patching.
Click next to proceed and you should be presented with the ‘Specify Cluster Configuration’ screen (below).
At this point, you must select all nodes that will participate in the RAC configuration. You will also specify
the private hostname alias (used by cluster interconnect) and the virtual hostname alias used for client
connections. These aliases should be defined on all hosts, typically /etc/hosts file of the cluster nodes. In
Clicking next will take you to the ‘Specify Network Interface Usage Screen’ (shown below), here you specify
which interfaces will be used for the public network and which will be used for the private network.
Next you will be asked to provide the location for where the oracle cluster registry (OCR) will be stored. This
should be a shared device accessible by all nodes in the cluster (shown below).
Finally the location for the voting disk must be specified (see below):
• Notes
• Notes
♦ After the remote operations stage completes a dialog box pops up requesting the execution of
various scripts on the nodes in the cluster
Below are the details of running these scripts on both nodes of the cluster - aquadb0 and aquadb1:
From aquadb1:
# ./orainstRoot.sh
Creating the Oracle inventory pointer file (/var/opt/oracle/oraInst.loc)
Changing permissions of /home/oracle/oraInventory to 775.
Changing groupname of /home/oracle/oraInventory to dba.
The execution of the script is complete
From aquadb0:
# ./root.sh
Checking to see if Oracle CRS stack is already configured
Checking to see if any 9i GSD is up
# ./root.sh
Checking to see if Oracle CRS stack is already configured
Checking to see if any 9i GSD is up
The message highlighted in italics (above) is a bug, and will require that the virtual ip configuration assistant
be run as root user from the last node – aquadb1 in our case
To proceed with running the virtual ip configuration assistant. A new terminal is opened and the DISPLAY
parameter is set, as this is a graphical tool (see below):
• Notes
Since the virtual ip’s are configured on the public interface, we must select all public interfaces when
prompted to at Step 1 of 2. In our case, lan0 is the public interface and hence is selected (shown below):
♦ The next step requires selecting the public interface that will be used while configuring the
vip.
• Actions
The next step requires details to be provided about the public node names, the virtual host names (IP Alias
Name) and the ip addresses of the nodes that are part of the RAC cluster.
• Notes
♦ Ensure the correct information is shown with respect to virtual host information, make the
necessary changes by clicking the appropriate field.
♦ Once done, click next to proceed
• Notes
After this various configuration assistants are run, their purpose is to configure the ‘nodeapps’ component of
RAC 10g.
You may click exit here and then 'ok' on the screen that displays the pop up box for ‘execute configuration
scripts’. This will result in the OUI spawning the remaining configuration assistants of which the oracle
cluster verification utility (cvu) will fail (it did in my case) – this can safely be ignored.
Where ORACLE_HOME is the location pointed to for the Oracle Clusterware installation.
• Actions
Now as before, we will invoke the runInstaller utility from the patchset location, from the node aquadb0. The
patch set location is the directory where the 10.2.0.4 patchset has been extracted. After this we will provide
the location of ORACLE_HOME of the oracle clusterware, so that the correct ORACLE_HOME is patched.
• Notes
You may click next to proceed; you will eventually reach the summary screen, which details the actions to be
performed, after which clicking on next commences the patchset application. You may encounter an error,
which pops up with a message stating PRKC-1073, you can safely ignore this as it is a bug.
Finally the end of installation screen will appear, requiring you to run the root102.sh script as root user on all
nodes in the cluster.
Once this is done, the ‘Configure Automatic Storage Management’ screen is displayed, here will create only
one diskgroup (others will be created after the successful installation of asm). The disks to be used by ASM
have been configured as shared logical volumes. Each disk is basically under the control of HP’s SLVM. Each
logical volume consists of one physical disk, this means each logical volume will be 50gb in size (since each
physical disk is 50gb). These logical volumes are part of the volume group vg_rac_data. In order for ASM to
find these disks, we need to change the disk discovery path (shown below), the string used here is:
/dev/vg_rac_data/rlv*
• Notes
After this we will be able to see all disks that can be selected to be part of an asm diskgroup. The first
diskgroup we will create will be called data_crm, and will consist of logical volumes rlv*01-08. Once this is
done, we will click next to proceed anf will eventually be presented with the summary page as seen in
previous sections. Click next to begin the installation of oracle asm 10.2.0.1. Towards the end of the
installation, a dialog box will popup asking for the configuration script root.sh to be run on each node (shown
below).
As before, root.sh is run on aquadb0 and aquadb1. Once this is done, clicking on ok will result in the
configuration assistants screen to be presented.
A successful installation will lead to the end of installation screen being display
Once this is done the OUI is invoked in the same way as it was for patch the oracle clusterware. We are
required to specify our ASM ORACLE_HOME as seen below
The next screen presented will show the nodes that will be patched – basically the nodes that are part of the
cluster.
We are then presented with the summary screen, next, as shown in previous installations. After which the
patching commences, as shown below:
Once the script is run, we can startup nodeapps and asm, as follows:
Show Nodeapps & ASM Startup Hide Nodeapps & ASM Startup
To verify that all services are up, the following command can be issued:
$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
The above shows that both nodeapps and asm have been started successfully.
• Oracle Clusterware
• Oracle ASM
• Oracle RDBMS
The network listeners will run out of the ASM ORACLE_HOME and will be created using the netca (network
configuration assistant) utility. The steps required, here, are typically the same (when deploying a single
instance oracle database) the only real difference is selecting the 'Cluster Configuration' radio button. The next
section goes through this process.
The result of this requires a look into the output of the 'crs_stat -p' command, specifically for network listener
resource:
NAME=ora.aquadb0.LISTENER_AQUADB0.lsnr
NAME=ora.aquadb0.LISTENER_AQUADB1.lsnr
Since we have a two node RAC, we have two listeners with each node name appended to the end of the
listener name preceded by an '_'. Now, the above two resources have a parameter called ACTION_SCRIPT,
after running the srvctl command the value of this parameter looks like:
The difference seen is the second result (before running ‘srvctl modify’) shows the racgwrap script pointing to
the ASM_HOME – this is correct as the listeners run from this home. Also on trying to run nodeapps, we
would find that the network listener would not start. However if one were to login as the oracle user and set
the environment to ASM_HOME and then run the listener as follows:
Further analysis showed the following in the 'ora.aquadb0.LISTENER_AQUADB0.lsnr.log' log file located
under $CRS_HOME/racg directory
As can be seen the lsnrctl binary is being called out of the CRS_HOME – this binary is not present there, nor
should it be run from there as the network listeners are configured to run out of the ASM_HOME. It appears
that the run of ‘srvctl modify’ has resulted in the incorrect HOME being used for the network listeners.
The solution to listener problem is to delete the existing listeners and recreate them using the netca (network
configuration assistant) utility run from the ASM_HOME of our primary node aquadb0. What follows are the
steps to achieve this:
$ . ./asm.env
$ export DISPLAY=client_pc_where_xsession_is_run_from
$ netca
On invoking netca it is important to select ‘Cluster Configuration’ before proceeding. This is seen below:
Next select the task to be performed, in our case we will choose to delete the listener(s).
Once the listener has been deleted a message will be printed on the xterminal that was used to invoke netca
informing that the listeners on both nodes aquadb0 and aquadb1 have been deleted. Once this has been done,
start a new session of netca from where the new listener will be created. Ensure that cluster configuration is
selected as shown earlier. Next ensure that all nodes are selected, then click next to select to add a listener
from the options presented. Finally accept the default name as LISTENER. Once this is done, your xterminal
window will show messages that the listener has been created on nodes aquadb0 and aquadb1, as shown
below.
• Notes
♦ Notice that first there is a message for the deletion of each listener
♦ During our second run of netca - to add the listeners - all nodes where the listeners are created
are displayed on the xterm.
$ cd
$ . ./db.env
$ dbca
We will be presented with the DBCA welcome page, select the option for Real Application Clusters to
proceed
Next we are presented with the step 1 of 4 screen, here will select the last option configure automatic storage
management as we plan to create disk groups.
On selecting the nodes we will be prompted for the ASM sys password that we provided earlier during our
installation of ASM.
We will now create the remaining diskgroups as per the requirements shown in table at the beginning of this
chapter. The first group ARC_CRM is created by specifying logical volumes:
• rlv_rac_data09
• rlv_rac_data10
Information on these logical volumes can be found in the chapter 3 - Prepare the shared storage for Oracle
RAC:
♦ Notice Alls disk discovered by ASM are displayed - this is virtue of the discovery string we
used earlier while configuring ASM
♦ Select the disks/logical volumes that will be part of the disk group ARC_CRM
• Actions
Once the disks are selected we will click ‘ok’ and be presented will a pop up box indicating that the diskgroup
creation is underway.
Once the disk group is created we will see a new disk group name ARC_CRM under the ASM Disk Groups
screen.
Shown below is an image of when all diskgroups have been successfully created:
Following this screen is the summary screen (as seen earlier) after which the installation starts. After
successful installation we will be prompted to run the root.sh script. This will be run as before on all nodes in
the cluster. This will complete the installation of the RDBMS (RAC) binaries.
We are then presented with the summary screen, next, as shown in previous installations. After which the
patching commences, as shown below:
This occurred because there was a change of the network subnet mask, which took place at the o/s level and
was not changed in the OCR – where this information is also stored. This can be seen by issuing the following
command:
# $ORACLE_HOME/bin/oifcfg getif
lan2 172.25.0.0 global cluster_interconnect
lan0 172.25.3.0 global public
lan2 is our private network for the oracle interconnect, the subnet initially assigned to it was 172.25.0.0, this
should be 172.25.5.0. To remedy this, the following needs to be done (after shutting down all services
dependant on and including nodeapps:
(Configures new private network with correct subnet, run as root user)
# $ORACLE_HOME/bin/oifcfg setif -global lan2/172.25.7.0:cluster_interconnect
Once this is done, oracle clusterware must be restarted. After which the dependent services can be brought
back up.
Further verification can be seen by connecting to both database instances and issuing the following sql:
The steps to apply patch: 4699597 are documented in its readme, this section discusses the use of srvctl to
update the configuration in the OCR to include lan3 and lan4 as standby lans.
First all services dependant on and including nodeapps are stopped. What follows next is the series of
commands issued to perform the update at the OCR.
• The -o option requires the value of the ORACLE_HOME for the CRS.
• The primary interface is specified first - lan0
• Each additional lan is separated by the pipe symbol '|'. This | symbol must be preceded by the forward
slash '\' which acts as an escape character to the pipe symbol
To verify the above changes have taken place, the following commands are executed (as root user, from the
CRS_HOME):
To verify the changes have taken place, the crs_stat command can have its output redirected to an output file
as follows:
This file will contain a list of all oracle managed resources. Since we have modified the VIP properties, we
look at the resource for the VIP’s which has the following heading:
NAME=ora.aquadb0.vip
NAME=ora.aquadb1.vip
Within these two resources, the following parameter shows the interface definition:
USR_ORA_IF=lan0|lan3|lan4
USR_ORA_IF=lan0
Now the VIP, knows it must run on first lan0, and then lan3 or lan4 after which a relocation to another node
must take place.
An important note, is that after the application of patch 4699597, the VIP now runs on the logical interface as:
lan0:801 – prior to the patch it would run on lan0:1
We will investigate this by inspecting the VIP log file first for node aquadb0, the name of this log file is:
ora.aquadb0.vip.log, located under $CRS_HOME/racg.
Prior to investigating the log file it is important to note that the checking of the VIP is determined by the
parameter CHECK_INTERVAL. By default this parameter is set to 60 seconds, this means the interface the
VIP resides on is checked every 60 seconds, below is a snippet from the above log file, that shows such a
check once the cable from lan0 is removed (text in blue is commentary and not part of the log file):
Within seconds we will now see that the VIP has failed over to the standby interface lan3:
Show VIP First Fail Over Hide VIP First Fail Over
2007-04-13 22:47:33.229: [ RACG][1] [8943][1][ora.aquadb0.vip]: Fri Apr 13 2
Fri Apr 13 22:47:32 PST 2007 [ 8945 ] Interface tests
Fri Apr 13 22:47:32 PST 2007 [ 8945 ] checkIf: start for if=lan3 -> Next availa
Fri Apr 13 22:47:33 PST 2007 [ 8945 ] checkIf: detected MC/ServiceGu
2007-04-13 22:47:33.229: [ RACG][1] [8943][1][ora.aquadb0.vip]: ard Local Sw
Fri Apr 13 22:47:33 PST 2007 [ 8945 ] checkIf: interface lan3 is a MC/Servicegu
Fri Apr 13 22:47:33 PST 2007 [ 8945 ] getnextli: started for if=lan3
Fri Apr 13 22:47:33 PST 2007 [ 8945
2007-04-13 22:47:33.229: [ RACG][1] [8943][1][ora.aquadb0.vip]: ] listif: s
Fri Apr 13 22:47:33 PST 2007 [ 8945 ] listif: completed with lan0
lan1
lan2
lan3
lan4
Finally the cable for lan3 is unplugged and the following is observed:
Show VIP Second Fail Over Hide VIP Second Fail Over
2007-04-13 22:52:37.619: [ RACG][1] [17212][1][ora.aquadb0.vip]: Fri Apr 13
Fri Apr 13 22:52:36 PST 2007 [ 17214 ] Calling getifbyip
Fri Apr 13 22:52:36 PST 2007 [ 17214 ] getifbyip: started for 172.25.3.16
Fri Apr 13 22:52:36 PST 2007 [ 17214 ] Completed getifb
2007-04-13 22:52:37.619: [ RACG][1] [17212][1][ora.aquadb0.vip]: yip lan3:80
Fri Apr 13 22:52:36 PST 2007 [ 17214 ] Completed with initial interface test
Fri Apr 13 22:52:36 PST 2007 [ 17214 ] Broadcast = 172.25.3.255
Fri Apr 13 22:52:36 PST 2007 [ 17214 ] checkIf: start for if=lan3
Fri Apr 13 22:52:36 PST 2007 [ 1721
2007-04-13 22:52:37.619: [ RACG][1] [17212][1][ora.aquadb0.vip]: 4 ] checkIf
Fri Apr 13 22:52:36 PST 2007 [ 17214 ] checkIf: interface lan3 is a MC/Serviceg
Fri Apr 13 22:52:36 PST 2007 [ 17214 ] Performing CRS_STAT testing
F
2007-04-13 22:52:37.619: [ RACG][1] [17212][1][ora.aquadb0.vip]: ri Apr 13 2
Fri Apr 13 22:52:37 PST 2007 [ 17214 ] start part: get default gw
Fri Apr 13 22:52:37 PST 2007 [ 17214 ] defaultgw: started
Fri Apr 13 22:52:37 PST 2007 [ 17214 ] defaultgw: completed with
2007-04-13 22:52:37.619: [ RACG][1] [17212][1][ora.aquadb0.vip]: 172.25.3.2
Fri Apr 13 22:52:37 PST 2007 [ 17214 ] Completed second gateway test
Fri Apr 13 22:52:37 PST 2007 [ 17214 ] Interface tests
Fri Apr 13 22:52:37 PST 2007 [ 17214 ] checkIf: start for if=lan0 -> First lan0
Fri Apr 13 22:52:37 PST 2007 [ 17214 ] checkIf: det
2007-04-13 22:52:37.619: [ RACG][1] [17212][1][ora.aquadb0.vip]: ected MC/Se
Fri Apr 13 22:52:37 PST 2007 [ 17214 ] checkIf: interface lan0 is a MC/Serviceg
Fri Apr 13 22:52:37 PST 2007 [ 17214 ] checkIf: start for if=lan4 -> lan4 is no
Fri Apr 13 22:52:3
2007-04-13 22:52:37.619: [ RACG][1] [17212][1][ora.aquadb0.vip]: 7 PST 2007
Fri Apr 13 22:52:37 PST 2007 [ 17214 ] checkIf: interface lan4 is a MC/Serviceg
Fri Apr 13 22:52:37 PST 2007 [ 17214 ] getnextli: st
2007-04-13 22:52:37.619: [ RACG][1] [17212][1][ora.aquadb0.vip]: arted for i
Fri Apr 13 22:52:37 PST 2007 [ 17214 ] listif: starting
Fri Apr 13 22:52:37 PST 2007 [ 17214 ] listif: completed with lan0
lan1
lan2
lan3
lan4
Fri Apr 13 22:52:37 PST 2007 [ 17214 ] getnextli: completed with nextli=lan4:8
Fri Apr 13
Finally when all interfaces are unavailable the VIP will relocate to a surviving node, in our case aquadb1. On
aquadb1, under the CRS_HOME/racg directory there is a VIP log file for aquadb0, called:
ora.aquadb0.vip.log. This contains the following entries:
Show VIP Relocation to Available Node Hide VIP Relocation to Available Node
2007-04-13 22:55:11.745: [ RACG][1] [24512][1][ora.aquadb0.vip]: Fri Apr 13
Fri Apr 13 22:54:52 PST 2007 [ 24523 ] Calling getifbyip
Fri Apr 13 22:54:52 PST 2007 [ 24523 ] getifbyip: started for 172.25.3.16
Fri Apr 13 22:54:52 PST 2007 [ 24523 ] Completed getifb
2007-04-13 22:55:11.745: [ RACG][1] [24512][1][ora.aquadb0.vip]: yip
Fri Apr 13 22:54:52 PST 2007 [ 24523 ] switched to standby : start/check operat
Fri Apr 13 22:54:56 PST 2007 [ 24523 ] Completed with initial interface test
Fri Apr 13 22:54:56 PST 2007 [ 24523 ] Broadcast = 172.25.3.255
Fri Apr 13 22:54:56 PST 20
2007-04-13 22:55:11.746: [ RACG][1] [24512][1][ora.aquadb0.vip]: 07 [ 24523
Fri Apr 13 22:54:56 PST 2007 [ 24523 ] checkIf: start for if=lan0
Fri Apr 13 22:55:09 PST 2007 [ 24523 ] checkIf: detected MC/ServiceGuard Local
Fri Apr 13 22:55:09 PST 2007 [ 24523 ] checkIf: interface la
2007-04-13 22:55:11.746: [ RACG][1] [24512][1][ora.aquadb0.vip]: n0 is a MC
Fri Apr 13 22:55:10 PST 2007 [ 24523 ] getnextli: started for if=lan0
Fri Apr 13 22:55:10 PST 2007 [ 24523 ] listif: starting
Fri Apr 13 22:55:10 PST 2007 [ 24523 ] listif: completed with lan0
This concludes the check of the redundancy for the public network