Home Oracle RAC 11g Database on Linux Using VirtualBox By Sergei Romanenko August - December, 2012 This article describes the installation of Oracle Database 11g release 2 (11.2 64-bit) RAC on Linux (Oracle Linux 6.3 64-bit) using VirtualBox (4.1.14+). See also: Oracle RAC 12c Database on Linux Using VirtualBox. Introduction System Requirements Download Software Virtual Machine Setup Guest Operating System Installation Check Internet Access Oracle Clusterware Installation Prerequisites. Part 1 Install Guest Additions Oracle Clusterware Installation Prerequisites. Part 2 Network Setup Downloaded Oracle Installation Files Clone the Virtual Machine Create Shared Disks Install the Grid Infrastructure Install the Database Check the Status of the RAC Making Images of the RAC Database Restoring RAC from Saved Files Post Installation Optimization Clusterware and Database Monitoring Introduction If you want to get through all steps of the Oracle RAC installation and your laptop or desktop computer has 8 GB or more of RAM, then this is entirely feasible using Oracle VirtualBox as demonstrated in this article. You can get a running RAC system which can host a small test database. The created system is not, and should not be considered, a production-ready system. It's simply to allow you to get used to installing and using RAC and test various administration procedures. The article also explains how to save the images and restore RAC from the images in a matter of minutes. Even if you break your test system, it will be easy to restore. This article uses the 64-bit versions of Oracle Linux, version 6.3, and Oracle 11g Release 2, version 11.2.0.3. Using VirtualBox you can run multiple Virtual Machines (VMs) on a single server, allowing you to run both RAC nodes on a single machine. In addition, it allows you to set up shared virtual disks. The finished system includes two guest operating systems, two sets of Oracle Grid Infrastructure (Clusterware + ASM) and two Database instances all on a single server. The amount of disk space needed is about 32 GB, if you want to save images of the finished RAC, another 12 GB of the disk space will be needed. This article was originally inspired by the article "Oracle Database 11g Release 2 RAC On Linux Using VirtualBox" written by Tim Hall and published in his blog. Then it was almost entirely revised and reworked, now this article seems to have very little resemblance with the original work. Note. When this article was written, Oracle Database 11g Release 2 (11.2.0.3) for Linux 64-bit (both clusterware and database) was available through the Oracle support to licensed customers only. As happened in the past, the Oracle corporation was making the latest version available to general public pretty soon. So I thought that using the latest and greatest version at the moment, with many bugs fixed, will be the best way to go. But now is end of 2012 and 11.2.0.3 is still unavailable to general public, while this version is really much better than any older version. I apologize for this inconvenience and suggest to find any possible way to get this version. It doesn't make sense to fight issues and research workarounds for bugs already fixed. Ask your lab128 210 people like lab128. Facebook social plugin Like Like Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html 1 of 84 12/9/2013 4:12 PM
84
Embed
Oracle RAC 11g Database on Linux Using VirtualBoxdocshare01.docshare.tips/files/21445/214459907.pdf · See also: Oracle RAC 12c Database on Linux Using VirtualBox . Introduction ...
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Home
Oracle RAC 11g Database on Linux
Using VirtualBox
By Sergei Romanenko
August - December, 2012
This article describes the installation of Oracle Database 11g release 2 (11.2 64-bit) RAC on Linux (Oracle Linux 6.3 64-bit)
using VirtualBox (4.1.14+).
See also: Oracle RAC 12c Database on Linux Using VirtualBox.
Introduction
System Requirements
Download Software
Virtual Machine Setup
Guest Operating System Installation
Check Internet Access
Oracle Clusterware Installation Prerequisites. Part 1
Install Guest Additions
Oracle Clusterware Installation Prerequisites. Part 2
Network Setup
Downloaded Oracle Installation Files
Clone the Virtual Machine
Create Shared Disks
Install the Grid Infrastructure
Install the Database
Check the Status of the RAC
Making Images of the RAC Database
Restoring RAC from Saved Files
Post Installation Optimization
Clusterware and Database Monitoring
Introduction
If you want to get through all steps of the Oracle RAC installation and your laptop or desktop computer has 8 GB or more of
RAM, then this is entirely feasible using Oracle VirtualBox as demonstrated in this article. You can get a running RAC system
which can host a small test database. The created system is not, and should not be considered, a production-ready system. It's
simply to allow you to get used to installing and using RAC and test various administration procedures. The article also explains
how to save the images and restore RAC from the images in a matter of minutes. Even if you break your test system, it will be
easy to restore.
This article uses the 64-bit versions of Oracle Linux, version 6.3, and Oracle 11g Release 2, version 11.2.0.3. Using VirtualBox
you can run multiple Virtual Machines (VMs) on a single server, allowing you to run both RAC nodes on a single machine. In
addition, it allows you to set up shared virtual disks. The finished system includes two guest operating systems, two sets of
Oracle Grid Infrastructure (Clusterware + ASM) and two Database instances all on a single server. The amount of disk space
needed is about 32 GB, if you want to save images of the finished RAC, another 12 GB of the disk space will be needed.
This article was originally inspired by the article "Oracle Database 11g Release 2 RAC On Linux Using VirtualBox" written by
Tim Hall and published in his blog. Then it was almost entirely revised and reworked, now this article seems to have very little
resemblance with the original work.
Note. When this article was written, Oracle Database 11g Release 2 (11.2.0.3) for Linux 64-bit (both clusterware and database)
was available through the Oracle support to licensed customers only. As happened in the past, the Oracle corporation was
making the latest version available to general public pretty soon. So I thought that using the latest and greatest version at the
moment, with many bugs fixed, will be the best way to go. But now is end of 2012 and 11.2.0.3 is still unavailable to general
public, while this version is really much better than any older version. I apologize for this inconvenience and suggest to find any
possible way to get this version. It doesn't make sense to fight issues and research workarounds for bugs already fixed. Ask your
lab128
210 people like lab128.
Facebook social plugin
LikeLike
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
1 of 84 12/9/2013 4:12 PM
friends who have access to Oracle support to help. And, if you can, bother the Oracle corporation to make the latest version
available for download.
As of now, 11.2.0.3 can be downloaded in Oracle support site, in "Patches & Updates", then select "Latest Patchsets", then select
"Oracle Database", then select "Linux x86-64", then select "11.2.0.3.0". The number of this patch set is 10404530, it is possible
to jump to the download page using this number. This patch set is a full installation of the Oracle Database software. This means
that you do not need to install Oracle Database 11g Release 2 (11.2.0.1) before installing Oracle Database 11g Release 2
(11.2.0.3). For installing RAC database you will need only 3 files:
Oracle Database (includes Oracle Database and Oracle RAC), part 1: p10404530_112030_Linux-x86-64_1of7.zip 1.3G Oracle Database (includes Oracle Database and Oracle RAC), part 2: p10404530_112030_Linux-x86-64_2of7.zip 1.1G Oracle Grid Infrastructure (includes Oracle ASM, Oracle Clusterware): p10404530_112030_Linux-x86-64_3of7.zip 933M
System Requirements
8 GB of RAM;
32 GB of free space on the hard disk;
This procedure was tested on 64-bit Windows 7. Although there should be no problems using VirtualBox on other Host
OSes. Please let me know if you had success or problems in other OSes;
Download Software
Download the following software.
Oracle Linux;
VirtualBox (Must be version 4.1.14 or later);
Oracle 11g Release 2 (11.2) Software (64 bit). Please read the note about Oracle version in the Introduction section above.
Virtual Machine Setup
In this exercise, we are using VirtualBox installed on 64-bit Windows 7.
Now we must define the two virtual RAC nodes. We can save time by defining one VM, then cloning it when it is installed.
Start VirtualBox and click the "New" button on the toolbar. Click the "Next" button on the first page of the Virtual Machine
Wizard.
Enter the name "rac1", OS "Linux" and Version "Oracle (64 bit)", and then click the "Next" button:
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
2 of 84 12/9/2013 4:12 PM
If you have 16 GB of RAM in your host system, then set Base Memory to 3072 MB, otherwise use 2048 MB, as in the
screenshot below, then click the "Next" button:
Accept the default option to create a new virtual hard disk by clicking the "Next" button:
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
3 of 84 12/9/2013 4:12 PM
Accept the default VDI type and click the "Next" button on the Virtual Disk Creation Wizard welcome screen:
Accept the default "Dynamically allocated" option by clicking the "Next" button:
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
4 of 84 12/9/2013 4:12 PM
Accept the default location and set the size to "16G" and click the "Next" button:
Press the "Create" button on the Create New Virtual Disk Summary screen:
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
5 of 84 12/9/2013 4:12 PM
Press the "Create" button on the Create New Virtual Machine Summary screen:
The "rac1" VM will appear on the left hand pane. Click on the "Network" link on the right side:
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
6 of 84 12/9/2013 4:12 PM
Make sure "Adapter 1" is enabled, attached to "Internal Network" or "Host-only Adapter". This inetrface will be used for public
network, for example, for connection to the RAC datbase from other applications. More about networking will be explained
later. On the screenshot below "Internal Network" is selected and name "pubnet" was given to this network:
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
7 of 84 12/9/2013 4:12 PM
Then click on the "Adapter 2" tab. Make sure "Adapter 2" is enabled and attach to "Internal Network". Name this network
"privnet":
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
8 of 84 12/9/2013 4:12 PM
Then finally click on the "Adapter 3", enable it, and attach to "Bridged Adapter" or "NAT". This adapter will be used for internet.
Then press "OK" button:
Optionally, you can disable the audio card using "Audio" link. This will probably save some amount of space and avoid potential
problems related to audio settings. Also if your system has 4 CPU cores or more, it will make sense to allocate 2 CPUs to the
Virtual Machine. You can do that in "System" settings.
The virtual machine is now configured so we can start the guest operating system installation.
Guest Operating System Installation
Please note that during installation Virtual Box will be keeping the mouse pointer inside VM area. To exit, press Right Control
key on the keyboard.
Place the Oracle Linux 6.3 (or newer) DVD in the DVD drive and skip next two screenshots. If you don't have DVD, download
the .iso image and place it into the virtual DVD. Select "Storage" link on the right hand pane of the VirtualBox Manager screen
to open "Storage" screen. Then select DVD drive in the "Storage Tree" section:
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
9 of 84 12/9/2013 4:12 PM
In "Attributes" section click on the DVD disk icon and choose DVD .iso file. Note that name of the file shows in the Storage
Tree. Then press 'OK":
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
10 of 84 12/9/2013 4:12 PM
Start the virtual machine by clicking the "Start" button on the toolbar. The resulting console window will contain the Oracle
Linux boot screen. Proceed with the "Install or upgrade an existing system":
Do not perform the media test. Choose "Skip" button:
Start the virtual machine by clicking the "Start" button on the toolbar. The resulting console window will contain the Oracle
Linux boot screen.
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
11 of 84 12/9/2013 4:12 PM
Continue through the Oracle Linux installation as you would for a normal server. On next three screens select Language,
Keyboard, and Basic Storage Devices type. Confirm to discard any data.
Set "Hostname" to rac1.localdomain and press "Configure Network":
In the Network Connections screen select "System eth0" interface, which will be used for public network, and press "Edit":
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
12 of 84 12/9/2013 4:12 PM
Make sure that "Connect automatically" is checked. In "IPv6 Settings" tab make sure the Method is set to "Ignore". Select "IPv4
Settings" tab; change Method to "Manual"; Press "Add" and fill Address: 192.168.56.71; Netmask: 255.255.255.0; Gateway:
0.0.0.0. Press "Apply" then done:
In the Network Connections screen select "System eth1" interface, this will be used for private network, then press "Edit". Then
check the box "Connect automatically". In "IPv6 Settings" tab make sure the Method is set to "Ignore". Select "IPv4 Settings"
tab; change Method to "Manual". Press "Add" and fill Address: 192.168.10.1; Netmask: 255.255.255.0; Gateway: 0.0.0.0. When
done, press "Apply":
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
13 of 84 12/9/2013 4:12 PM
Finally select "System eth2" interface, this will be used for Internet, then press "Edit". Check the box "Connect automatically".
Select "IPv4 Settings" tab make sure the Method is set to "Automatic (DHCP)". In "IPv6 Settings" tab make sure the Method is
set to "Ignore". Press "Apply" button:
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
14 of 84 12/9/2013 4:12 PM
Close Network Connections screen and proceed to next setup screen. Select time zone; Type in Root Password: oracle;
Select "Use All Space" type of installation and check "Review and modify partitioning layout":
Edit size of lv_swap device to 1500 MB; then edit size of lv_root to 14380 MB. Press "Next":
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
15 of 84 12/9/2013 4:12 PM
Confirm through warnings and create partitions. Keep defaults in Boot loader screen.
In the software type installation screen select "Database Server" and check "Customize now" button. Press Next:
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
16 of 84 12/9/2013 4:12 PM
In the Customization screen select Database and uncheck all items; select Desktops and check "Desktop" and "Graphical
Administration Tools"; then press Next and finish installation. Reboot.
When it comes back, there will be more setup screens obvious to handle. Don't create 'oracle' account, this will be done later.
Congratulations! The Linux has been installed.
Check Internet Access
We will need Internet access because additional packages will be installed online. Open terminal and try to ping any Internet site,
for example:
ping yahoo.com
If ping doesn't work, troubleshoot the problem using 'ifconfig' command and making changes in Network Connections (Linux
desktop Main menu | System | Preferences | Network Connections). If you made changes in Network Connections, restart
interface by rebooting VM or running these two commands:
# ifdown eth0# ifup eth0
Then check the ping again.
Oracle Clusterware Installation Prerequisites. Part 1
All actions in this section must be performed by the root user.
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
17 of 84 12/9/2013 4:12 PM
Run Automatic Setup by installing 'oracle-rdbms-server-11gR2-preinstall' package. This package performs prerequisites
including kernel parameter change and creation of Linux oracle account:
Configure ASMLib running this command and answering questions:
# oracleasm configure -iConfiguring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM librarydriver. The following questions will determine whether the driver isloaded on boot and what permissions it will have. The current valueswill be shown in brackets ('[]'). Hitting <ENTER> without typing ananswer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracleDefault group to own the driver interface []: oinstallStart Oracle ASM library driver on boot (y/n) [n]: yScan for Oracle ASM disks on boot (y/n) [y]: Writing Oracle ASM library driver configuration: done#
Install Guest Additions
Guest Additions are optional, but highly recommended. Guest Additions allow better integration of mouse support and clipboard
bidirectional copying. Another important feature is support of shared folders making files in Host OS visible to Guest. The
remaining of this document assumes that Guest Additions are installed.
In order to install Guest Additions, reboot just created VM, login as root. Then in the window menu select Devices | Install Guest
Additions. Go through the download until you see DVD Autorun screen:
Press "OK", then "Run" to start installation.
Note. The installation can fail complaining on missing kernel-uek-devel package providing a 'yum' command to install this
package. Run this command - that's why we need Internet access. Also install another package: 'yum install gcc'. Then reinstall
Guest Additions by double-clicking on VBOXADDITIONS DVD icon on the desktop, and clicking "Open Autorun Prompt"
button.
Reboot the machine. Now you should be much happier about the VirtualBox!
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
18 of 84 12/9/2013 4:12 PM
Oracle Clusterware Installation Prerequisites. Part 2
Create the directory in which the Oracle software will be installed.
Add oracle account to dba and vboxsf groups. The vboxsf group was created by VirtualBox Guest Additions and will allow
oracle user access folders in the Host OS:
# usermod -G dba,vboxsf oracle
Reset oracle user password to oracle:
# passwd oracleChanging password for user oracle.New password: BAD PASSWORD: it is based on a dictionary wordBAD PASSWORD: is too simpleRetype new password: passwd: all authentication tokens updated successfully.#
Disable secure linux by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.
SELINUX=disabled
Either configure NTP, or make sure it is not configured so the Oracle Cluster Time Synchronization Service (ctssd) can
synchronize the times of the RAC nodes. In this case we will deconfigure NTP.
# service ntpd stopShutting down ntpd: [FAILED]# chkconfig ntpd off# mv /etc/ntp.conf /etc/ntp.conf.orig# rm /var/run/ntpd.pid
Shutdown VM. In VirtualBox Manager click on "Shared Folders" link in the right-hand pane. Add shared folder by pressing
"plus" icon. Then select path to the location of oracle software, and check both boxes "Read-only" and "Auto-mount":
Note You can use any name in "Folder Name". If you have oracle installation files at different location, you can overwrite that
name to "oracle_sw". This will make easier to follow steps below.
Press "OK" to save this setting. Now Shared Folders should look like this:
Restart VM and login as oracle user. Change directory to "/media/sf_oracle_sw" - this is where VirtualBox maps Host OS shared
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
21 of 84 12/9/2013 4:12 PM
folder. Note that VirtualBox added prefix "sf_" to the name of the folder. List 'ls' content of the folder:
$ cd /media/sf_oracle_sw$ lsdatabase grid$
There is one package 'cvuqdisk' that should be installed before the installation. Install it from the Oracle grid/rpm directory as
root user:
$ su rootPassword: # cd /media/sf_oracle_sw/grid/rpm# rpm -Uvh cvuqdisk*
Clone the Virtual Machine
Shutdown the VM.
In the VirtualBox Manager, in Network settings for the Adapter 1, change the network type it is attached to from the "Bridged
Adapter" to the "Host-only Adapter".
Note. If you don't need access to the RAC database from the Host OS, then you can use "Internal Network" type of adapter. The
RAC will be accessible from all other Virtual Machines in both cases. Optionally, if you need Internet access in future, this can
be added after RAC is installed, see Adding Internet Access. For more details about type of Network adapters, see "Virtual
Networking" chapter in the VirtualBox documentation.
In the VirtualBox Manager window start clone wizard: Main menu | Machine | Clone. Type "rac2" for the name of new machine.
Make sure that "Reinitialize the MAC address of all network cards" is not checked. Then press "Next":
Keep default "Full Clone" option selected and press "Clone":
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
22 of 84 12/9/2013 4:12 PM
Start cloned VM rac2 and login as root user. Then change hostname by editing file "/etc/sysconfig/network", HOSTNAME
parameter:
HOSTNAME=rac2.localdomain
Start "Network Connections" tool (Main menu | System | Preferences | Network Connections). Edit eth0 and eth1 interfaces and
set in IPv4 addresses 192.168.56.72 and 192.168.10.2 correspondingly.
Reboot system.
Now we need to change MAC address for all three interfaces. At the moment we have two VMs with the same set of MAC
addresses. We can run one machine or another, but not both of them at the same time because MAC address must be unique. No
changes will be made to rac1, we will pick up three new unused addresses and set them for eth0, eth1, and eth2 in rac2. The
easiest way to do that is to change just last two characters of the address. We are going to change them to '00'. If the last two
characters are already '00', then change to something else, '01', for example. Just make sure that these addresses don't collide with
the MAC addresses of rac1. In running rac2 node, open "Network Connections" and edit MAC address in the "Wired" tab. The
screenshot below shows where to set MAC address. Don't forget to change MAC addresses for all three interfaces. Please note
that your setup will have a different set of MAC addresses because they are random-generated by VirtualBox.
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
23 of 84 12/9/2013 4:12 PM
Write down the new MAC addresses for all three interfaces. Save new settings pressing "Apply" button, then shutdown the
machine. After shutdown, return to the VirtualBox Manager, select rac2 VM and edit "Network" settings. Make same changes to
the MAC addresses. Don't forget to change MAC addresses for all three adapters.
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
24 of 84 12/9/2013 4:12 PM
Start both machines and check that they can ping each other using both public and private network. For example, on rac1:
$ ping rac2$ ping rac2-priv
If you have problems, use 'ifconfig' command to check the configuration, then correct the problem using "Network Connections"
tool.
Create Shared Disks
Shut down both virtual machines. We need to create a new virtual disk, change its attribute to Shareable and add to both VMs. In
the current version of VirtualBox, the only way to create a new disk in the GUI is through the "Storage" page in the virtual
machine's settings. Select either rac1 or rac2 VM, then click on "Storage" link. Select "SATA Controller" and click on "Add Hard
Disk" icon. If not sure, which icon to use, same action is available through the popup menu, right-click on the "SATA Controller"
and select "Add Hard Disk".
Press "Create new disk":
Accept the default VDI type and click the "Next" button on the Virtual Disk Creation Wizard welcome screen:
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
25 of 84 12/9/2013 4:12 PM
Select "Fixed size" option and press the "Next" button:
Change the name and location of this disk. You can keep this file in the default location - the folder of a selected VM. Although,
because this disk is shared, it will be better to put it in the parent directory. So, instead of "...\VirtualBox VMs\rac1"
directory, place it in "...\VirtualBox VMs". Set the size to "2400 MB" - this will result in about of 400 MB of free space
in the ASM group when everything is installed. If you will need more space, you can choose the bigger size. And, regardless of
what you decide now, it will be possible to add more shared disks to the ASM group after everything is installed.
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
26 of 84 12/9/2013 4:12 PM
Create the new disk and this disk will be already attached to VM.
Select this new disk. You will see in the disk Information that the type of this disk is "Normal". There was no option in the
previous dialog windows to create new disk as "Shareable". And once it is attached, this attribute cannot be changed. This is a
limitation of GUI so we have to work around it: click on "Remove Attachment" icon. Therefore this VM returns back to the
previous storage configuration. Close the "Storage" page.
What is different now - there is a new disk registered to VirtualBox. We will use Virtual Media Manager (Main menu | File |
Virtual Media Manager) to change its attributes. Select this new disk in the Virtual Media Manager:
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
27 of 84 12/9/2013 4:12 PM
Click on "Modify" icon and select "Shareable":
Attach this existing disk to each VM using "Storage" page. Don't forget to select correct controller before attaching the disk and
use "Choose existing disk" option.
In the end the "Storage" section of both VMs should be looking like this:
Start either of the machines and log in as root. The current disks can be seen by issuing the following commands.
# ls /dev/sd*/dev/sda /dev/sda1 /dev/sda2 /dev/sdb#
Use the "fdisk" command to partition the new disk "sdb".
# fdisk /dev/sdbDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel with disk identifier 0xd724aa83.Changes will remain in memory only, until you decide to write them.After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u').
Command (m for help): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 1First cylinder (1-305, default 1): Using default value 1Last cylinder, +cylinders or +size{K,M,G} (1-305, default 305): Using default value 305
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
28 of 84 12/9/2013 4:12 PM
Command (m for help): wThe partition table has been altered!
Calling ioctl() to re-read partition table.Syncing disks.#
The sequence of answers is "n", "p", "1", "Return", "Return" and "w".
Once the new disk is partitioned, the result can be seen by repeating the previous "ls" command.
# ls /dev/sd*/dev/sda /dev/sda1 /dev/sda2 /dev/sdb /dev/sdb1#
Mark the new shared disk in the ASMLib as follows.
# oracleasm createdisk DISK1 /dev/sdb1Writing disk header: doneInstantiating disk: done#
Run the "scandisks" command to refresh the ASMLib disk configuration.
# oracleasm scandisksReloading disk partitions: doneCleaning any stale ASM disks...Scanning system for ASM disks...#
We can see the disk is now visible to ASM using the "listdisks" command.
# oracleasm listdisksDISK1#
Start another VM and log in as root. Check that the shared disk is visible to ASM using the "listdisks" command.
# oracleasm listdisksDISK1#
The virtual machines and shared disks are now configured for the grid infrastructure!
Install the Grid Infrastructure
Make sure the "rac1" and "rac2" virtual machines are started, then login to "rac1" or switch the user to oracle and start the Oracle
When running root.sh you will be asked about location of bin directory, press Enter in response. The output of the root.sh should
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html
47 of 84 12/9/2013 4:12 PM
finish with "Configure Oracle Grid Infrastructure for a Cluster ... succeeded". If the script fails, correct the problem and restart it.
Once the scripts have completed, return to the "Execute Configuration Scripts" screen on "rac1", click the "OK" button and wait
for the configuration assistants to complete.
We expect the verification phase to fail with an error relating to the SCAN:
Here are the offending lines from the log file:
INFO: Checking Single Client Access Name (SCAN)...INFO: Checking TCP connectivity to SCAN Listeners...INFO: TCP connectivity to SCAN Listeners exists on all cluster nodesINFO: Checking name resolution setup for "rac-scan.localdomain"...INFO: ERROR: INFO: PRVG-1101 : SCAN name "rac-scan.localdomain" failed to resolveINFO: ERROR: INFO: PRVF-4657 : Name resolution setup check for "rac-scan.localdomain" (IP address:INFO: ERROR: INFO: PRVF-4657 : Name resolution setup check for "rac-scan.localdomain" (IP address:INFO: ERROR: INFO: PRVF-4657 : Name resolution setup check for "rac-scan.localdomain" (IP address:INFO: ERROR: INFO: PRVF-4664 : Found inconsistent name resolution entries for SCAN name "rac-scan.INFO: Verification of SCAN VIP and Listener setup failed
Provided this is the only error, it is safe to ignore this and continue by clicking the "Next" button. Close the Configuration
Assistant on the next screen.
Check the status of running clusterware. On rac1 as root user:
# . oraenvORACLE_SID = [oracle] ? +ASM1The Oracle base has been set to /u01/app/oracle
Oracle RAC 11g Database on Linux Using VirtualBox http://www.lab128.com/rac_installation_using_vb/article_text.html