Monday 20 January 2014

setup for ASM Oracle disks on Linux

Depending of your OS you will need to install different version of these packages.
Packages that you need to install to enable Oracle ASM disks are

oracleasm
oracleasm-kmp-default
oracleasm-support
oracleasmlib

For example for SLES11.3 I installed these versions

oracleasm-2.0.5-7.37.3
oracleasm-kmp-default-2.0.5_3.0.76_0.11-7.37.3
oracleasm-support-2.1.8-1.SLE11
oracleasmlib-2.0.4-1.SLE11

Oracleasm-kmp-default and oracleasm are on installation DVD.

# zypper info oracleasm-kmp-default
# zypper install oracleasm-kmp-default


# zypper info oracleasm
# zypper install oracleasm

Oracleasm-support and oracleasmlib you have to download from Oracle web site.


# cd location_of_packages
# lsoracleasm-support-2.1.8-1.SLE11.x86_64.rpm
oracleasmlib-2.0.4-1.sle11.x86_64.rpm
 
Test if you have everything for installation of asmlib

# rpm -ivh --test oracleasm*  

And install it

# rpm -ivh  oracleasm*

After you installed oracelasm and oracleasmlib on your server it is time to do setup for ASM disks.

After installation of asmlib new service in /etc/init.d.will show up oracleasm. With this service you create,delete ASM disks, see status and everything you need to do with ASM disks.


First thing that you need to do is to configure oracleasm.

Check for status of oracleasm
#/ etc/init.d/oracleasm status
Checking if ASM is loaded: no
Checking if /dev/oracleasm is mounted: no








Start to configure
# /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 ]


# /etc/init.d/oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes



Before you start to create asm disks you need to create partition on disk that you want to use for asm.
(This will be explained in another post)

Suppose you create partition named sdb1.
To create ASM disk do this

# /etc/init.d/oracleasm createdisk ASMDISK1 /dev/mapper/sdb1
ASM disks is created!

To list ASM disks

# /etc/init.d/oracleasm listdisks
ASMDISK1



No comments: