ORACLENERD twitter/oraclenerd view chet justice's profile on LinkedIn feed oraclenerd t-shirts Unemployment Clock:

  VirtualBox: Add Second HDD
Two weeks ago I found a 1 TB external drive for $100, couldn't pass it up. Space was the biggest obstacle in following along in John's EBS series (part IV coming soon).

I had purchased a "small" 320 GB HDD about a month ago, but that effort proved futile because I started to save everything off to that after I upgraded to Karmic Koala and received this lovely message:



Finally, I could install EBS without worrying about space...I created a Dynamically Expanding HDD of 300 GB. I then installed Oracle Enterprise Linux (OEL) 5, Update 4 and loaded as many of the known libraries that I could. Then I began downloaded and unzipping all of the required files. I was doing this in parallel, download the file, unzip, remove the zip file. After about 8 total hours, it was done. The VDI had grown to 68.5 GB.

I then ran the rapidwiz.sh script, navigated through the screens until I got through to the system check. It complained I didn't have enough disk space to install. Of course not...there was only 231.5 GB of space left.

Stupidity followed.

What were my options?

OK, I could extend that VDI to 350 GB...VirtualBox doesn't allow that yet.

But for some reason I couldn't just keep that dynamically expanding VDI, I had to shrink it. How?

zerofree

That would allow me to first zero out the unused space and then use VBoxManage compacthd to shrink it.

That required greater skills than I had though. First of all, you had to mount the root file system in read-only mode. I tried a bunch of different ways and could never get it to work. Looking back, it might be easy(er)...

I then decided to clone the VDI with VBoxManage clonehd thinking (and therein lies the problem) that would do the trick. 12 hours later, I had the cloned VDI. Added it to the Virtual Media Manager but it is just an exact copy of the other one (68.5 used, 300 GB total). Doh.

Enough of this. I'll just add a 350 HD as a Dynamically Expanding primary slave. So I did, booted up OEL and...where is it? Why can't I find it? I guess I have to mount it right?

Instead of researching first, I just start to muck around with the system. Really long story short, I thought it wise to edit /etc/fstab. Upon reboot, it broke. (Shocker)

Amusingly, the root file system was mounted as read-only so I could finally run zerofree.

OK, so I mucked up /etc/fstab, I can fix that right? Just replace my edits with the original...wait, it's a read-only file system.

Twitter to the rescue for the umpteenth time.

Twitter Question from ORACLENERD

Some back and forth with @brad_tumy before finally going to IM.

He pointed me to this link and this command
mount -w -o remount /
Worked! I could now edit the file and get my system back up and running.

"Um, Brad, while I have you..."
Do you know how to add a second HDD using VirtualBox? (Yes, I'm really sneaky).

He then pointed me to this link written by the esteemed Mr. Topper. It was kind of hard for me to believe at first, I am not sure I have read a "live" post by Mr. Topper in quite some time. Ah yes, the last post was June 5, 2008.

Brad: "Check out step 12, that's where you should start."

OK, step 12, Create the Partition. This is a VMWare guide, but the concepts are the same. I'm really not sure, but I opened up the Logical Volume Manager (LVM)

Opening the Logical Volume Manager

Which opened up this. What's this "Uninitialized Entities" section? I haven't seen that before.



I think I'll click on it.

That looks like my second HDD. Initialize Entity? Sure, why not?

LVM - Initialize Entity

Are you sure you want to initialize this entity? Everything on there will be lost!

LVM - Are you sure?

Do you want to create a single partition? Are you sure about that?

LVM - Single partition?  Positive?

OK, that's done. Now it appears iin the Unallocated Volumes section. Let's create a new Volume Group.

LVM - Create new Volume Group

I named it VolumeEBS, I suppose you can name it whatever you want.

LVM - Volume Group - VolumeEBS

Done.

Almost.

How in the hell do I mount this thing?

(Brad is long gone now...we chatted for over an hour into the wee hours of the morning...I can't blame him. He was probably trying to escape after that second question).

Back to Matt's post. Honestly, I have no idea (yet) if this is the same command I performed via the GUI, but I did it anyway after a couple of unsuccessful attempts at mounting the drive.
[root@ebs chet]# /sbin/mkfs -t ext3 /dev/hdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
39321600 inodes, 78643199 blocks
3932159 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
2400 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Something good happened...I think.
[root@ebs chet]# mount -t ext3 /dev/hdb1 /install
[root@ebs chet]# ls /install
lost+found
Win! Or is that FAIL!? I don't care. It's done.

I added the line (correctly this time) to /etc/fstab, rebooted and it's there.

Now, finally (finally), I can begin my install of EBS. The latest version has probably been released and the instructions are probably moot, but I managed something.

Labels: , ,

 
  OEL, OBIEE, VirtualBox and Shared Folders
I spent the week installing OBIEE in Windows (Vista Ultimate) and OEL 5, Update 4. I've always tried to install the software I'm working with, it helps to give me a better understanding of what's going on. I don't always understand at first, but after prolonged exposure, I can more easily put the pieces together.

Digression
I can remember trying to install OAS on a Windows server back in 2002, multiple times. I had absolutely no idea what I was doing...just clicking buttons and stuff. In particular, there was the was this one night...err, morning, 4 AM to be exact where I was installing the software for what felt like the 200th time. Did I mention I was onsite...and in the server room? The only reason I remember that particular time was the justification I was using...LC was T minus 1 week.

Post
In the OEL/OBIEE article, I mentioned some problems that I had, those problems are the reason for this post.

I'll recall the setup:
Guest
Oracle Enterprise Linux 5, Update 4
Oracle Business Intelligence Enterprise Edition, 10.1.3.4
Java 6 (1.6_0.17)
Memory: 1280M
Diskspace: 30 GB

Host
Ubuntu 9.04
VirtualBox 3.0.10
--VirtualBox Guest Addtions (i.e. Shared Folders)
Dell XPS M1530
3 GB RAM
150 GB Hard Drive
I believe that's all that is relevant. If I left something off, let me know and I'll add it in.

This is a fresh install of OEL. After installation of the OS, I installed the Guest Additions so I could 1, get a higher screen resolution and 2, I could use Shared Folders.

From the host, I unzipped the OBIEE software into /opt/software/oracle/obiee/linux, I then un-tarred (?) the resultant .tar file.

From the guest, I logged in as root and issued:
mount -t vboxsf software /mnt/software
* You can see the full set of instructions on the Shared Folder post

I then navigated to the directory via the mounted path
/mnt/software/oracle/obiee/linux/RH_Linux/Server/Oracle_Business_Intelligence
From there I followed the instructions.
[oracle@localhost Oracle_Business_Intelligence]$ ./setup.sh -console
InstallShield Wizard

Initializing InstallShield Wizard...

Preparing Java(tm) Virtual Machine...
...................................
...................................
...................................
...................................
...................................
...................................
...................................
...................................
...................................
...................................
...................................
...................................
...................................
...................................
...................................
...................................
...................................
...................................
...................................
...................................
...................................
............
It would just hang there. For the longest time.

I poured over the documentation to see if I missed a required library or something. Nothing. I ran and reran the UnixChk.sh script multiple times (the script checks to see if OBIEE can be installed and outputs SUCCESS or FAILURE). I would start and stop this installation over and over. Going so far as to let it run overnight (which for me is about 5 hours).

I could get past this part, given sufficient time, typically down to the point where it is actually writing the software to disk (presumably anyway).
Installing $L(com.siebel.analytics.install.AnyStringConstants,
InstallConfig.ProductName) $P(SiebelAnalyticsProductBean.productNumber). Please
wait...


|-----------|-----------|-----------|------------|
0% 25% 50% 75% 100%
|||||||||||||||||||||||||||||||||||||||||||||||||||

Installing Oracle Business Intelligence 10.1.3.4.1. Please wait...
||||||||||||||||||||
Again, it would just sit there.

Finally, on Wednesday evening I saw a friend of mine (Tom Roach, former President of SOUG) online (or did he see me?). Anyway, I told him about the situation and, since he expressed interest in my problem, I offered to show him.

We then spent the next 30 minutes trying to get him access to my computer. Suffice it to say, I can do that easily on Windows. Ultimately, he talked me through enabling SSH and he was in.

That's when the magic began.

As I watched him type up all these commands, looking through scripts...and starting and stopping the installation. I had my own personal (*nix) trainer. First, I believe he ran
[oracle@localhost Oracle_Business_Intelligence]$sh -x ./setup.sh -console
Which then output all kinds of stuff I didn't recognize. I asked him later what it was, the sh command let's you debug the shell script to get a better idea of what is going on. When he killed it, I noticed an error, "'run' class cannot be found" or something along those lines. Before Tom showed up, I had suspected there was something going on with my Java environment. I tried using jcontrol to change the memory allocated to Java upon start with no luck. I began installation, then ran jconsole to see what was going on with the JVM. I saw "things" that must have been the problem...none of this proved out in the end. In fact, I think I told Tom that originally, that I suspected that the Java environment wasn't set up correctly.

He then noticed that it was calling Linux.jar in the same directory. So he ran that directly (to eliminate a possible error in the main script I'm guessing):
[oracle@localhost Oracle_Business_Intelligence]$exec Linux.jar -console
or something very close to that.

Occasionally he'd run this "history" command. Wow! You can see all the commands you've entered. That's helpful.

Next up he tried to run "strace." "File or directory not found" Tom, prefix it with /sbin or /bin. No go. It's not installed. I then began to look for it on 1 of the 4 ISO images. Found it and loaded it.

ENTER STRACE COMMAND

He then began to pour through the when he notices lines like this:
wait4(5171, 0xbfa23aac, WNOHANG|WSTOPPED, NULL) = 0
read(3, 0x8a39cd0, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(5, 0x8a39cd0, 4096) = -1 EAGAIN (Resource temporarily unavailable)
nanosleep({0, 10000000}, NULL) = 0
wait4(5171, 0xbfa23aac, WNOHANG|WSTOPPED, NULL) = 0
read(3, 0x8a39cd0, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(5, 0x8a39cd0, 4096) = -1 EAGAIN (Resource temporarily unavailable)
nanosleep({0, 10000000}, NULL) = 0
wait4(5171, 0xbfa23aac, WNOHANG|WSTOPPED, NULL) = 0
read(3, 0x8a39cd0, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(5, 0x8a39cd0, 4096) = -1 EAGAIN (Resource temporarily unavailable)
nanosleep({0, 10000000}, 0) = ? ERESTART_RESTARTBLOCK (To be restarted)
Googled those, but I believe he had his suspicions. He also found the following useful, but I'm not sure why. I think he mentioned something about the fork() and trying to change directories but being unable to.
getcwd("/home/oracle"..., 1024)         = 13
chdir("/mnt/software/.../Oracle_Business_Intelligence") = 0
pipe([3, 4]) = 0
pipe([5, 6]) = 0
fork() = 5171
chdir("/home/oracle") = 0
close(4) = 0
close(6) = 0
fcntl64(3, F_GETFL) = 0 (flags O_RDONLY)
If I can't recall very clearly it's because we started this IM at about 11:30 PM EST. It was now approaching 1 AM.

Based on what he said and the problems Jake had previously, I began to seriously think it might have something to do with the Shared Folders. I wondered aloud on IM, "Could this be due to the Shared Folders and the OS's inability to write there?" Tom, "Perhaps"

I asked if I should just move the software to the OS and run it from there.

By then Tom was giving me a great tutorial on screen.

Tom didn't get to installing the software successfully, but he gave me sh, screen, history, and strace. By reviewing the output with him and explaining what I was trying to do, Tom got me going in the right direction.

After 2 hours, now 1:30 AM, Tom finally succombed. That was pure awesome...thanks again Tom for your help!

I wasn't ready for sleep yet (besides being a bit of an insomniac), I had new life.

First copied the files over to the guest OS. Ran the UnixChk.sh script then ran the setup.sh script. After about a minute, I was prompted for my first response. Sweet! I answered all the questions and went down to watch TV for an hour or so. I came back, answered a few more questions and it was done.

Only to be destroyed later that morning and re-installed.

Labels: , , , ,

 
  OEL, VirtualBox and Shared Folders
Inspired by Jake's difficulty with getting Virtual Box's Shared Folders to work with Oracle Enterprise Linux (OEL), I'm writing it up...I'm sure he's not the only one with problems.

Most awesomely, he had members of the Sun VirtualBox team commenting on his post.

It's funny, I just got this working a couple of weeks ago. I would typically go his route, get the guest machine working and then download the software from there. Since I have limited space, I tend to create smaller VMs, usually around 10GB or 15GB for database servers. These are sandboxes, a way for me to learn certain aspects of the database (as well as installation).

So here we go. I'm assuming you have your VM running. First, go to Devices:



Next, choose Shared Folders



You should then see this window



Click on the little icon in the top right corner



You'll then be asked to choose a directory (on your host machine)



I chose /opt/software



Name it something you'll remember, like "software" and check the "Make Permanent" check box:



Back to the Shared Folder screen and it should look like this



Go ahead and select "Ok"

Now, open up a terminal and login as root:
[oracle@localhost ~]$ su root
Password:
[root@localhost oracle]# /sbin/lsmod | grep vbox*
vboxvfs 47776 0
vboxadd 70144 5 vboxvfs
I'm just checking to see if the VirtualBox shared folder module was loaded into memory. Sometimes it's not and I found the solution here. Never in a million years would I have thought to check to see if the module was loaded into memory. In fact, I have no idea what a module is.

If you do the lsmod | grep vbox* trick and find that vboxvfs is not loaded into memory, follow the steps included on the link. OK, I won't make you do that.
[root@localhost oracle]# /sbin/modprobe vboxvfs
That should load it. If you get a "file not found" type of error (I can't remember the exact error), you'll probably need to reload the guest additions. If you used the "x11" switch, don't use it this time.

Finally, you can do this
[root@localhost oracle]# ls /mnt
software
[root@localhost oracle]# mount -t vboxsf software /mnt/software
[root@localhost oracle]# cd /mnt/software
[root@localhost software]# ls -l
total 12
drwxr-xr-x 1 root root 4096 Dec 7 17:21 method_r
drwxr-xr-x 1 root root 4096 Dec 7 17:19 oracle
drwxr-xr-x 1 root root 4096 Nov 24 12:34 other
And voila! You now have shared folders.

One last point, if you try to add this to your mount file, it won't work, watching OEL boot-up, it seems the VirtualBox components are loaded after any drives are mounted. I'm sure there is a way to change this...but it's outside my realm.

Labels: , , ,

 
  OEL: VirtualBox Guest Additions
Thankfully, I managed to get Oracle (the Database) installed on Oracle (the Enterprise Linux). No easy task for a rookie.

Like most people, I don't like the 1024x768 default resolution, so I tried to install the VirtualBox Guest Additions. I've tried like 22 times now. Here are the 2 different errors I would find:
[root@cent-1 VBOXADDITIONS_2.2.4_47978]# /bin/bash ./VBoxLinuxAdditions-x86.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 2.2.4 Guest Additions for Linux installation
.....................................................................
.....................................................................
.....................................................................
...............
VirtualBox 2.2.4 Guest Additions installation
This system does not seem to have support for OpenGL direct rendering.
VirtualBox requires Linux 2.6.27 or later for this. Please see the log
file /var/log/vboxadd-install.log
if your guest uses Linux 2.6.27 and you still see this message.
/var/log/vboxadd-install.log looks like this:
Installing VirtualBox 2.2.4 Guest Additions, built Fri May 29 19:13:34 CEST 2009

Testing the setup of the guest system

Could not find the Linux kernel header files -
the directories /lib/modules/2.6.18-128.e15/build/include
and /usr/src/linux/include do not exist.
Giving up due to the problems mentioned above.
I googled "OpenGl direct rendering" and found this entry. The suggestion was to add "x11" to the end like this:
/bash/bin ./VBoxLinuxAdditions-x86.run x11
Tried that out and I got a different error, but one that matched what the log says, something like "install kernel headers" blah blah blah. Greek.

I tried using apt-get...it apprently doesn't exist on OEL (or Red Hat derivatives). Ubuntu has dpkg...which doesn't work in OEL. yum! Let's try yum. Where do I find the kernel headers?

Online?

No.

I wonder if they exist on the iso images?

So I load up Enterprise-R5-U3-Server-i386-disc1.iso, navigate to the Server directory:
(Yes, it's a picture. I can't copy out of the guest yet...shut up).

Let's try kernel-headers (couldn't be that obvious could it?)
[root@oracledb Server]# rpm -ivh kernel-headers-2.6.18-128.e15.i386.rpm
warning: kernel-headers-2.6.18-128.e15.i386.rpm: Header V3 DSA signature:
NOKEY, key ID 1e5e0159
Preparing... ################################### [100%]
package kernel-headers-2.6.18-128.e15.i386.rpm is already installed
[root@oracledb Server]#
With a tried and true method, I select the next one, kernel-devel. I'm not typing this one up. I guess I should put the name here, in case someone is googling for it: kernel-devel-2.6.18-128.e15.i686.rpm

That one installed. Unmount the OEL disc, remount the VBOX Guest Additions, /bin(g)/bash(bang) ./VBOXADDITIONS_2.2.4_47978(boom) and I'm done. Now I just need to reboot to see if it really works.

Why can't it just work?

Labels: , ,

 
  Virtual Box, OEL, 11g, ApEx
Finally.

After many months and many attempts, I have managed to install a database on a non-windows platform. I think I deserve a little credit. ;)

In January, I began installing Ubuntu Intrepid Ibex on all of my home computers. What this meant for me is that I was often without one because I screwed something up. I even got so far as to install Oracle XE on Ubuntu which took 2 blog posts.

Just before COLLABORATE 09, I installed Jaunty Jackalope on my laptop. Then I got the crazy idea to install Oracle on Ubuntu. I ended up having to wipe the hard drive and start fresh. I have no doubt that it (Oracle) can be installed on Ubuntu, it just takes someone much more experienced than I.

Armed with a fresh install, I was going the virtual route. Inspired, I believe, by this comment (Aman Sharma).
1.  Install Sun's Oracle's VirtualBox
2.  Download the latest version of Oracle Enterprise Linux (v5)

I think that's the point I realized my first installation of Jaunty was hosed, and by hosed I mean unrecoverable by me. I couldn't see the 2nd partition, the one with all the room.

3.  Create OEL virtual machine
4.  Follow this guide to get it ready to install the Oracle database (seriously? Why does OEL not come ready for the database server?)


4a.    There's no mention of opening up the firewall in that article. It's probably obvious to most...
5.  Connect to Oracle from the host machine
6.  ApEx? Which version am I running? 3.0? That won't do. Download ApEx 3.2
7.  Install ApEx
8.  Configure Embedded PL/SQL Gateway for port 80
8a.    Ports below 1024 are reserved for privileged processes...Configure Embedded PL/SQL Gateway for port 8080
9.  Connect from host machine.


9a.    Login to ApEx.


10.  WIN!

Labels: , , ,

 


Guest Authors

How To

Popular

Previous Posts

Code Projects

Archives
August 2007 / September 2007 / October 2007 / November 2007 / December 2007 / January 2008 / February 2008 / March 2008 / April 2008 / May 2008 / June 2008 / July 2008 / August 2008 / September 2008 / October 2008 / November 2008 / December 2008 / January 2009 / February 2009 / March 2009 / April 2009 / May 2009 / June 2009 / July 2009 / August 2009 / September 2009 / October 2009 / November 2009 / December 2009 / January 2010 / February 2010 / March 2010 /


Aggregated by OraNA