[OracleOSS] [TitleIndex] [WordIndex]

ASMLib/BuildAndTest

The following page describes steps to build and test oracleasm kernel module for RHEL5

1. Steps to build oracleasm kernel module

a. Download oracleasm source

Source for oracleasm source is available at the following location.

http://oss.oracle.com/projects/oracleasm/files/sources/
eg: wget http://oss.oracle.com/projects/oracleasm/dist/files/sources/oracleasm-2.0.5.tar.gz

NOTE: Always download the required version or the latest tar ball

b. Configure/Build oracleasm rpm

Run configure to setup for the right kernel and then run make to build the driver.

  a. tar -zxvf oracleasm-2.0.5.tar.gz
  b. cd oracleasm-2.0.5
  c. ./configure --with-kernel=/usr/src/kernels/<kernel version>

     eg: ./configure --with-kernel=/usr/src/kernels/2.6.18-92.el5-i686
    (above step sets up the build against the specified kernel)

  d. make PKG_VERSION=<pkg version> rhel5_<kernel version>_rpm

     eg: make PKG_VERSION=1 rhel5_2.6.18-92.el5_rpm
    (PKG_VERSION defines package version. For <pgk version verify the following page
     http://www.oracle.com/technology/software/tech/linux/asmlib/rhel5.html 
     and use the same value that was used for other architectures. )

2. Installation and Testing of oracleasm driver

When you build a new oracleasm driver module, run the following steps to verify the correctness of the new driver.

a. Make sure oracleasm-support rpm is installed

rpm -qa|grep oracleasm-support-2.1.1

b. Since you are going to install and test oracleasm rpm, boot system in the right kernel version

uname -a
(verify kernel version and architecture and pick the right oracleasm driver rpm)
rpm -ivh oracleasm-2.6.9-78.0.17.EL-2.0.5-1.el4.x86_64.rpm

c. Once oracleasm rpm is installed, start the driver

[root@el532-1 ~]# oracleasm init
Loading module "oracleasm": oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm

d. Now verify if any disks are already configured

[root@el532-1 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "VOL2"

e. List disks

[root@el532-1 ~]# oracleasm listdisks
VOL2

f. Delete a disk if it already exist

[root@el532-1 ~]# oracleasm deletedisk VOL2
Clearing disk header: done
Dropping disk: done

g. Create a new asmdisk

[root@el532-1 ~]# oracleasm createdisk VOL2 /dev/hdb1
Writing disk header: done
Instantiating disk: done

h. Verify it's created

[root@el532-1 ~]# oracleasm querydisk /dev/hdb1
Device "/dev/hdb1" is marked an ASM disk with the label "VOL2"

2012-11-08 13:01