While building my own RAC (11.2.0.2) on two VM’s, using a third VM with Openfiler on it as my SAN, I had to dowload, install, configure and load oracleasm / ASMLIB. Loading didn’t  go smoothly at my own project. First I analyzed what I did, steps I took:

Step 1 : Downloading the right packages from the otn-page. It’s crucial at this point  to know exactly which packages you need, otherwise you may get some vague errors.

[root@rac1 sbin]# uname -r
2.6.18-194.el5
[root@rac1 sbin]# uname -p
x86_64
[root@rac1 sbin]# uname -i
x86_64

You need these three packages:

oracleasmlib-2.0 – the Oracle ASM libraries
oracleasm-support-2.0 – utilities needed to administer ASMLib
oracleasm – a kernel module for the Oracle ASM library

Step 2 : Install them :

rpm -Uvh oracleasm-support-2.1.3-1.el5.x86_64.rpm \
> oracleasmlib-2.0.4-1.el5.x86_64.rpm \
> oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm

Step 3: Configure the asm driver  (I used the user grid and group asmadmin):

[root@rac1 media]# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets (‘[]’).  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.
Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done

Step 4: Load and start the oracleasm module:

First I performed:  /usr/sbin/oracleasm init. This didn’t work for me, no output at all, some vague alerts in /var/log/oracleasm about a wrong grid:asmadmin – group:

Loading module “oracleasm”: oracleasm
Mounting ASMlib driver filesystem: chown: `grid:asmadmin’: invalid group
failed
Unable to fix ASM driver permissions

Then I saw in release-notes somewhere (sometimes I’m reading some…) that oracleasm init should not be used. Instead of that, use start…:

[root@rac1 init.d]# /etc/init.d/oracleasm start
Initializing the Oracle ASMLib driver:                     [  OK  ]
Scanning the system for Oracle ASMLib disks:               [  OK  ]

This is a lot better. And when I booted my RAC-nodes later on, it worked smoothly.

Curious what the command is in this /etc/init.d/oracleasm:

start()
{
if [ “$ORACLEASM_ENABLED” != “true” ]
then
exit 0
fi

echo -n “Initializing the Oracle ASMLib driver: ”
“${ORACLEASM}” init -l “${ORACLE_ASMMANAGER}” -v 1>>/var/log/oracleasm 2>&1
if_fail “$?” “Unable to initialize the ASMlib driver, see /var/log/oracleasm”

if [ “$ORACLEASM_SCANBOOT” = “true” ]
then
echo -n “Scanning the system for Oracle ASMLib disks: ”
“${ORACLEASM}” scandisks -l “${ORACLE_ASMMANAGER}” -v \
1>>/var/log/oracleasm 2>&1
if_fail “$?” “Error scanning for disks, see /var/log/oracleasm”
fi
}

The configuration file for oracleasm :  /usr/lib/oracleasm/oracleasm-Xshlib .