Professional Documents
Culture Documents
19 Votes
Introduction: This learning experiment is about building a totally virtual Oracle RAC
environment at home using only tools and software available to wide public, preferably open
source (when possible).
My project is generally based on an excellent article by Jeffrey Hunter (and other authors) –
Build Your Own Oracle RAC Cluster on Oracle Enterprise Linux and iSCSI
Jeffrey’s article gives instructions on how to build a physical setup. I do recommend reading this
article or at least giving it some 10 minutes scan before you attempt to build a RAC. In that
article Jeffrey estimates a cost to build a production RAC in physical environment between $20K
and $30K. He shows that for the purposes of learning the technology a “mostly physical” RAC
with some parts virtualized can be built for under $2700. I am going to take the virtualization to
the extreme and build a RAC inside a single PC. Yes, I do not care now about performance, and
yes, I am willing to buy some additional memory for the PC. You can not really expect to run
two Linux nodes with databases and a storage (SAN) simulation on a PC with 1GB of memory.
My estimated cost is, therefore, somewhere under $100, if all we need is a memory upgrade.
Sounds good? It is still a lot of work and it will probably take you many hours to do it right. The
benefit is a hands on knowledge, which is priceless.
PC or server with some 200GB space and 3.5GB memory (XP Professional can handle
up to 4GB).
The host OS: Windows XP SP3 professional (although SP2 will probably do as well)
Virtualization software: Sun’s Virtual Box 3.1.2 (or higher). Works with no issues on
both Intel and AMD processors.
Database nodes: Oracle Enterprise Linux 5 update 3 as a guest OS, running Oracle
Database 10.2.0.1
SAN/NAS emulation software: Openfiler 2.3
Why Sun Virtual Box and not VMware? VMware is a popular product but I do not see a
consistency in their support of free versions of the software. In my experiments with VMware I
have encountered some obstacles while running Linux guests (particularly in networking and
CPU clock synchronization). Virtual Box is an open source product and quite a mature one, well
documented and supported. So far I was able to run OEL4 and OEL5 with no issues (even with
no guest additions installed). I like the product’s built-in networking, it seems to be more flexible
and stable. These are all my personal preferences, of course.
Why Oracle’s Linux? This particular flavor of Linux is a modified Red Hat Enterprise Linux 5.
Oracle has made a few adjustments that allow Oracle 10g R2 database (32 bit) to install with no
issues on it (usually, no additional RPM’s required). Since I am aiming to install Oracle in the
guest(s) thus the choice of this Linux flavor. Besides, this Linux comes with OCFS2 and most of
the ASMLib software packages installed. If you have a licensing question about Oracle
Enterprise Linux (OEL) I can answer it. You only need a license if you want Oracle’s support.
For learning purposes you do not need a license. If you will need to download some rpm libraries
and updates you can get those for free, the YUM configuration can be pointed to a free
repository (not discussed here).
Now the database itself. Which edition of 10.2.0.1 are we going to use? There is no clarity in that
article on this matter, for now I assume the Standard Edition will do. There are some additional
pieces of software from Oracle (or used by Oracle) to be installed, those are: OCFS2, ASMLib
2.0 and TAF.
Now that we know what we need to get started let’s split the work into more manageable mini
projects, follow them just in this order, and hopefully all pieces will fit:
Virtual Oracle RAC. Task 1: Install and configure Sun Virtual Box
3 Votes
Link back: This guide is a part of the Virtual Oracle RAC project, the index to the whole project
is here.
Here is an overview of network setup that we will do in Virtual Box environment. This picture
below shows three sets of network adapters in guests.
Make sure Host-Only network is installed (it must be there by default) and it is the only network
present. Create it, if it is not there. The notion of "network" in this particular part of Virtual Box
may be likened to creating a router with a static IP. This "router" will be accessible from host’s
network but not from outside of it (not from other hosts on your network).
Notice, that during the installation of networks there may be pup-ups asking you if you want to
proceed with unsigned driver installation. Do proceed, of course.
Configure Host-Only adapter as below (yes, it is placed on a totally separate network from your
host’s LAN adapter):
Click on "Ok", close all settings dialogs and wait till another adapter is created.
Save your changes and enter "ipconfig" command from host command prompt. At this point the
host networks will look like this:
As you can see, Host-Only networks is here but not connected to your gateway (i.e. to your
router).
From the network diagram you will notice that there is a "Bridged" network "router", this one
does not have to be created, it appears automatically when "Bridged" adapters are created in
guests.
Disclaimer: in my network setup I have used a domain name that can be taken or belong to
someone. If such is the case, it is by pure coincidence and I apologize for any inconvenience it
may have caused. Presently it appears that all possible and impossible domain names are taken
but I have no claims on the domain name. I used it just for illustration only.
4 Votes
Link back: This guide is a part of the Virtual Oracle RAC project, the index to the whole project
is here.
If you are planning to experiment with Oracle RAC you will need a SAN (NAS). It all stems
down to having iSCSI targets (server) somewhere on your network. These iSCSI targets can be
created in a variety of ways. Reminder: we are in a virtualized environment so we do not need to
run to a store and buy real hard drives. We will use software to simulate hard drives and disk
volumes. Some projects I looked at use Linux guests (in virtual machine) to simulate iSCSI using
iSCSI server features built into some Linux flavours. Such is, for instance, SUSE Linux
Enterprise Server 10. I’d rather go with open source software for this purpose. My choice is
Openfiler, which is based on a small Linux distro (well, of course) and gives you nice web based
interface. Openfiler is essentially free, however if you want to get the Admin Guide book it will
cost you 40 GBP.
If you want to know more about Openfiler (other than what you can find on their web site) you
can refer to www.rpath.org
Get Openfiler installation media from http://www.openfiler.com/ , it comes in a small image file
of some 300MB size (best things come in a small package, remember?).
Let’s create a new guest that will become our Openfiler server.
I named the guest Openfiler2 just in case to avoid any possible trouble later when we come to the
networking part. "Red Hat" is the default and I did not bother to change it. Seems to work fine.
For memory, 256MB RAM should suffice for now. Remember, this will take a chunk off your
real memory so do not be too generous.
Now this. The virtual hard drive in this case is the "internal hard drive" in the Openfiler2
machine, i.e. the hard drive that will hold the OS. We will create a new hard disk. This one is not
the hard drive that will be used for iSCSI simulation (be patient).
This screen (can not even call it a dialog) is kind of redundant but we like to be welcomed
anyway, right?
We accept the default of dynamically expanding storage.
Set the size to 800MB initially
Click on Finish and … your new guest with its hard drive are created.
Now go back to the guest machine settings, there is some work to do here. Navigate to the
System and then to Processor tab. This is very important! Enable PAE/NX support as shown
below (if it not enabled by default in your version). If it is not enabled, your installation will fail
at the very end (as it did for me). Look up this part at http://en.wikipedia.org/wiki/NX_bit if you
really really want to.
Almost ready to run the installer, but wait a second. We need to plug some disks into the
Openfiler to get our iSCSI targets, right? Where are those disks coming from? Here is what we
need to do. Close the settings screen for the guest and bring up Virtual Media Manager (that’s a
very cool thing, you have seen a part of it already when we created hard dist for Openfiler2):
Use "New" dialogue to create a virtual hard drive in a file named "openfiler_rac" and sized at
40GB (just like if you were creating a file holding a guest VM). The result will look like this:
The "openfiler_rac" storage will be used in our RAC project to hold iSCSI drives. Now see what
happens next. Bring up the Openfiler2 guest settings and go to "Hard Disks" section. Add the
hard disk to the vacant slot in the IDE controller (the capacity of one controller seems to be three
IDE devices).
When you run installation of your guest these disks will be detected as normal IDE drives.
I must point out that I have seen an article on the internet suggesting the use of physical external
USB hard drive as a source disk for Openfiler (in a Virtual Box environment), another article
suggested using an additional Linux guest machine for such a purpose (to simulate hard drives). I
am wondering, why to go to such extent of complexity when Virtual Box provides much simpler
means?
So, next in our setup is the network, we define two host-only adapters and one bridged adapter.
The bridged adapter will later be used during NTP setup.
Adapter 1:
Adapter 2:
And bridged Adapter 3 (do not copy down my MAC addresses, they are not important to you):
Why this particular adapter type (Intel PRO)? Why not to go with the default? It worked for us
well in other Linux installation. The default type will work for you as well, that is, until first
reboot of the guest. Then your adapters will simply vanish. This has to do with a driver supplied
by VMware to Openfiler to support virtual network adapters (can be a problem in this particular
version of software). To make the story short, only this Intel PRO type seems to survive after
restarting the guest. This problem may not present itself in future releases of Virtual Box and
Openfiler (hopefully).
Now all we need to do is to insert the installation media and push the reset button. But how?
Easy enough. Bring up the Virtual Media Manager again and go to CD/DVD images tab.
Register the installation media (the image file) and notice that the grayed line at the bottom reads
"Not Attached", which means that this file, although registered with the Media Manager, is not
used by any component at this time.
Now bring back the Openfiler2 settings and go to Storage tab. There should be a DVD drive in
our IDE controller, if it is not there it can be added easily. Click on "CD/DVD Device":
Select the appropriate media (so here is the connection between registered media files and DVD
drive in our virtual guest!)
Now we see the the media file (image) appeared in the CD drive:
Finally, we are ready to start installation. Just start your guest, it will detect installation media
and boot into installer.
When network cards detected during installation, assign IP addresses shown below in Openfiler
section at the bottom:
# eth0
# Database nodes – Public Network
10.10.2.11 odbn1.harzion.org odbn1
10.10.2.12 odbn2.harzion.org odbn2
# eth1
# Database nodes – Private Interconnect
10.10.1.11 odbn1-priv.harzion.org odbn1-priv
10.10.1.12 odbn2-priv.harzion.org odbn2-priv
The gateway, of course, will be at 10.10.1.1 and hostname is "openfiler". Notice that naming of
the guest in Virtual Box has no effect on hostnames so do not confuse these two kind of names.
The /etc/hosts file shown above we will place in our Openfiler once installation is done, same
file will be present on all other hosts involved in the project.
All future interactions with the running Openfiler are via a web interface. When the guest boots
it displays a reminder on where the web GUI sits:
Default web user is: "openfiler" and the password is "password". Who could have guessed… I
was going to try "1234", like in "Spaceballs" movie, one of my favourites.
I used a very good practical guide on how to create virtual volumes in the Openfiler that can be
found here: http://www.oracle.com/technology/pub/articles/hunter_rac10gr2_iscsi.html#9 (notice
that it deals with physical hardware rather than virtual but it makes no difference to us).
Link back: This guide is a part of the Virtual Oracle RAC project, the index to the whole project
is here.
Now that we have Openfiler and OEL guests in Virtual Box, we can start configuring our Oracle
RAC. As a general guideline I am going to use this (excellent) article –
http://www.oracle.com/technology/pub/articles/hunter_rac10gr2_iscsi.html (the article gives
instructions on how to build physical setup, while we are trying here to do the same in virtual
environment). Roll up your sleeves.
If you have followed instructions in my other articles on installing OEL your network will differ
a bit and will need some adjustments, we will cover that, of course.
The starting point is assigning names and network addresses to all our components, all hosts in
our network will have exactly same /etc/hosts file, as shown below (we have placed it in our
Openfiler already):
Navigate to [System] / [Network Setup], notice our three network interfaces. Two of them have
static IP and are active already, one needs a setup (correction – eth0 and eth1 show reversed.
eth0 should be on 10.10.2.20 and eth1 on 10.10.1.20):
Click on eth2 interface and select DHCP protocol:
The result will look like this (actual IP not shown for eth2):
Now enable two hosts (two RAC nodes) to communicate to Openfiler as below (notice the
slightly unusual netmask).
If you are setting up this project at home chances are you have access to internet and so you can
use of the “pool” servers, such as 0.pool.ntp.org or similar. If you do not have access to internet
but instead have a Windows Domain Server (so you are in a corporate environment) you may be
lucky and our Linux guest will be able to get time from the domain controller.
Put a name or an IP of the NTP server you are going to use as a time source. Use 10.10.1.1 to
get time from domain controller (somehow Windows XP will relay this to DC). Use internet
NTP server if you have access to internet.
Open an SSH window and connect to openfiler2 as root.
View /var/log/messages file, it may have these lines added after you click on “Setup
synchronization”:
By this time openfiler2 will have its NTP receiving time but it will not distribute it to others. In
order to allow RAC nodes to query this NTP server we have to edit /etc/ntp.conf file on
openfiler2 and add two more lines to it:
Physical Storage
Navigate to [Volumes]. Most probably you will see a picture like this:
Click on the link for “hdb”, scroll to “Create a partition in /dev/hdb” and click on “Create” thus
accepting defaults:
The result of this action presented below:
Now navigate to [Volumes] / [Volume Groups] and create a new volume group as below:
Not tired yet? Navigate to [Volumes] / [Add Volume] and scroll down to “Create a volume” in
“rac1″ and use the table below (borrowed from original article mentioned in the beginning,
numbers are slightly changed though).
If you did not guess yet, you will have to click on “Map” button thus linking LUN
“/dev/rac1/racdb-crs” with iSCSI target “iqn.2006-01.com.openfiler:racdb.crs”.
After that proceed to “Network ACL” sub-tab and grant our RAC nodes the access to this target
as below:
Now go to first sub-tab and select next target, then link it with appropriate LUN and grant
access. Repeat this process until you linked them all. At this point we are done with Openfiler.
I am sending special thanks to Jeffrey Hunter, whose article was guiding me through this setup
so far.
Rate This
Link back: This guide is a part of the Virtual Oracle RAC project, the index to the whole project
is here.
This part of the project provides instructions on installing Oracle Enterprise Linux 5 Update 3
(OEL5 U3) in Virtual Box 3.1.2 (r56127)
Download "Oracle Enterprise Linux 5 Update 3" from Oracle’s eDelivery site. The media comes
in five ISO CD images or one DVD image, get the DVD image. I am installing a 32-bit variant
here. Why this Linux is treated as Red Hat was explained in the project index.
Create the first node (new guest in Virtual Box):
Give this machine 512MB of memory for now. Later, when we start installing Oracle we may
need to increase the allocation (or maybe add more base memory to the PC):
Choose to create a new hard disk (which will result in a file that holds an image of this machine):
You get to the next window where where you just click Next:
Update boot order so CD/DVD is first, then comes Hard Disk and floppy is not selected:
You will need to create three network adapters, first one for private interface:
Second adapter is for public interface:
And the third adapter is for connecting to Internet (since we do not want to bridge either private
or public interfaces to host’s Internet):
Notice MAC addresses of the cards (they will be different in your case but you may assign them
manually and make them just as in this guide). When these adapters are discovered by hardware
installation wizard you need to know which is which.
Now we are ready to proceed with installing the Linux onto our guest machine.
Add installation media image in Virtual Media Manager (do yourself a favour, download a single
DVD image, it is slower but saves you a lot of time later on). Guests can only see media (regular
files, image files, drives, directories) that are added to Media Manager:
Mount (it will become "attached" in Media Manager) the DVD image in guest (your guest has to
have an IDE device that emulates CD/DVD drive, like in the picture below):
Start installation by powering up the guest (I had to pause the guest to take a snapshot):
If boot order is correct you will be presented with a few dialogues where you mostly accept
defaults until you arrive at storage decisions.
OEL5 differs from OEL4 in its management of partitioning. Volume Groups is a new thing here
but do not be afraid, it is a relatively simple setup, just one more layer of abstraction, like having
a software RAID built on top of your (single) hard drive:
Now configuring network (watch out for MAC addresses, the order of adapters here will not
necessarily be the same as you see them in guest settings). So, first adapter will get a static
address on private network (please use 10.10.2.11 instead of what is shown in the picture below):
Second adapter will also get a static IP, it is on public network (please use 10.10.1.11 instead of
what is shown in the picture below):
Third adapter will get DHCP configuration. Finally, make all three cards active on boot.
Give this machine a hostname. Domain name is mandatory for some services (they will fail on
startup if there is no domain) but it does not have to be a real one, make up yours:
Next screens finalize the initial setup and let you choose software you want to be installed.
When you finally get to the software configuration section choose manual mode and make sure
the following is selected:
Desktop Environments
o GNOME Desktop Environment
Applications
o Editors
o Graphical Internet
o Text-based Internet
Development
o Development Libraries
o Development Tools
o Legacy Software Development
Servers
o Server Configuration Tools
Base System
o Administration Tools
o Base
o Java
o Legacy Software Support
o System Tools
o X Window System
Few more things: when you get to the Firewall dialog – disable the Firewall, when you are asked
about SELinux – disable that one too. You may also create non-root user now or delay that till
later. When done with all that the installation will proceed and the machine will reboot into your
new OS. Hopefully. Watch for any error messages during reboot.
2 Votes
Link back: This guide is a part of the Virtual Oracle RAC project, the index to the whole project
is here.
This part of the project provides instructions on preparing Oracle software installation in Oracle
Enterprise Linux 5 (which itself is in Virtual Box).
In previous guides we have installed OEL5 U3 as a guest machine in Virtual Box. This is our
first node of the RAC. Once we finished with all software installations on that node we will
simply clone it, thus saving a lot of time and effort.
Please refer to the /etc/hosts file that was introduced in Openfiler installation and setup, it will be
placed in all of our Linux machines.
Notice, that node name(s) are not present in the loopback address. That’s right, they should not
be there for the RAC to work properly.
Some adjustments must be done in the kernel for the network (those commands do not make the
changes permanent):
sysctl -w net.core.rmem_default=1048576
sysctl -w net.core.rmem_max=1048576
sysctl -w net.core.wmem_default=262144
sysctl -w net.core.wmem_max=262144
Same changes have to be made permanently in /etc/sysctl.conf file, add following lines to the
config file:
net.core.rmem_default=1048576
net.core.rmem_max=1048576
net.core.wmem_default=262144
net.core.wmem_max=262144
/etc/rc.d/init.d/iptables status
/etc/rc.d/init.d/iptables stop
Select the proper image (if it is not displayed you will have to launch Media Manager first and
register the image file):
Use SSH terminal (PuTTY for instance) to log into “odbn1″ with root credentials. It does not
matter which interface you use now for the session, public or private.
Now let’s run installation for all packages that needed by Oracle, if some of them are already
here the particular command will be skipped.
We can see that some of the packages were there and some were installed. Good.
Now we will install iSCSI package (supplied but not installed by default):
5 Votes
Link back: This guide is a part of the Virtual Oracle RAC project, the index to the whole project
is here.
This part of the project provides instructions on configuring iSCSI initiators in Linux.
Run the following commands to make sure the services will run next time after reboot:
# chkconfig iscsid on
# chkconfig iscsi on
Now, we check if our iSCSI service can communicate with Openfiler. Run this command (shows
available iSCSI targets):
As it turns out, when the iSCSI initiator discovers the targets it configures the services to start up
automatically on reboot and log into the targets. We can test this now by rebooting our linux
machine. This is what you should see during restart if iSCSI setup was done properly:
If login to the targets did not happen on reboot you will need to execute the commands below:
# iscsiadm -m node -T iqn.2006-01.com.openfiler:racdb.crs -p 10.10.1.20 -l
The “-l” option means – log into the target (“a node”, do not confuse this “node” with RAC nodes)
The “–op” option means update configuration property specified by “-n” option, it is “node.startup” in this case.
Do these two commands for each of the targets appropriately, I am showing only first of them.
The command below (no operation specified) can be used to query configuration of a target:
Linux “talks” to iSCSI targets using local device names. The mapping of our iSCSI targets to
local SCSI device names is random and may change after reboot. It is a problem that needs
fixing. The mapping of targets to the local devices is illustrated here:
Since we want to have a permanent and consistent mapping across all RAC nodes, we are going
to create persistent local SCSI device names. This is done using “udev”, which is a Dynamic
Device Management tool.
# cd /etc/udev/rules.d/
# /etc/udev/rules.d/55-openiscsi.rules
KERNEL==”sd*”, BUS==”scsi”, PROGRAM=”/etc/udev/scripts/iscsidev.sh
%b”,SYMLINK+=”iscsi/%c/part%n”
# cd /etc/udev/scripts
We create here a new shell script called “iscsidev.sh” with the following content:
#!/bin/sh
# FILE: /etc/udev/scripts/iscsidev.sh
BUS=${1}
HOST=${BUS%%:*}
[ -e /sys/class/iscsi_host ] || exit 1
file=”/sys/class/iscsi_host/host${HOST}/device/session*/iscsi_session*/targetname”
target_name=$(cat ${file})
echo “${target_name##*.}”
Here is the outcome of all that (the image below may be too wide but I did not want the lines to
wrap):
Well, how do we know if what we’ve done actually worked? We look at the names in /dev/iscsi
(this directory has just been created after we ran these commands, it did not exist before) and
compare them to mapping in /dev/disk/by-path:
And …
Take for instance “/dev/iscsi/asm1/part”, it corresponds to the “asm1″ target (through /dev/sda).
Now we have persistent local names for our targets. We can reboot the odbn1 machine and see
that iscsi devices are still there and properly mapped.
Before we start creating partitions it makes sense to showdown our virtual machines and take a
snapshot of them. This provides an option of reverting to a known state of machine if something
goes wrong.
Assuming that snapshot is taken and our machines are back online.
Notice: some of the material for this article was taken from Oracle author’s article, I recommend
reading that article if you need more detailed information.
The following table lists the five iSCSI volumes and what file systems they will support:
Total 36GB
In the picture below shown the fdisk dialog that creates a primary partition of a maximum
available size. Red arrows mark your input, where you either type values or accept defaults.
# fdisk /dev/iscsi/asm1/part
Repeat the command sequence for volumes asm2 through asm4 and then for crs, which is
shown below. Remember to always create a primary partition, number 1, of max size):
Verify new partitions
Keep in mind that the mapping of iSCSI target names and local SCSI device names will be
different on each of our RAC nodes (it may even change on each particular node after a reboot).
This does not present a problem as we are using local device names presented to us by “udev”.
So, if you have not restarted your node after partitioning, run following command as root:
# partprobe
# fdisk -l
Virtual Oracle RAC. Task 7: Preparing Linux guest for Oracle installation –
part 1
5 Votes
Link back: This guide is a part of the Virtual Oracle RAC project, the index to the whole project
is here.
Before we run installation process for Oracle software there is some preparation needed. If not
specified otherwise, the commands in this chapter are to be executed in SSH session as a user
"root". If you are not familiar with UNIX and Linux, the "#" in the beginning of the command
line denotes that you are logged in as user "root", the "#" is not a part of the command.
We will try to do as much work on a single node of the RAC before we clone it. After that some
changes will have to be done on both nodes (or more, if you are going for more than two nodes).
This Linux distribution comes with many services activated by default. Some of them we are not
going to use and so they can be disabled. Following commands are taking care of just that (run
them as root). The change will take place after next reboot.
# chkconfig –list
Another important change concerns default run level of the system. Under normal circumstances
runlevel 3 is sufficient, while by default the system will proceed to level 5 (where it starts GUI
desktop – X Windows). As we are going to use "telnet", i.e. SSH tools to communicate with our
Linux systems we do not need to run our guests at level 5. Here is how to change the default run
level.
# cd /boot/grub
# vi menu.lst
If you ever need to get to the X Windows Desktop again all you have to do is to issue "init 5"
command as root. When you are done you can issue "init 3" command to bring the system back
to level 3, no shutdown or reboot is necessary.
RAC technology requires that all nodes of the cluster have a shared access to the Oracle
Clusterware software. This is achieved by using Oracle Cluster File System (OCFS2 in our case)
. When using OCFS (and, if you think of this, any other shared storage solution) all nodes will
authenticate themselves to the OCSF with their user IDs. In order to provide consistent access to
files these IDs must match on all nodes. In other words, all users and groups that we create must
have exactly same numerical IDs on different nodes. This part is easy for us, because we create
our IDs only once and all our other nodes will be produced by cloning (that does not alter IDs).
Create Groups
# id oracle
# passwd oracle
Verify That the User "nobody" exists (If you have installed the suggested Linux version you
may skip this check)
# id nobody
2. If the user nobody does not exist (English is an interesting language if you think of that), then
enter the following command to create it:
# useradd nobody
Let’s take a look at our internal disk on odbn1 machine, there are two ways to produce the report
(not all UNIX flavors support -H option):
So we have 33GB of space to work with, 2.7GB is occupied by Linux itself and its swap.
The next step is to create a new directory that will be used to store the Oracle Database software.
This location is later referred to by $ORACLE_BASE environment variable.
# mkdir -p /u01/app/oracle
The "-p" option tell the mkdir command to create the whole chain of directories at once.
After the directory is created, we specify the correct owner and group (why? because we work as
"root" user and newly created objects will have root’s properties):
# mkdir -p /u01/app/crs
# chown oracle:oinstall /u01/app/crs
# chmod 775 /u01/app/crs
# mkdir /u02
# chown oracle:oinstall /u02
# chmod 775 /u02
# su – oracle
Use some editor to create (or rather edit, since in OEL5 it is already there) the following profile:
export JAVA_HOME=/usr/local/java
# Each RAC node must have a unique ORACLE_SID. (i.e. racdb1, racdb2,...)
export ORACLE_SID=racdb1
export PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH=${PATH}:$ORACLE_BASE/common/oracle/bin
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS10=$ORACLE_HOME/nls/data
export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export THREADS_FLAG=native
export TEMP=/tmp
export TMPDIR=/tmp
Exit your "oracle" user session and now you are "root" again.
We will need at least 1GB of total memory (real + swap) to install Oracle Database 10g Release
2.
Here is how to check how much we’ve got (another way is to run the "top" command):
You can make changes to your kernel configuration as follows (copy and paste text from "cat" to
"EOF", do not include "#"):
kernel.shmmni = 4096
fs.file-max = 65536
EOF
Just in case I am listing the contents of /etc/sysctl.conf file after the changes:
kernel.shmmax = 4294967295
kernel.shmall = 268435456
kernel.shmmni = 4096
fs.file-max = 65536
net.core.rmem_default=1048576
net.core.rmem_max=1048576
net.core.wmem_default=262144
net.core.wmem_max=262144
Activate your changes with following command (or reboot the machine):
# sysctl -p
#/sbin/sysctl -a
Run following command to change limits for user "oracle" (while you are still logged in as
"root"):
EOF
EOF
Shell settings
C shell and its variants use /etc/csh.login profile (this one is loaded before local profile). Add
following lines to it:
endif
EOF
All other shells (such as Bourne, Korne and Bash) load /etc/profile, so it has to be amended like
this:
ulimit -p 16384
ulimit -n 65536
else
fi
umask 022
fi
EOF
The module "hangcheck-timer.ko" is already installed in OEL5 and this can be verified by this
command:
To test the module and its new setting run following commands:
# modprobe hangcheck-timer
Oracle installer will have a trouble if RAC nodes have different date and time showing by their
clocks. The easy way to fix this problem is to set up NTP client on our machine(s). I chose to use
Openfiler machine as a source of time, rather than pointing to external NTP server.
Use the "tail" command in one SSH window to verify that NTP setup is progressing properly
(leave this window and come back to it later).
# tail -f /var/log/messages
# cd /etc
# cp ntp.conf ntp.conf.bak
Edit the NTP settings file to include these lines (pointing to openfiler-priv network interface):
server 10.10.1.20
No other NTP servers should be specified in this file, except for the default line with 127.127.1.0
address (which is optional).
The output of the "tail" command in first window may look like this by now:
We can also use "ntpq" to verify the settings (or "ntpdc" utility with "peers" command):
# ntpq -p
If you look carefully at the IP addresses you will notice that "step time server" shows IP of the
"router", rather than that of the Openfiler. It is clarified when you ran "ntpq" command.
Although we used Openfiler’s IP in the configuration file the command shows proper server
name in the output.
As long as "st" column (Stratum) shows value other than 16 and "jitter" is reasonably small, all is
working properly. The result of this setup is that odbn1 has its clock synchronized with that of
the Openfiler.
net.core.rmem_default=1048576
net.core.rmem_max=1048576
net.core.wmem_default=262144
net.core.wmem_max=262144
If you are using Linux other than OEL5 U3 you may also need to add these lines:
kernel.shmmax = 4294967295
kernel.shmall = 268435456
kernel.shmmni = 4096
fs.file-max=65536
net.ipv4.ip_local_port_range=1024 65000
# sysctl -p
The OCFS2 software packages is supplied on CD #3 of the OEL5 U3 (but not installed by
default). Have disk #3 mounted (mount the image through the Virtual Box as you did before) and
issue following commands:
# cd /media/cdrom/Server
This library is also supplied on CD #3. Install and verify it by issuing the following commands:
# cd /
# eject
This one is not shipped along with CDs and will have to be downloaded. Get the oracleasmlib-
2.0.4-1.el5.i386.rpm from Oracle.
Have this rpm copied onto the guest by means of sftp into a new directory /root/rpms
# cd /root/rpms
Looks like we are done with most of the preparations that we can do on a single node before
cloning it.
3 Votes
Link back: This guide is a part of the Virtual Oracle RAC project, the index to the whole project
is here.
Shut down your virtual machines. You may keep Virtual Box GUI open. Open the command line
window. Type in the following commands (with a correction to your locations, use “oracle”
instead of “sun” if you have latest version of product):
cd /d G:\VBmachine
mkdir odbn2
VBoxManage clonehd G:\VBmachine\odbn1\odbn1.vdi G:\VBmachine\odbn2\odbn2.vdi
A few important moments here. The VBoxManage utility will report errors if source machine is
running, it will also report an error if you use relative path to the vdi file, only absolute path
works (at least that’s the case for release 3.1.2 of Virtual Box. Also, if you are tempted to use the
setvdiuuid tool I would advise against that as it may save you cloning time (5 min) but prove to
give some trouble later.
Next step is to add (or rather register) our newly cloned machine to the Virtual Box.
Bring up the Virtual Box GUI and click on “New” machine, fill out the details like this:
Click on “Add”, navigate to our new file (odbn2.vdi), add it and then “select” it:
Now we are back to the new machine dialog with cloned file available to be used. Click “Next”.
And “Finish”. Do not start this machine or you will ruin it.
What will happen if we run this new machine right now? The Virtual Box knows nothing about
this machine’s hardware at the moment. All these settings are not cloned or copied over when we
clone vdi image. It may be quite different with VMWare but here the image is not self contained.
Hardware setup is separate and contained in an xml file in the same folder as the vdi file. If we
run the machine now with all the default settings from that file the Linux will run new hardware
setup process and overwrite our careful network setup. We need to edit the xml file to give our
new machine proper setup.
In a text editor (Textpad will do, any plain editor) open odbn1.xml and odbn2.xml files. Copy
and paste (overwrite) the whole network section from first to the second. This configuration
section is contained between tags <Network> and </Network>. Save the modified odbn2.xml file
but do not start the machine yet. Do not start odbn1 as well until instructed to do so.
Close the Virtual Box GUI (if it was open) and start it up again, then click on “Settings” for
“odbn2″ machine. Only now our new settings will be read and accepted. Navigate to Storage
section and remove Floppy controller as we have no need for it.
Notice: in newer versions of Virtual Box the default type of disk controller is SATA rather than
IDE. In such case ou will need to delete the SATA controller, attach an IDE controller and then
attach the image of the disk (the vdi file) to it.
Then go to System section and uncheck Floppy from the boot order:
Start the openfiler machine now. When we start odbn2 we would like to see if it can
communicate to openfiler.
Now we can start the odbn2 machine (it is just a precise clone of odbn1 for now). Notice that all
network interfaces are started properly, that means MAC addresses in the hardware (network)
section matched those in the Linux itself, otherwise they would not start. The iSCSI seems to be
working as well.
Now let’s convince odbn1 clone that it is odbn2 (plastic surgery of sorts).
# cd /etc/sysconfig/network-scripts/
# vi ifcfg-eth0
# vi ifcfg-eth1
# cd /etc/sysconfig
# vi network
Change odbn1 to odbn2 in the HOSTNAME:
# reboot
Watch the machine messages in the GUI. On the startup the cloned machine will notice its new
name:
Let’s see if openfiler is visible to the new server and can properly map the iSCSI targets.
While we are at it, let’s also change the ORACLE_SID in the oracle’s profile to “racdb2″.
# su – oracle
# vi .bash_profile
I would now take a backup of the whole farm (i.e. three virtual machines) by shutting them down
and copying all vdi and xml files someplace else. Include also an xml file from
That file is essential for the backup and restore of Virtual Box setup.
Virtual Oracle RAC. Task 9: Preparing Linux guest for Oracle installation –
part 2
2 Votes
Link back: This guide is a part of the Virtual Oracle RAC project, the index to the whole project
is here.
Oracle Clusterware and the Oracle Database software are installed from one node in a RAC
cluster. Files are copied by Oracle Installer (OI) to other nodes using ssh and scp commands and
OI expects "user equivalence" to be setup on all nodes. This means UNIX id used for installation
("oracle" user in our case) is trusted on all nodes and ssh/scp commands won’t ask for password.
We are going to set up this equivalency.
# su – oracle
Create the .ssh directory in the oracle user’s home directory (on both nodes):
$ rm -R ~/.ssh
$ mkdir ~/.ssh
$ chmod 700 ~/.ssh
Generate an RSA key pair (public and private key) for the SSH protocol. When prompted: accept
the default location for the key files, enter and confirm a pass phrase (make up something, it may
or may not be same on all nodes, write it down, you will need it later). Do it on both nodes.
$ /usr/bin/ssh-keygen -t rsa
The results so far will look like this (first node), the arrows indicating your input:
and second node:
Create "authorized_keys" file on first node only. This "authorized_keys" file is a collection of
RSA public keys from all nodes in cluster. When all keys are collected this file will be copied to
other nodes.
Notice: yes, you are connecting with SSH from odbn1 to odbn1, this is done in order to produce
additional SSH configuration file "known_hosts" and properly add contents of "id_rsa.pub" to
"authorized_keys". Keep the RSA passphrase and oracle’s password handy, red arrows denote
your input:
Still from the same host odbn1 issue this command:
What has been done just now? We have connected to odbn2 and appended the contents of its
"id_rsa.pub" file to the "authorized_keys" file on odbn1. This looks like that so far:
Examine your "authorized_keys" file on odbn1, you will see it includes keys from both nodes.
Now copy this file to the other node (you are still being asked for oracle’s password):
The ssh-agent is a process that will supply the passphrase to new SSH processes in this session.
When we restart the nodes later (or leave this session) the two commands (ssh-agent and ssh-
add) are to be re-run.
Try running same ssh commands as before and you will see no prompts whatsoever (when
running from from odbn1, that is):
Test connection on private and public interfaces as well (this is needed later by Oracle Installer):
$ ssh odbn1-priv
$ ssh odbn1-pub
Well, at this point we have configured the SSH to satisfy the Oracle Installer (we hope).
Virtual Oracle RAC. Task 10: Oracle installation in RAC nodes – part 1
1 Votes
Link back: This guide is a part of the Virtual Oracle RAC project, the index to the whole project
is here.
As mentioned before, now comes the time to increase the virtual machines memory to 1024MB.
Take this chance to run a backup of the whole project while guests are shut down, then change
Base Memory settings on both nodes. Start all the machines again.
Getting an X Server running on the PC
There are few small things to take care of before we launch Oracle Installer. Namely, we need an
X Server on our PC. This can be any server of your choosing, such as Cygwin/X, Xming or
other. I will be using Cygwin/X here. Make sure your X Server includes xhost utility, sometimes
it is not installed by default. This is how to locate the xhost utility during instalation:
Have your X Server installed and started on your PC. If using Cygwin, run in CMD window (or
via an icon):
C:\bin\cygwin2\bin\run.exe /usr/bin/bash.exe -l -c /usr/bin/startxwin.exe
This will usually start X server on display 0.0 and bring up an xterm window. If xterm window
did not appear have it started manually. In this xterm window give an access control command:
$ xhost +10.10.1.11
$ xhost +10.10.1.12
This xhost command has enabled the obdn1 host to use your X Server to display x clients. I think
I have just saved you a few days of frustration. The access control matters of X Server are not
covered clearly in documentation and articles would suggest using X11 forwarding in SSH. The
X11 forwarding in SSH will indeed take care of all the neccessary settings automaticatlly,
however this setup won’t be usable by Oracle Installer. Therefore you should check that the SSH
sessions you run from your PC to the RAC nodes are not using the X11 forwarding.
So, if you are using PuTTY make sure the X11 forwarding is not selected for the RAC node
sessions:
As user "oracle", from the odbn1 node, from that same SSH session you have enabled SSH no-
password connections (go back to refresh your memory). Ff you have restarted servers or logged
in again in SSH you will need to repeat steps with ssh-agent and ssh-add as described before (on
odbn1 only).
$ export DISPLAY=10.10.1.1:0
Test that your session can run some X windows application and show it on your PC’s X Server:
$ xclock &
This should spawn an xclock application and show it on your PC via X Server. If this did not
work you will have to troubleshoot your setup and proceed with Oracle installation only when
resolved.
Notice: The IP address we supplied in DISPLAY variable is the virtual "router" on our host PC,
since X Server expect connection from 10.10.1.11, we should "talk" to it on the same network.
Configure OCFS2
Notice: OCFS2 package (RPM) installation instructions are in Task 7 , go back if you missed
them. If you already cloned the node then do this step on both nodes.
10.10.1.11 odbn1-priv
10.10.1.12 odbn2-priv
Notice, that although we will be using the private network IP addresses we will still use
hostnames as they appear on public network. I know, it is confusing. There would not be such a
confusion with just one network (either private or public).
As user "root", on the odbn1 node, start a new SSH session and set the DISPLAY varaible:
# export DISPLAY=10.10.1.1:0
# ocfs2console &
Select [ Cluster ] – [ Configure Nodes ]. This will start the OCFS2 Cluster Stack and bring up
next dialog ("Node Configuration")
There will be a pop-up message:
Dismiss it and proceed to "Node Configuration". Add two RAC nodes as below:
When you click "Apply" the screen changes to node status and node numbers:
Exit the console and repeat the same process on the other node of the cluster supplying same
exact data in the same order.
The /etc/ocfs2/cluster.conf file will look like this after configuration is done (do not just copy
this file over to other node):
O2CB Cluster Service
O2CB is the OCFS2′s cluster stack of services that are listed below:
NM: Node Manager that keep track of all the nodes in the cluster.conf
HB: Heart beat service that issues up/down notifications when nodes join or leave the
cluster
TCP: Handles communication between the nodes
DLM: Distributed lock manager that keeps track of all locks, its owners and status
CONFIGFS: User space driven configuration file system mounted at /config
DLMFS: User space interface to the kernel space DLM
All of the listed services are included in the single service o2cb (/etc/init.d/o2cb).
Now issue following commands to have O2CB start on boot up and have other needed attributes
(on both nodes):
# /etc/init.d/o2cb status
Make sure that o2cb serivce will be started at proper run level:
Now mount the newly formatted partition (that was labeled "oracrsfiles") under directory /u02:
Repeat the mount command on the other node. Verify that the file system is mounted correctly:
# mount
Repeat verification on the other node. Your output should be similar to the one below (newly
mounted file system is highlighted):
Make these changes permanent by adding the following line to the /etc/fstab file on both RAC
nodes:
Adjust ownership and permissions on the new filesystem (from one node only):
Create directories to contain Oracle Clusterware shared files (also from one node only):
# mkdir -p /u02/oradata/racdb
# chown -R oracle:oinstall /u02/oradata
# chmod -R 775 /u02/oradata
Reboot both nodes. Check if our setup can survive the reboot. Use "mount" command to see if
the new file system is still there and is mounted in the proper place. You can also use o2cb status
check to make sure the serive is functioning properly (from both nodes):
# /etc/init.d/o2cb status
Notice: ASMLib package (RPM) was added in Task 7 , go back if you missed this step. If you
have already cloned the node then do this step on both nodes.
# /etc/init.d/oracleasm configure
We are creating the ASM disks from one node only. Run following commands:
The commands above have created ASM disks in iSCSI targets that are mapped to local devices:
# /etc/init.d/oracleasm listdisks
On the other node we only need to do a scandisk to recognize the new volumes and then list
them:
# /etc/init.d/oracleasm scandisks
# /etc/init.d/oracleasm listdisks
copy the archives (with sftp) onto odbn1 node as user "oracle", into some directory
unzip the archives and re-pack them into an ISO image, then mount the image in VB
guest
I will be using the second option as not to inflate the file system of the virtual machine (after all,
it is a one time install).
So, have the archives unzipped into separate directories on your PC, then use a utility such as
Infra Recorder to pack the software into a DVD ISO image, just like in the picture below:
Name this image "rac32media.iso":
Add newly created image to Virtual Media Manager and then mount it in both VB machines.
Then mount it in the nodes like this:
This package is needed later by Cluster Verification Utility (CVU). Issue the following
commands (do it on both nodes):
# cd /media/cdrom/10201_clusterware_linux32/clusterware/rpm
# export CVUQDISK_GRP=oinstall
# rpm -iv cvuqdisk-1.0.1-1.rpm
# ls -l /usr/sbin/cvuqdisk
This utility will be run from odbn1 node as user "oracle". The SSH agent will have to be initiated
(again) for this purpose.
Open another SSH session (we may want to use our "root" session later) and login as "oracle",
then execute following commands:
$ exec /usr/bin/ssh-agent $SHELL
$ /usr/bin/ssh-add
Once all prerequisites for running the CVU utility have been met, we can now check that all pre-
installation tasks for Oracle Clusterware are completed by executing the following command as
the "oracle" UNIX user account from linux1:
$ mkdir -p /home/oracle/bin/cluvfy
$ cd /home/oracle/bin/cluvfy
$ cp /media/cdrom/10201_clusterware_linux32/clusterware/cluvfy/* .
$ mkdir -p jdk14
$ unzip jrepack.zip -d jdk14
$ export CV_HOME=/home/oracle/bin/cluvfy
$ export CV_JDKHOME=/home/oracle/bin/cluvfy/jdk14
Review the CVU report (cvu_report_pre.txt). There are several errors like "Check: Package
existence" that can be ignored.
There is a messages in connectivity section reading "Could not find a suitable set of interfaces
for VIPs". This one can be ignored too, as it is caused by a known bug documented in Metalink
Note 338924.1 (has to do with non routable ranges of IP addresses).
If you get any errors other than those in my report there might be a problem with your setup.
Connectivity errors must be resolved. For reference and troublesooting see Metalink ID
338924.1 and Forum
The utility checks connectivity again and then checks storage, proper report will look like this:
When reports are ok and all serious problems have been resolved we can move on.
The two shared files (file groups) used by Oracle Clusterware will be stored on the Oracle
Cluster File System (OFCS2) we created earlier. The two shared Oracle Clusterware file groups
are:
File 1 : /u02/oradata/racdb/OCRFile
File 2 : /u02/oradata/racdb/OCRFile_mirror
Size : (2 * 100MB) = 200M
CRS Voting Disk
File 1 : /u02/oradata/racdb/CSSFile
File 2 : /u02/oradata/racdb/CSSFile_mirror1
File 3 : /u02/oradata/racdb/CSSFile_mirror2
Size : (3 * 20MB) = 60MB
$ cd ~
$ /media/cdrom/10201_clusterware_linux32/clusterware/runInstaller -ignoreSysPrereqs &
The Oracle Installer will appear, click "Next" as in the picture below:
Supply following OCR locations in the next screen (leave Normal Redundancy selected):
Click Next:
Supply following locations of voting disks in the next screen (again, leave Normal Redundancy
selected):
Click Next:
Summary screen appears. Click Install:
Notice how, as the install progresses, the software is being copied over to the other node in the
cluster
Notice: Sometimes one of the virtual machines may crash on memory related errors (running out
of usable memory on the host PC).
If this happens on odbn2 it is safe to reboot it and wait till installer continues (say 5 minutes after
reboot).
Upon completion of the remote copy operations (ssh and tar processes) the next screen shows up:
And pop up screen shows:
Now pay attention closely.
Important: Do not close this Oracle Installer dialog until instructed to do so.
Important: run /u01/app/crs/root.sh script on odbn1 and wait until it completes, then proceed
with the same script on the odbn2.
Edit "/u01/app/crs/bin/vipca" file on both nodes adding the following statement after line 124:
unset LD_ASSUME_KERNEL
The snapshot below shows edited text with added "unset" command:
Next, edit "/u01/app/crs/bin/srvctl" file on both nodes adding same statement after line 167 so it
will look like this:
To take care of this problem in future, when more software is installed into new Oracle Homes or
patches applied to existsing software, the following files have to be re-edited:
<ORA_CRS_HOME>/bin/vipca
<ORA_CRS_HOME>/bin/srvctl
<RDBMS_HOME>/bin/srvctl
<ASM_HOME>/bin/srvctl
Since "vipca" utility failed, we will re-run it manually. Run vipca from odbn2 (still as root):
# export DISPLAY=10.10.1.1:0
# /u01/app/crs/bin/vipca
Notice: If you have received another cryptic message [Exception in thread "main"] this simply
means you forgot to set the DISPLAY variable.
Run following commands as root from odbn2 (notice that the IP addresses here are of the
networks, rather than specific adapters):
# /u01/app/crs/bin/oifcfg getif
# /u01/app/crs/bin/vipca
Now you can back to Clusterware installer dialog and dismiss the "Execute Configuration
scripts" dialogue.
# /u01/app/crs/bin/olsnodes -n
# /u01/app/crs/bin/crs_stat -t -v
# /u01/app/crs/bin/crsctl check crs
# ls -l /etc/init.d/init.*
Here are the results (one node shown, the other must show identical results):
Now we are ready to install Oracle database software.
Virtual Oracle RAC. Task 11: Oracle installation in RAC nodes – part 2
Rate This
Link back: This guide is a part of the Virtual Oracle RAC project, the index to the whole project
is here.
Now we are ready to install Oracle database software but before that we need to run the
verification utility again (database pre-installation requirements). Run these commands from
odbn1 as user oracle:
$ cd /home/oracle/bin/cluvfy
$ export CV_HOME=/home/oracle/bin/cluvfy
$ export CV_JDKHOME=/home/oracle/bin/cluvfy/jdk14
$ ./runcluvfy.sh stage -pre dbinst -n odbn1,odbn2 -r 10gR2 -verbose | tee cvu_report_3.txt
Review the report. There are some errors that are expected and can be ignored, in particular:
"Could not find a suitable set of interfaces for VIPs" and two errors with "Package existence
check failed for …"
The connectivity section looks like this (see below), it says "failed" but we can safely continue
with installation.
Oracle Database software installation
$ cd ~
$ /media/cdrom/10201_database_linux32/database/runInstaller &
A little cleanup needs to be done. This bug fix was mentioned before. Edit following file (on
both nodes):
$ vi $ORACLE_HOME/bin/srvctl
unset LD_ASSUME_KERNEL
$ netca &
Leave "No" for "configure another listener", proceed (this may take some time, screen appears
frozen):
Then confirmation screen appears, click "Next":
Hey, we’ve been here, right? Right, now click on "Finish":
and…
Virtual Oracle RAC. Task 12: Creating Oracle database in RAC nodes
Rate This
Link back: This guide is a part of the Virtual Oracle RAC project, the index to the whole project
is here.
$ dbca &
Promising signs…
When next screen appears click "Create New" disk group:
Fill out "Service Name" as racdb_taf (this is for Transparent Application Failover):
A little cleanup needs to be done (again). Edit the following file (on both nodes):
$ vi $ORACLE_HOME/bin/srvctl
unset LD_ASSUME_KERNEL
To make sure all registered RAC applications are running (as user "oracle" from any node):
$ $ORA_CRS_HOME/bin/crs_stat -t
See that there are two services displayed. If there is only one or none they can be added
manually:
$ export ORACLE_SID=racdb1
$ srvctl stop instance -d racdb -i racdb1
$ srvctl stop asm -n odbn1
$ srvctl stop nodeapps -n odbn1
$ export ORACLE_SID=racdb1
$ srvctl start nodeapps -n odbn1
$ srvctl start asm -n odbn1
$ srvctl start instance -d racdb -i racdb1
Virtual Oracle RAC. Task 13. Having some fun with RAC
1 Votes
Link back: This guide is a part of the Virtual Oracle RAC project, the index to the whole project
is here.
We could do a few more things to make the good work perfect, for instance we can enable
archive log mode in our RAC and set up backup with RMAN but this is already outside of the
scope of this little (I am kidding, it feels quite big to me) project.
What I really want to do now is to connect to the RAC database, run a long query and then kill
one of the nodes. Wondering if RAC will stand to its reputation.
RACDB_TAF =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.2.200)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.2.201)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = racdb_taf.harzion.org)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
In some cases you will need to add a following line to sqlnet.ora (to overcome possible ORA-
12170 error):
sqlnet.inbound_connect_timeout = 30
Run this "long" query that will keep the RAC occupied for a while:
The odbn1 node is coming back, OCFS loaded, then ASM follows
If you log in to the console and run the "top" command filtering user "oracle" (press "u" to
specify user), you will notice that for a minute or two there will be no processes for "oracle",
then they will start appearing.
and finally you will have plenty of them, just as on the other node:
If noting happens within 5 minutes though, then most probably you have skipped the step where
we edited "svrctl" script. Go back, edit and reboot again.
Now, just for fun, I will reboot the second node, odbn2. I do not have much hope that my query
will survive this too. It would be too good.
Sure enough, just as OCFS is going down, the query dies as well, although the first node is
running again:
Well, I consider this project concluded, thanks for your patience and comments.