March 02, 2013

ASMLib Troubleshooting

ASMLib Troubleshooting in Linux
http://linuxpkd.blogspot.in/2011/07/oracle-asmlib-troubleshooting-in-linux.html


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

2. 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.

3. and ensure the oracleasm module to loaded to kernel.
[root@test1a ~]# lsmod | grep -i oracleasm
oracleasm 84136 1
[root@test1a ~]#

4. Verify the modules info as like,
[root@test1a ~]# 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 <joel.becker@oracle.com>
version: 2.0.5
license: GPL
srcversion: 6D09F6DEC4890E127C660DD
depends:
vermagic: 2.6.18-194.el5 SMP mod_unload gcc-4.1

5. 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.

6. as the configuration part of ASMLib,run /etc/init.d/oracleasm configure as below,
[root@test1a ~]# /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]: 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 ]

7. after oracleasm configured the status of the output should be like below,
[root@test1a ~]# /etc/init.d/oracleasm status
Checking if ASM is loaded: [ OK ]
Checking if /dev/oracleasm is mounted: [ OK ]

8. all the configured ASM disks should exitsts the default mount point location.
[root@test1a ~]# 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
[root@test1a ~]# 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

9. create a disk using by createdisk parameters:
#/etc/init.d/oracleasm createdisk VOL1 /dev/mapper/mapth1

10. For scanning the createdisk or ASM disks as below,
[root@test1a ~]# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]

11. For lists out the ASM disk which is under in ASM, use the below command,
[root@test1a ~]# /etc/init.d/oracleasm listdisks
ARCHLOG
DATA1
DATA2
DATA3
LOG1
LOG2
LOG3
LOG4

12. To query the asm disks, whether it is in VALID or notVALID state.
[root@test1a ~]# /etc/init.d/oracleasm querydisk LOG1
Disk "LOG1" is a valid ASM disk on device [120, 48]

13. To remove or delete the ASM disks, use below command,
[root@test1a ~]# /etc/init.d/oracleasm deletedisk LOG1

14. /usr/sbin/oracleasm-discover -- it will discover the asm configured disks with that associated name.
[root@test1a ~]# /usr/sbin/oracleasm-discover

15. how to identify the configured ASM disk to physical Disk name as tricky step use the blkid command.
[root@test1a ~]# /sbin/blkid

No comments:

Post a Comment