Archive for the 'Geeking out' Category

Installing Oracle 11g R2 on Solaris 10 with EMC PowerPath

Monday, February 1st, 2010

For anyone who has the misfortune of having to install a multi-node RAC cluster of Oracle 11g R2 on Solaris 10 (in my case, SPARC 64-bit) with an EMC PowerPath, hopefully these notes I’ve collected will come in useful. I certainly suffered plenty trying to get this install to work and web searches didn’t turn up very many useful results at the time.

Make sure you set tunable limits correctly.

Previously, you would edit /etc/system to change tunable parameters then reboot the system, but starting in Solaris 10, there’s a new “projects” system where tunables can be configured. For my installation, the cluster nodes had 16GB of RAM each, so I used these settings (as root):

$ projmod -U oracle -sK "process.max-file-descriptor=(priv,4096,deny)" user.oracle
$ projmod -U oracle -sK "project.max-msg-ids=(priv,256,deny)" user.oracle
$ projmod -U oracle -sK "project.max-sem-ids=(priv,256,deny)" user.oracle
$ projmod -U oracle -sK "project.max-shm-ids=(priv,256,deny)" user.oracle
$ projmod -U oracle -sK "project.max-shm-memory=(priv,16GB,deny)" user.oracle

You can check these settings by inspecting /etc/project and looking for the user.oracle entry.

Also, when running in a RAC configuration, some Oracle processes like crsd run as root, so these will be necessary as well:

$ projmod -sK "project.max-shm-ids=(priv,256,deny)" system
$ projmod -sK "project.max-shm-memory=(priv,16GB,deny)" system

This appears to be a catch-all way of ensuring these settings are in use for all users:

$ projmod -sK "project.max-shm-ids=(priv,256,deny)" default
$ projmod -sK "project.max-shm-memory=(priv,16GB,deny)" default

Failing to set these settings for system and default seems to result in Oracle “ORA-01102: cannot mount database in EXCLUSIVE mode” errors when trying to start a database instance.

NB: There may be circumstances when you still need to configure these tunables in /etc/system. For more information, see Oracle Metalink 435464.1 ENABLING SOLARIS PROJECT SETTINGS FOR CRS.

Failure to create the DATA diskgroup using ASM

I wasted a good 6 hours trying to understand why I kept getting the following error during the 11g R2 grid package install:

ORA-15020: discovered duplicate ASM disk "DATA_0000"

Turns out, I had only set the permissions on /dev/rdsk/emcpower* correctly on one of the nodes in the cluster. The permissions need to be correct on all nodes in the cluster, as the installer operates on all cluster nodes as part of the install – duh! Beware of this gotcha, it can be very frustrating.

WARNING: oradism did not start up correctly.

In diag/rdbms/*/$ORACLE_SID/trace, in the alert_${ORACLE_SID}.log, you may find this message:

WARNING: oradism did not start up correctly.
  Dynamic ISM can not be locked.
----------------------------------------
oradism creation failed for unknown reasons 0 8 105

This is apparently a bug described in Oracle Metalink 374367.1. By default, the Oracle installer installs the file with ownership oracle:oinstall and mode 0750. It needs to be suid root, sgid dba. The solution is to perform the following steps (as root):

$ cd $ORACLE_HOME/bin
$ chown root:dba oradism
$ chmod 6550 oradism

Then, restart the database.

Back up the Enterprise Manager encryption key!

The Enterprise Manager runs on port 1158, using HTTPS. The encryption key is located here:

$ORACLE_HOME/*/sysman/config/emkey.ora

Back this key up, because without it, the Enterprise Manager data can’t be accessed.

ERROR: NMO not setuid-root (Unix-only)

When using Enterprise Manager, you might get the following error message:

ERROR: NMO not setuid-root (Unix-only)

This occurs because the NMO binaries need to be setuid-root, as the error explains. Use these steps to correct the problem:

$ cd $ORACLE_HOME/bin
$ chown root nmb nmhs nmo
$ chmod 6750 nmb nmhs nmo

Have you installed a multi-node RAC cluster using Oracle 11g R2 on Solaris 10? Did you discover any gotchas that prevented a successful installation “out of the box”? Please, share them in the comments below so that others can benefit from our pain!

Make sure all your friends show up in your News Feed

Tuesday, December 22nd, 2009

I keep forgetting where this setting is, so I’m going to blog it here so I can find it when I search for it.

If you want to make sure all your friends status updates show up in your Facebook News Feed, you need to make sure you’ve set your threshold high enough. You get to this setting by going to the bottom of your News Feed page and clicking on the Edit Options link:

Facebook News Feed Edit Options link

In the dialog that pops up, there’s a Number of Friends section that controls how many friends’ updates will be included on your News Feed. Set this number to something larger than the number of friends you have, to ensure that all of their updates will be included.

Number of Friends configuration

There you go. If you have more friends than the number that is currently showing, you won’t see all your friends’ updates.

Google Chrome for Mac finally in beta

Friday, December 11th, 2009
Google Chrome Logo

I’ve been using nightly development builds of Google Chrome for Mac, Google’s shiny new web browser, for a while now. A few days ago, it was officially labeled beta for Mac. Until now, I wasn’t using it regularly, but I decided I should try using it full-time for a few days to see how it wears.

I’ve got 12+ tabs open and it’s still fast, smooth and stable. Granted, on the Mac there’s no extensions/add-on feature … it’ll be interesting to see how stable things remain once those are introduced. The browser’s rendering of most pages seems identical to Firefox, except for a few that I’ve stumbled across. Overall, it’s a very usable browser and should have a great future ahead of it.

Of course, there’s still a few bumps and warts that I hope they’ll address soon:

  • Needs to be more customizable. For me, this could be as simple as providing an about:config interface like Firefox. Let me easily tweak and turn the various knobs that control stuff under the hood. My biggest gripe is not being able to completely remove the “close tab” button on the tabs. In trying to switch tabs, I’m constantly accidentally clicking the “x” which closes the tab. Sure, Cmd-Shift-T re-opens the tab, but that’s a nuisance that could easily be avoided by removing the “close tab” bit like I have done in Firefox.
  • Smart keywords. I pretty much live in my web browser and the Address Bar is my command-line interface to the web. I have smart keywords defined for all manners of things, and switching to Chrome that lacks them is very painful. I’d say that this is a must-have feature before I would switch completely.
  • Third-party add-ons and extensions. I can live without most of the niceties that add-ons bring, but there are a few that I would hate to do without:
    • It’s All Text! Edit any TEXTAREA in an external editor. For the average web user, this probably wouldn’t be that useful, but for me, it makes editing code blocks and other large text in web-based CMS‘es tolerable.
    • Greasemonkey. There’s nothing like the ability to “fix” a “broken” website, removing annoying “features” or adding a missing one. While I could probably get by without Greasemonkey, I don’t know if I’d really want to.

Have you tried out Google Chrome, yet? I’d like to know what you think … let me know in the comments below.

Using a Cisco/Linksys WUSB600N on MacOS X 10.6

Friday, November 27th, 2009

After getting totally fed up with the poor Wi-Fi range on my MacBook Pro, I picked up an external Cisco/Linksys WUSB600N. Of course, Linksys doesn’t provide Mac drivers for this product, but it’s a Ralink 2870 and Ralink provides drivers for MacOS X in their support section. I downloaded the RTUSB D2870-2.0.0.0 UI-2.0.0.0_2009_10_02.dmg driver (5.2 MB).

There is a driver inside USBWireless-10.6 for Snow Leopard, and it will complain during installation that the RT2870USBWirelessDriver.kext failed to install. This is expected, just ignore it, the installation will complete successfully.

At the time of this writing, the WUSB600N v2 isn’t included in the Info.plist for the kext, so I had to edit /System/Library/Extensions/RT2870USBWirelessDriver.kext/Contents/Info.plist in a text editor and add the appropriate bits. Search for “Linksys – RT2870 – 2″ and duplicate the <key> and <dict> elements, renaming the key to “Linksys – RT2870 – 3″ and the idProduct integer from “113″ to “121″. Here’s what it should look like after the changes:

        <key>Linksys - RT2870 - 3</key>
        <dict>
            <key>CFBundleIdentifier</key>
            <string>com.Ralink.driver.RT2870USBWirelessDriver</string>
            <key>IOClass</key>
            <string>RT2870USBWirelessDriver</string>
            <key>IOProviderClass</key>
            <string>IOUSBDevice</string>
            <key>idProduct</key>
            <integer>121</integer>
            <key>idVendor</key>
            <integer>5943</integer>
        </dict>

After making this change, unload/reload the kext or reboot your machine, and then plug in your WUSB600N and you should get a window popping up telling you that a new network device has been detected.

I hope this helps someone, as I was totally disappointed when I learned that Linksys wasn’t supporting this device on Mac “out of the box.”

Getting ActiveState’s “teacup” working on MacOS X

Wednesday, October 21st, 2009

ActiveState has created a Tcl Extension Archive tool called teacup which simplifies the installation of binary extensions to Tcl. It’s included with ActiveTcl, but if you’re using Tcl from MacPorts and want to use teacup, it’s fairly easy:

1. Download teacup for MacOS X

The teacup binary can be downloaded from this location:

Here is a direct link to the latest teacup binary. The file is named file.exe — simply rename that to teacup and put it in /usr/local/bin or another convenient place in your $PATH.

2. Create the installation repository

You will need an installation repository where teacup can store its data locally. The default location is /Library/Tcl/teapot and you can create it like this:

$ sudo teacup create
Repository @ /Library/Tcl/teapot
    Created

3. Patch MacPorts tclsh to handle teapot repositories

$ sudo teacup setup /opt/local/bin/tclsh
Looking at tcl shell /opt/local/bin/tclsh ...
  Already able to handle Tcl Modules.
  Already has the platform packages.
  Patching: Adding code to handle teapot repositories ...
Done

4. Link teacup to MacPorts tclsh

$ sudo teacup link make /Library/Tcl/teapot /opt/local/bin/tclsh
Ok

That’s it! You’re done. You should now be able to list available packages within TEA using teacup list and install them using sudo teacup install "packagename".

I’ve tested this on MacOS X 10.6.1 Snow Leopard with Tcl 8.5.7 from MacPorts.

Tags: , , , ,