RHEL/OL5 oracleasm listdisks fails not list LVM-managed ASM devices after reboot

[ID 558596.1]

In this Document

  Symptoms
  Cause
  Solution
  References


Applies to:

Linux OS - Version: 2.0.3-1 and later   [Release: OL4 and later ]
Linux OS - Version: 2.6.18 to 2.6.18]
Linux x86
Linux x86-64
**Checked for relevance on 27-Dec-2010***
Linux Kernel - Version: 2.0.3.1
Linux Kernel - Version: 2.6.18 to 2.6.18

Symptoms

Command /etc/init.d/oracleasm listdisks works on LVM dm-* devices until a reboot/restart. Below is the sequence of actions to reproduce the issue.

Note: this article is only applicable when using ASMLib on LVM-managed devices.

 

1. Environment 

# uname -a
Linux host 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19 EDT 2007 x86_64 x86_64  GNU/Linux

# rpm -qa |grep oracleasm
oracleasm-support-2.0.4-1.el5
oracleasm-2.6.18-53.el5-2.0.4-1.el5
oracleasmlib-2.0.3-1.el5

2. Create ASM disk

[root@oel5a ~]#/etc/init.d/oracleasm createdisk DATA2 /dev/oraasm/oraasm-2
Marking disk "/dev/oraasm/oraasm-2" as an ASM disk: 'DATA2

[root@oel5a ~]# /etc/init.d/oracleasm listdisks
DATA2
VOL1

3. Restart oracleasm service and the volume DATA2 was gone

[root@oel5a ~]# /etc/init.d/oracleasm restart
Unmounting ASMlib driver filesystem: [ OK ]
Unloading module "oracleasm": [ OK ]
Loading module "oracleasm": [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]


[root@oel5a ~]# /etc/init.d/oracleasm listdisks
VOL1

[root@oel5a ~]# /sbin/blkid | grep oracleasm
/dev/mapper/oraasm-oraasm-2: LABEL="DATA2" TYPE="oracleasm"
/dev/sdd1: LABEL="VOL1" TYPE="oracleasm"

[root@oel5a ~]# /etc/init.d/oracleasm querydisk /dev/oraasm/oraasm-2
Disk "/dev/oraasm/oraasm-2" is marked an ASM disk with the label "DATA2"

[root@oel5a ~]# more /proc/partitions
major minor #blocks name
.
253 0 6246400 dm-0
253 1 5644288 dm-1

[root@oel5a ~]# lvdisplay /dev/oraasm/oraasm-2
 --- Logical volume ---
LV Name /dev/oraasm/oraasm-2
VG Name oraasm
LV UUID QzwLLd-DSc3-42aA-b3rb-d9T3-ImmH-P9z51D
LV Write Access read/write
LV Status available
# open 0
LV Size 5.38 GB
Current LE 1378
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1

[root@oel5a ~]# ls -l /dev/dm*
ls: /dev/dm*: No such file or directory


Cause

The oracleasm scans /proc/partitions and expects devices to be available in /dev. If the device doesn't exist in /dev it will fail to open the device. RHEL/OL5 does not create dm-xx devices in /dev by default.

Solution

Comment out the following line in file /etc/udev/rules.d/50-udev.rules.
In latest versions of RHEL/OL5, the udev rule has been moved to file /etc/udev/rules.d/90-dm.rules.

#KERNEL=="dm-[0-9]*", ACTION=="add", OPTIONS+="ignore_device"

Reboot and the problem should be gone.

References

BUG:6736803 - ORACLEASM LISTDISKS NOT SHOWING LVM/DM-* DEVICES
NOTE:602952.1 - How To Setup ASM & ASMLIB On Native Linux Multipath Mapper disks?




来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/38267/viewspace-715773/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/38267/viewspace-715773/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值