Download the appropriate ASMLib RPMs from OTN. If you are using the UEK the ASMLib kernel module is present already. For RHEL kernel we would need all three of the following:
Install the packages using the following command.
rpm -Uvh oracleasm*.rpm
Configure ASMLib using the following command.
# 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 []: oracle Default group to own the driver interface []: dba Start Oracle ASM library driver on boot (y/n) [n]: y Scan for Oracle ASM disks on boot (y/n) [y]: Writing Oracle ASM library driver configuration: done #
Load the kernel module using the following command.
# /usr/sbin/oracleasm init Loading module "oracleasm": oracleasm Mounting ASMlib driver filesystem: /dev/oracleasm #
If you have any problems, run the following command to make sure you have the correct version of the driver.
# /usr/sbin/oracleasm update-driver
Mark the five shared disks as follows.
# /usr/sbin/oracleasm createdisk DISK1 /dev/sdb1 Writing disk header: done Instantiating disk: done # /usr/sbin/oracleasm createdisk DISK2 /dev/sdc1 Writing disk header: done Instantiating disk: done # /usr/sbin/oracleasm createdisk DISK3 /dev/sdd1 Writing disk header: done Instantiating disk: done # /usr/sbin/oracleasm createdisk DISK4 /dev/sde1 Writing disk header: done Instantiating disk: done #
It is unnecessary, but we can run the "scandisks" command to refresh the ASM disk configuration.
# /usr/sbin/oracleasm scandisks Reloading disk partitions: done Cleaning any stale ASM disks... Scanning system for ASM disks... #
We can see the disk are now visible to ASM using the "listdisks" command.
# /usr/sbin/oracleasm listdisks DISK1 DISK2 DISK3 DISK4 #
The shared disks are now configured for the grid infrastructure.