Our latest toy at portrix systems is an oracle VM testing environment, consisting of three sun servers, a 7120 Storage an a lot of enthusiasm to explore this exciting technology as deeply as possible.
A few days ago I challenged myself to install a virtual two node cluster into this environment.
Luckily I did not have to perform the installation from scratch, because oracle offers some preconfigured templates to download and simply import into the OVM environment.
I was most interested in “Oracle Real Application Cluster (RAC) 11g R2” which you will find here.
Unfortunately the first steps of the documentation, though very detailed, did not work in every aspect. It seems to refer to an older release of Oracle VM Manager and some important parts of the descriptions worked a bit differently 3.0.3.
If somebody else maybe faced the same problem, the following description might help.
These have been the two most time consuming issues for me.
- Creating shared disks for ASM:
This wasn’t quite easy because the menu structure has changed in between the documentation and oracle VM 3.0.3. And since I had no experience at all with OVM, I had to do a bit of digging before I was able to achieve this part on my own. But once found, the disk creation itself is very simple.
On the left pane, you have to select “Server Pools“, then go to the “repositories” tab on the right, select your repository and finaly select the “Virtual Disk” tab on the bottom right of the page. When creating a new disk, you have to select the “shareable” option to make it work.
- Importing the template:
In VM Manager 3.0.3, oracle has changed the method of importing templates significantly. You can’t just copy the template into a local folder any more, but now have to distribute them using a local webserver. OVM needs a working http-link to import them. Luckily, our 7120 has the option to create shares via http.
But thats not the only problem. The downloaded template consists of two parts: disk one containing the image for the OS, and disk two containing the image for the clusterware files, which come in two separate zip files.
I had to unzip both files and got two tgz, as expected due to the manual. I extracted those as well and ended up with one directory. This directory had again to be packed as a whole, leaving me with one big tgz. And this was the template I finally was able to import in OVM.
> tar xzf OVM_OL5U6_X86_64_11202RAC_PVM-1of2.tgz > tar xzf OVM_OL5U6_X86_64_11202RAC_PVM-1of2.tgz > ls -la drwxr-xr-x 3 markus markus 4096 2012-01-25 12:55 OVM_OL5U6_X86_64_11202RAC_PVM -rw-r--r-- 1 markus markus 782798631 2011-06-24 13:44 OVM_OL5U6_X86_64_11202RAC_PVM-1of2.tgz -rw-r--r-- 1 markus markus 3515262120 2011-06-24 14:12 OVM_OL5U6_X86_64_11202RAC_PVM-2of2.tgz > tar -czvf OVM_OL5U6_X86_64_11202RAC_PVM.tgz OVM_OL5U6_X86_64_11202RAC_PVM > ls -la drwxr-xr-x 3 markus markus 4096 2012-01-25 12:55 OVM_OL5U6_X86_64_11202RAC_PVM -rw-r--r-- 1 markus markus 782798631 2011-06-24 13:44 OVM_OL5U6_X86_64_11202RAC_PVM-1of2.tgz -rw-r--r-- 1 markus markus 3515262120 2011-06-24 14:12 OVM_OL5U6_X86_64_11202RAC_PVM-2of2.tgz -rw-r--r-- 1 markus markus 4329463066 2012-01-25 14:07 OVM_OL5U6_X86_64_11202RAC_PVM.tgz
Afterwards I noticed, that you can also upload the tgz, without unpacking and packing them again. You just have to upload them both at the same time – I did not know that the first time.
Once done this, the rest was fairly straightforward and I just needed to follow the instrunctions from the documentation. I cloned the template two times, booted both machines, gave them IPs and names and then had a cup of tea for about half an hour.
The result is a working and completely configured two node cluster, perfectly suited for some database and clusterware testing. Only little downside is that this installation does not include a special grid-user. So both, clusterware and database are owned by the oracle user. But for a testing environment that’s okay.
My next task now would be to find as many ways as possible to destroy a virtual RAC-Cluster. I think, I might somehow be able to do that…