ASMLib Troubleshooting

ASM

This is the guide will help you how to do troubleshoot the oracleasmlib step by step;

  1. rpm -qa | grep asm —> It should be shows the list of installed oracle asm package

rpm -qa |grep asm

oracleasm-support-2.0.3-1
oracleasmlib-2.0.2-1
oracleasm-2.6.9-22.ELsmp-2.0.3-1

  1. rpm -ql oracleasm-support —> which would show the scripts location.

rpm -ql oracleasm-support

/etc/init.d/oracleasm
/etc/sysconfig/oracleasm
/usr/lib/oracleasm/oracleasm_debug_link
/usr/sbin/asmscan
/usr/sbin/asmtool
/etc/init.d/oracleasm is the command used to configure the ASM and scanning , configuring, litsing and querying the
disks from ASM. this script calls the asmtool and asmscan command.as per the scanning devices, there is possibility to
modify the file in /etc/sysconfig/oracleasm or else the excludes some of the functions in this file.

  1. and ensure the oracleasm module to loaded to kernel.
    [[email protected] ~]# lsmod | grep -i oracleasm
    oracleasm 84136 1
    [[email protected] ~]#
  2. Verify the modules info as like,
    [[email protected] ~]# modinfo oracleasm
    filename: /lib/modules/2.6.18-194.el5/kernel/drivers/addon/oracleasm/oracleasm.ko
    description: Kernel driver backing the Generic Linux ASM Library.
    author: Joel Becker [email protected]
    version: 2.0.5
    license: GPL
    srcversion: 6D09F6DEC4890E127C660DD
    depends:
    vermagic: 2.6.18-194.el5 SMP mod_unload gcc-4.1
  3. Make sure the disks which are using, kernel should knows by the device in place of /dev or /etc/partitions. All the asmlib disks
    should be partition before to create disk.
  4. as the configuration part of ASMLib,run /etc/init.d/oracleasm configure as below,
    [[email protected] ~]# /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 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]: y
    Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
    Writing Oracle ASM library driver configuration: [ OK ]
    Scanning system for ASM disks: [ OK ]
  5. after oracleasm configured the status of the output should be like below,
    [[email protected] ~]# /etc/init.d/oracleasm status
    Checking if ASM is loaded: [ OK ]
    Checking if /dev/oracleasm is mounted: [ OK ]
  6. all the configured ASM disks should exitsts the default mount point location.
    [[email protected] ~]# ls -l /dev/oracleasm
    total 0
    drwxr-xr-x 1 root root 0 Jul 18 16:52 disks
    drwxrwx— 1 oracle dba 0 Jul 18 16:52 iid
    [[email protected] ~]# ls -l /dev/oracleasm/disks
    total 0
    brw-rw—- 1 oracle dba 120, 112 Jul 18 16:52 ARCHLOG
    brw-rw—- 1 oracle dba 120, 224 Jul 18 16:52 DATA1
    brw-rw—- 1 oracle dba 120, 208 Jul 18 16:52 DATA2
  7. create a disk using by createdisk parameters:

/etc/init.d/oracleasm createdisk VOL1 /dev/mapper/mapth1

  1. For scanning the createdisk or ASM disks as below,
    [[email protected] ~]# /etc/init.d/oracleasm scandisks
    Scanning system for ASM disks: [ OK ]
  2. For lists out the ASM disk which is under in ASM, use the below command,
    [[email protected] ~]# /etc/init.d/oracleasm listdisks
    ARCHLOG
    DATA1
    DATA2
    DATA3
    LOG1
    LOG2
    LOG3
    LOG4
  3. To query the asm disks, whether it is in VALID or notVALID state.
    [[email protected] ~]# /etc/init.d/oracleasm querydisk LOG1
    Disk “LOG1” is a valid ASM disk on device [120, 48]
  4. To remove or delete the ASM disks, use below command,
    [[email protected] ~]# /etc/init.d/oracleasm deletedisk LOG1
  5. /usr/sbin/oracleasm-discover — it will discover the asm configured disks with that associated name.
    [[email protected] ~]# /usr/sbin/oracleasm-discover
  6. how to identify the configured ASM disk to physical Disk name as tricky step use the blkid command.
    [[email protected] ~]# /sbin/blkid