Author Archives: Oren Held

An Embarrassing Linux-RAC bug

People who use RAC to control additional, non-oracle resources, probably also create a "Virtual IP" resource.

After patching 10.2.0.1 -> 10.2.0.3, the file usrvip (handles creation/deletion of Virtual IPs) gets two buggy lines:

ORACLE_HOME=%ORA_CRS_HOME%
ORA_CRS_HOME=%ORA_CRS_HOME%

Yes, it looks like windows, and yes, it doesn't work 😉

To fix it, just replace %ORA_CRS_HOME% with $ORA_CRS_HOME or put the actual path, depends if $ORA_CRS_HOME is available at that context.

I've learned some things from this issue:

1. Patching up does not always help to fix bugs, sometimes it creates them! (I know it's trivial, but first time I actually SEE that)

2. Open Source (this time it was a bash script), even non-GPL, is soo important. With hardly any mentioning on the net*, we could find the bug only by inspecting the VIP scripts.

3. Community developed software such as Linux-HA, would've fixed that in two days, I believe.

* Afterwards we've found out there's a relevant Metalink Note ID: 413077.1 , and that Oracle would fix that in 10.2.0.4.

Which driver is my eth0 using?

Danny made a cool cmd line to find out the driver a specific network interface is using:

ls -l /sys/class/net/eth0/device/driver/|grep module|awk -F "/" '{print $NF}'

Then I thought, why trust the ls output.. Then I found the /usr/bin/readlink command, so:

readlink /sys/class/net/eth0/device/driver/module|awk -F "/" '{print $NF}'

Now, I hate awk, so why not use basename:

basename `readlink /sys/class/net/eth0/device/driver/module`

/sys is cool.