Thursday, May 30, 2013

Loading module "oracleasm": failed Unable to load module "oracleasm"

If you've downloaded Oracle ASMLib rpms for an older RHEL5 kernel and try to load them over a newer RHEL5 kernel, you'll see this issue:

Loading module "oracleasm": failed
Unable to load module "oracleasm"

Here's what you need to do:

[root@chirac1 ~]# /usr/lib/oracleasm/oracleasm_debug_link 2.6.18-164.el5 2.6.18-274.el5
[root@chirac1 ~]#
Where, 2.6.18-164.el5 is the ASMLib already installed on the machine (which belongs to an older kernel) &  2.6.18-274.el5 is the Kernel running on the machine.

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

Post this you should be able to proceed normally with creation of Disks. 

Labels: , , ,

Oracle RAC setup - Adding disks to your VM hosted on VMware ESX.

If you follow the documentation on creating a basic RAC setup on Linux using this link, you'll get stuck on creating Shared Disks, if you're using VMware ESX.

Here's how you create thin disks on VMware ESX and add them to your Linux VM.

1) Login to the ESX machine using SSH/Putty.
2) Navigate to your datastore and create a folder:

cd /vmfs/volumes/QA
mkdir Chirag_RAC_SharedDisks
cd  Chirag_RAC_SharedDisk

3) Add thin disks using vmkfstools
/vmfs/volumes/513870e6-dabac702-c4ec-bc305bf6fb60/Chirag_RAC_SharedDisks # vmkfstools -c 10G -d eagerzeroedthick CHIRACDISK1.vmdk
Creating disk 'CHIRACDISK1.vmdk' and zeroing it out...
Create: 100% done.

Similarly create more such disks. For my setup I created 4 disks.

4) Go to your VIC and right-click on VM -> Edit Settings -> Add -> Hard Disk.
Proceed by selecting "Use an existing virtual disk". Chose the disk file from the above location.





5) Ensure you select them as "Independent" and Persistent" when adding to the VM, otherwise, you'll end up with problems while taking snapshots.
6) You also need to tell VMware that these HDD are multi-writeable. You do that by Right Click on VM -> Edit Settings -> Options tab -> General -> Configuration Parameters
Click on Add Row -> |scsi0:1.sharing| multi-writer|
                                  |scsi0:2.sharing| multi-writer|
So and so forth for all the other disks.

And you're done.
If you now boot up your VM, you'll see these Hard Disks. Proceed normally to format and use them.

Note: The VMware ESX in questions is v5.0. The steps may not work for really old ESX versions, like v3.5

Labels: , ,