Saturday 25 July 2015

ASMLib Troubleshooting in Linux

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
SMLib disk Mapping to physical device
ASMLib disk Mapping to physical device
www.the-playground.de/joomla/index.php?option=com_content&view=article&id=306:ma

# oracleasm querydisk /dev/mapper/vol001
Device "/dev/mapper/vol001" is marked an ASM disk with the label "VOL001"

But what if you want to know what physical device is hidden behind the name of an ASMLib disk?
# oracleasm listdisks
VOL001
VOL002
VOL003
VOL004
...

The first attempt doesn't reveal too much:
# oracleasm querydisk VOL001
Disk "VOL001" is a valid ASM disk

# oracleasm querydisk -v -d VOL001
Disk "VOL001" is a valid ASM disk on device /dev/dm-4[253,4]

# oracleasm querydisk -v -p VOL001
Disk "ORC0001" is a valid ASM disk
/dev/mapper/vol001: LABEL="VOL001" TYPE="oracleasm"

No comments:

Post a Comment