Oracle ASMLib error:Initializing the Oracle ASMLib driver: [FAILED]
在通过OCFS2配置Oracle 10g RAC的时候,有可能会遇到下面的异常:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
[root@node1 ~]# /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@node1 ~]# |
该错误的出现,Oracle ASMLib在配置驱动的过程中失败,具体的报错日志如下:
1 2 3 4 5 6 7 8 9 10 |
[root@node1 ~]# cat /var/log/oracleasm Creating /dev/oracleasm mount point: /dev/oracleasm Loading module "oracleasm": failed Unable to load module "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" [root@node1 ~]# |
可以看到,问题出现在加载模块(module):oracleasm。
事实上,该模块是存在的:
1 2 3 |
[root@node1 ~]# find /lib/modules/ -name oracleasm.ko /lib/modules/2.6.18-371.12.1.el5/kernel/drivers/addon/oracleasm/oracleasm.ko [root@node1 ~]# |
解决上面报错的方法是手动加载模块到Linux系统内核:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
[root@node1 ~]# man insmod insmod(8) insmod(8) NAME insmod — simple program to insert a module into the Linux Kernel SYNOPSIS insmod [filename] [module options ...] DESCRIPTION insmod is a trivial program to insert a module into the kernel: if the filename is a hyphen, the module is taken from standard input. Most users will want to use modprobe(8) instead, which is cleverer. Only the most general of error messages are reported: as the work of trying to link the module is now done inside the kernel, the dmesg usually gives more information about errors. BACKWARDS COMPATIBILITY This version of insmod is for kernels 2.5.48 and above. If it detects a kernel with support for old-style modules (for which much of the work was done in userspace), it will attempt to run insmod.old in its place, so it is completely transparent to the user. COPYRIGHT This manual page Copyright 2002, Rusty Russell, IBM Corporation. SEE ALSO modprobe(8), rmmod(8), lsmod(8), insmod.old(8) insmod(8) [root@node1 ~]# [root@node1 ~]# /sbin/insmod /lib/modules/2.6.18-371.12.1.el5/kernel/drivers/addon/oracleasm/oracleasm.ko [root@node1 ~]# |
再次执行就没问题了:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@node1 ~]# /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 ] [root@node1 ~]# |
——————————————————————————
Ending。