Configuring Oracle ASM disks in Oracle Enterprise Linux r5u3

Well this was an hour well spent during lunch today! As part of my database install which will eventually be used to migrate all my Oracle UCM content that is currently file system hosted into the database, I wanted to use Automatic Storate Management (ASM). This will let me mirror the database across two disks. I don't have the spare cash right now for the RAID array I would like, so this is a neat option in the interim. However it took some hunting to get the right information and drivers loaded, so here are the steps I eventually took to get Oracle ASM working for my 11g database.

Before starting the database installation you need to mark your disks as ASM. My environment is using a pretty vanilla installation of Oracle Enterprise Linux release 5 update 3.

  1. Ensure you have the disks configured correctly in Linux, I have /dev/sdc and /dev/sdd which are two 200GB IDE disks exposed to my OS from the Oracle VM Server that this guest is running on.
  2. Install the ASM packages from the Enterprise Linux CD/DVD. The RPM's are in the "Server" directory in the root of the CD/DVD. I used a DVD so i'm not sure which CD the files are on, you'll need to hunt. The packages you need to first install are;
    • oracleasm-2.6.18-128.el5-2.0.5-1.el5.i686.rpm
    • oracleasm-support-2.1.2-1.el5.i386.rpm
    So to install both, simply run
    rpm -ivh oracleasm-support-2.1.2-1.el5.i386.rpm
    and
    rpm -ivh oracleasm-2.6.18-128.el5-2.0.5-1.el5.i686.rpm.
  3. Now there are more RPM's you need to install, as detailed in this document. I downloaded the following from this location on the Oracle Technology Website. I navigated to the Red Hat Enterprise Linux 5 AS section.There was also a newer version of oracleasm-support on the site which I didn't download and install at this time. I didn't need to download the drivers for my kernel because the RPMs on my install media were the right ones. So I installed this oracleasmlib as root using rpm - i oracleasmlib-2.0.4-1.el5.x86_64.rpm
  4. The next step was to configure ASM, you do this by running oracleasm configure. I got past a few of the first questions but it eventually failed and checking /var/log/messages I saw the error;

    Jun 5 12:35:55 database modprobe: FATAL: Module oracleasm not found.

    A quick bit of googling and it seems that the driver isn't being loaded and has not been installed correctly.
  5. My final step of configuration to get this working was to use oracleasm to update the driver itself and this seemed to sort itself all out! I ran the command oracleasm update-driver and you can see the result below.

    [root@database modules]# oracleasm update-driver
    Kernel: 2.6.18-128.el5xen i686
    Driver name: oracleasm-2.6.18-128.el5xen
    Latest version: oracleasm-2.6.18-128.el5xen-2.0.5-1.el5.i686.rpm
    Installing driver...
    Preparing... ########################################### [100%]
    1:oracleasm-2.6.18-128.el########################################### [100%]
    Driver installed successfully

  6. Now I could successfully run oracleasm configure. Again the output from this below;

    [root@database modules]# /etc/init.d/oracleasm configure
    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) [y]:
    Scan for Oracle ASM disks on boot (y/n) [y]:
    Writing Oracle ASM library driver configuration: done
    Initializing the Oracle ASMLib driver: [ OK ]
    Scanning the system for Oracle ASMLib disks: [ OK ]

  7. I was then able to mark my disks for ASM use, except I had already mounted these disks as part of my testing from earlier.

    [root@database modules]# oracleasm createdisk DATADISK1 /dev/sdc1
    Unable to open device "/dev/sdc1": Device or resource busy

    Duh, I quickly removed the references in /etc/fstab and unmounted the drives. This time I could run my command;

    [root@database modules]# oracleasm createdisk DATADISK1 /dev/sdc1
    Writing disk header: done
    Instantiating disk: done
    [root@database modules]# oracleasm createdisk DATADISK2 /dev/sdd1
    Writing disk header: done
    Instantiating disk: done

  8. Finally, before I start my 11g database installation, just check that ASM can see my new disks;

    [root@database modules]# oracleasm scandisks
    Reloading disk partitions: done
    Cleaning any stale ASM disks...
    Scanning system for ASM disks...
    [root@database modules]# oracleasm listdisks
    DATADISK1
    DATADISK2

I was then able to go through the 11g installation and the two disks were available at the ASM configuration section! Here's a screen shot of the ASM manager;

11gASMView.gif

Comments:

Dear Simon Thanks for fix you posted here for the below error Jun 5 12:35:55 database modprobe: FATAL: Module oracleasm not found. Saved me lot of time. I appreciate your help through this blog. Keep the good work. Leo

Posted by Leojames on April 11, 2010 at 11:39 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Simon Thorpe, senior consultant at Oracle, blogs about simple and useful tips when working with Oracle technology.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today