ITPub博客

首页 > Linux操作系统 > Linux操作系统 > RHEL/OL5 oracleasm listdisks fails not list LVM-managed ASM devices after reboot

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

原创 Linux操作系统 作者:spider0283 时间:2012-02-07 17:22:51 0 删除 编辑
[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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-03-29

  • 博文量
    194
  • 访问量
    611195