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?).
I am going to install Openfiler 2.3 (x86) in Virtual Box.
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.
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.
Follow the generic installation guide for Openfiler here http://www.openfiler.com/learn/how-to/graphical-installation.
When network cards detected during installation, assign IP addresses shown below in Openfiler section at the bottom:
|# Notice that loopback address do not have a real host name in it
127.0.0.1 localhost.localdomain localhost# eth0
# Database nodes – Public Network
10.10.2.11 odbn1.harzion.org odbn1
10.10.2.12 odbn2.harzion.org odbn2
# Database nodes – Public Virtual IP (VIP) addresses
# Openfiler eth0 – public
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).
For the further setup of iSCSI targets please refer to the Next chapter.