How to install ASMLIB from Oracle’s public YUM

There are several ways to get ASMLIB, we can download it from the OTN here, or we can download it from from ULN (Unbreakable Linux Network).

Also it comes in the the Unbreakable Linux media, but if you are not subscribed to ULN and you are not using Unbreakable Linux then most people go to the OTN, where you have to select your Linux flavor and then navigate to the correct file according to the linux kernel and then download the 3 files one by one.

I’m going to explain here how easy is to get it from Oracle’s public YUM repository (how to configure the public YUM repository?)

Once you have the public YUM enabled do as root:


yum install oracleasm-support oracleasmlib oracleasm-`uname -r`

ET VOILA!!! it will take just one minute to complete!.

Here is an example on a CentOS 5.4

[root@scen503 yum.repos.d]# yum install oracleasm-support oracleasmlib oracleasm-`uname -r`
..
..   skipping a bunch of things...
..
Resolving Dependencies
--> Running transaction check
---> Package oracleasm-2.6.18-194.el5.x86_64 0:2.0.5-1.el5 set to be updated
---> Package oracleasm-support.x86_64 0:2.1.4-1.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package                      Arch       Version          Repository       Size
================================================================================
Installing:
oracleasm-2.6.18-194.el5     x86_64     2.0.5-1.el5      el5_u5_base      25 k
oracleasm-support            x86_64     2.1.4-1.el5      ol5_u6_base      87 k

Transaction Summary
================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)

Total download size: 113 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm   |  25 kB     00:00
(2/2): oracleasm-support-2.1.4-1.el5.x86_64.rpm          |  87 kB     00:00
--------------------------------------------------------------------------------
Total                                           133 kB/s | 113 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing     : oracleasm-support                                        1/2
Installing     : oracleasm-2.6.18-194.el5                                 2/2

Installed:
oracleasm-2.6.18-194.el5.x86_64 0:2.0.5-1.el5
oracleasm-support.x86_64 0:2.1.4-1.el5

Complete!

Then just follow the installation guide…here are some quick steps to configure ASMLIB:

[root@scen503]# 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
[root@scen503]# /usr/sbin/oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm

Then we need to create all disks, change ASMLIBDISK1 according to your naming conventions:

/usr/sbin/oracleasm createdisk ASMLIBDISK1 /dev/sdb1
Writing disk header: done
Instantiating disk: done

and finally scan and list the disks

/usr/sbin/oracleasm scandisks

/usr/sbin/oracleasm listdisks

Find more of ASM here.

Good luck!

Advertisements
This entry was posted in High-Availability, Linux/Unix, Oracle Server and tagged , , , . Bookmark the permalink.

3 Responses to How to install ASMLIB from Oracle’s public YUM

  1. Thanks for the info, though, this yum repository doesn’t seem to get updated at all, as they all contain just seem to contain the GA release of each minor (5.1-5.7).

    With that said, if you use these repositories your systems will be vulnerable to all kinds of security issues. So, I’d strongly advise against using these repositories.. better to use Centos, Scientific Linux, Fedora or RHEL ones.

    Oracleasm for the latest RHEL5 kernel is available from:
    http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html

    Do you know if there is a specific public yum repo for the latest oracleasm release? Having to manually push the updated oracleasm kernel module into my local yum repos each time the kernel updates is a pain in the ass..
    //M

  2. Ganesh says:

    Thank you – saved my day!

  3. daniel says:

    very good notes.

    thx,
    daniels

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s