oracle ASM错误Initializing the Oracle ASMLib driver:[FAILED]

由于搭建rac时遇到了“oracle ASM错误Initializing the Oracle ASMLib driver:[FAILED]”于是上网搜了一下,本文完全是粘贴的chinaUnix论坛的 digdeep126 先生的原创文章。

################################################


Centos 5.8, kernel为:
uname -r
2.6.18-308.el5

安装ASM三个包:
rpm -ivh oracleasm-support-2.1.1-1.el4.i386.rpm
rpm -ivh oracleasm-2.6.18-128.el5-2.0.5-1.el5.i686.rpm
rpm -ivh oracleasmlib-2.0.4-1.el5.i386.rpm

这三个包可以在http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html下载到。

安装完成之后,进行配置
[root@digdeep oracle]# /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]:
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver:                     [FAILED]
[root@digdeep oracle]#
发生了错误。

在晚上找了一下,发现很多类似的错误。大部分说是没有关 selinux,或者版本不对。但是我的selinux在安装centos时,就关闭了。

看一下日志:
[root@digdeep oracle]# cat /var/log/oracleasm
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": failed
Unable to load module "oracleasm"

Loading module "oracleasm": failed
Unable to load module "oracleasm"
... ...
加载oracleasm这个 module 失败

[root@digdeep oracle]# ls -l /lib/modules/
total 16
drwxr-xr-x 3 root root 4096 Dec 29 19:58 2.6.18-128.el5
drwxr-xr-x 6 root root 4096 Dec 29 17:16 2.6.18-308.24.1.el5
drwxr-xr-x 6 root root 4096 Dec 28 04:29 2.6.18-308.el5

[root@digdeep modules]# find -name oracleasm.ko
./2.6.18-128.el5/kernel/drivers/addon/oracleasm/oracleasm.ko

表明:module oracleasm.ko 确实存在!
但是系统不能调用到:
[root@digdeep oracleasm]# /sbin/insmod oracleasm.ko
[root@digdeep oracleasm]# echo $?
0

[root@digdeep oracle]# /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]:
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver:                     [  OK  ]
Scanning the system for Oracle ASMLib disks:               [  OK  ]


错误搞定。

/etc/init.d/oracleasm configure时的错误搞定了,但是在reboot Centos时,又发生了同样的错误:


网上很多说是与kenel的版本不对,于是又重新下载正确的版本的rpm包:
oracleasm-support-2.1.7-1.el5.i386.rpm
oracleasm-2.6.18-308.24.1.el5-2.0.5-1.el5.i686.rpm
oracleasmlib-2.0.4-1.el5.i386.rpm

重新安装:
rpm -Uvh oracleasm-support-2.1.7-1.el5.i386.rpm
rpm -Uvh oracleasm-2.6.18-308.24.1.el5-2.0.5-1.el5.i686.rpm
rpm -Uvh oracleasmlib-2.0.4-1.el5.i386.rpm

然后再 reboot 或者 init 6,发现错误消失:


看来版本正确很重要。

第三个常见的错误是:
ORA-29701: unable to connect to Cluster Manager

解决方法是:
以root身份在$ORACLE_HOME/bin下执行:
localconfig add

如果还不行,则在$ORACLE_HOME/bin执行
localconfig delete
localconfig add

即可解决。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值