[转帖]Initializing the Oracle ASMLib driver: [FAILED] on RHEL5.1 asmlib安装详情_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 1901 | 回复: 0   主题: [转帖]Initializing the Oracle ASMLib driver: [FAILED] on RHEL5.1 asmlib安装详情        下一篇 
wzj
注册用户
等级:新兵
经验:67
发帖:64
精华:0
注册:2011-11-15
状态:离线
发送短消息息给wzj 加好友    发送短消息息给wzj 发消息
发表于: IP:您无权察看 2015-1-7 16:00:53 | [全部帖] [楼主帖] 楼主

在安装

11Gr2 Grid infrastructure


前准备中,配置asmlib时遇到了这个错误。

OS:RHEL 5.1


1,查看版本

[root@rac1 ~]# uname -rm
2.6.18-53.el5 i686
[root@ora11 selinux]# lsb_release -a
LSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 5.1 (Tikanga)
Release:        5.1
Codename:       Tikanga


2,下载准备与内核版本相对应的asmlib rpm包,(oracle linux 安装盘中附带)

You must install the following packages, where version is the version of the Automatic Storage Management library driver, arch is the system architecture, and kernel is the version of the kernel that you are using:
oracleasm-support-version.arch.rpm
oracleasm-kernel-version.arch.rpm
oracleasmlib-version.arch.rpm


3,安装rpm

[root@ora11 oracle]# rpm -ivh oracleasmlib-2.0.4-1.el5.i386.rpm
warning: oracleasmlib-2.0.4-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
package oracleasmlib-2.0.4-1.el5 is already installed
[root@ora11 oracle]# rpm -ivh oracleasm-2.6.18-308.el5-2.0.5-1.el5.i686.rpm
warning: oracleasm-2.6.18-308.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
package oracleasm-2.6.18-308.el5-2.0.5-1.el5 is already installed
[root@ora11 oracle]# rpm -ivh oracleasm-support-2.1.7-1.el5.i386.rpm
warning: oracleasm-support-2.1.7-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
package oracleasm-support-2.1.7-1.el5 is already installed
4,#/etc/init.d/oracleasm configure 配置ASM环境
[root@ora11 oracle]# which oracleasm
/usr/sbin/oracleasm
[root@ora11 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  without typing an
answer will keep that current value.  Ctrl-C will abort.
Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [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]


出错有一种原因是启用了selinux,改为禁用

[root@ora11 oracle]# cd /etc/selinux/
[root@ora11 selinux]# vi config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disable
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted


已禁用显示不是这个原因,查看日志

[root@rac1 ~]# tail /var/log/messages
Apr 10 00:11:22 ora11 named[9608]: zone localdomain/IN/localhost_resolver: loaded serial 42
Apr 10 00:11:22 ora11 named[9608]: zone localhost/IN/localhost_resolver: loaded serial 42
Apr 10 00:11:22 ora11 named[9608]: running
Apr 10 00:11:22 ora11 named[9608]: zone 168.168.192.in-addr.arpa/IN/localhost_resolver: sending notifies (serial 1997022700)
Apr 10 00:11:22 ora11 named[9608]: zone anbob.com/IN/localhost_resolver: sending notifies (serial 42)
Apr 10 00:48:41 ora11 modprobe: FATAL: Module oracleasm not found.
Apr 10 00:49:22 ora11 modprobe: FATAL: Module oracleasm not found.


另一种方法自身升级驱动

My final step of configuration to get this working was to use oracleasm to update the driver itself and this seemed to sort itself all out! I ran the command oracleasm update-driver and you can see the result below.
[root@rac1 ~]# oracleasm update-driver
Kernel:         2.6.18-53.el5 i686
Driver name:    oracleasm-2.6.18-53.el5
Latest version: oracleasm-2.6.18-53.el5-2.0.4-1.el5.i686.rpm
Installing driver...
Preparing...                ########################################### [100%]
1:oracleasm-2.6.18-53.el5########################################### [100%]
Driver installed successfully


重新配置

[root@rac1 ~]# /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  without typing an
answer will keep that current value.  Ctrl-C will abort.
Default user to own the driver interface [grid]:
Default group to own the driver interface [asmadmin]:
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  ]


ok,顺利通过

5,填加store device,我是用vmware workstation 8,增加虚拟磁盘(if OS is running new add virtual disk must need reboot)

[root@rac1 ~]# fdisk -l
Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          38      305203+  83  Linux
/dev/sda2              39        3662    29109780   83  Linux
/dev/sda3            3663        3916     2040255   82  Linux swap / Solaris
Disk /dev/sdb: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/sdc: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdc doesn't contain a valid partition table
Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdd doesn't contain a valid partition table


新磁盘分区

[root@rac1 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): m
Command action
a   toggle a bootable flag
b   edit bsd disklabel
c   toggle the dos compatibility flag
d   delete a partition
l   list known partition types
m   print this menu
n   add a new partition
o   create a new empty DOS partition table
p   print the partition table
q   quit without saving changes
s   create a new empty Sun disklabel
t   change a partition's system id
u   change display/entry units
v   verify the partition table
w   write table to disk and exit
x   extra functionality (experts only)
Command (m for help): n
Command action
e   extended
p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-391, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-391, default 391):
Using default value 391
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.


相同的方法,fdisk  n p 1 w
给sdc sdd 分区

[root@rac1 ~]# fdisk -l
Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          38      305203+  83  Linux
/dev/sda2              39        3662    29109780   83  Linux
/dev/sda3            3663        3916     2040255   82  Linux swap / Solaris
Disk /dev/sdb: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         391     3140676   83  Linux
Disk /dev/sdc: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         391     3140676   83  Linux
Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1         391     3140676   83  Linux
[root@rac1 ~]# cat /proc/partitions
major minor  #blocks  name
8     0   31457280 sda
8     1     305203 sda1
8     2   29109780 sda2
8     3    2040255 sda3
8    16    3145728 sdb
8    17    3140676 sdb1
8    32    3145728 sdc
8    33    3140676 sdc1
8    48    3145728 sdd
8    49    3140676 sdd1


创建asm磁盘

# /etc/init.d/oracleasm createdisk DISKNAME devicename
[root@rac1 ~]# /etc/init.d/oracleasm createdisk data1 /dev/sdb1
Marking disk "data1" as an ASM disk: [  OK  ]
[root@rac1 ~]# /etc/init.d/oracleasm createdisk data2 /dev/sdc1
Marking disk "data2" as an ASM disk: [  OK  ]
[root@rac1 ~]# /etc/init.d/oracleasm createdisk data3 /dev/sdd1
Marking disk "data3" as an ASM disk: [  OK  ]
[root@rac1 ~]# /etc/init.d/oracleasm  listdisks
DATA1
DATA2
DATA3


--转自 北京联动北方科技有限公司




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论