ITPub博客

首页 > 数据库 > Oracle > 技术篇:Oracle RAC中ASM安装配置方式总结

技术篇:Oracle RAC中ASM安装配置方式总结

Oracle 作者:hitgarylau 时间:2014-02-21 14:33:06 0 删除 编辑
RAC中ASM的配置可以有2种方式实现:raw和asmlib。在我们的安装文档中,更多的用了ASMLIB方式,因为asmlib看起来安装简单且容易理解,而且可借鉴文档很多。但在实际的维护中,Oracle更推荐使用raw的方式。
一、安装配置ASMLIB多路径:
范围:
Oracle Server - Enterprise Edition - Version 10.1.0.2 to 11.2.0.3 [Release 10.1 to 11.2]
Linux x86
Linux x86-64
1. 下载安装ASMLIB API package,安装文档里有详细描述:
[root@rac1 asmlib]# rpm -ivh kernel-*
[root@rac1 asmlib]# rpm -ivh oracleasm*  
[root@rac1 asmlib]# rpm -qa |grep asm
oracleasm-2.6.18-194.el5-2.0.5-1.el5
oracleasmlib-2.0.4-1.el5
oracleasm-support-2.1.3-1.el5
初始化 asmlib,在所有节点执行;
[root@rac1 asmlib]# /usr/sbin/oracleasm configure -I
ASMlib加载到内核,在所有节点执行;
[root@rac1 asmlib]# /usr/sbin/oracleasm init
然后可cat /etc/sysconfig/oracleasm配置文件,应该有如下:
ORACLEASM_SCANORDER="mpath dm"
ORACLEASM_SCANEXCLUDE="sd "
这里设置以便ASMLIB能找到正确的设备文件。
The ORACLEASM_SCANORDER variable specifies disks to be scanned first. The ORACLEASM_SCANEXCLUDE variable specifies the disks that are to be ignored.
2. 用fdisk 对磁盘分区:
磁盘分区,只需要在节点一执行
[root@rac1 2.6.18-92.e15]# fdisk /dev/sdb
3. 用kpartx 命令创建多路径分区
[root@rac1 asmlib]# kpartx -a /dev/mapper/mpath#
这儿#指已经多路径的分组,可能类似:/dev/mapper/mpath0p1, /dev/mapper/mpath0p2
可以这样查看具体存储磁盘名字和大小:
[root@rac2 ~]# multipath –l
mpath2 (36005076304ffd17c0000000000007002) dm-2 IBM,2107900
[size=800G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=0][active]
\_ 5:0:0:2 sdd 8:48  [active][undef]
\_ 5:0:1:2 sdh 8:112 [active][undef]
\_ 6:0:0:2 sdl 8:176 [active][undef]
\_ 6:0:1:2 sdp 8:240 [active][undef]
mpath1 (36005076304ffd17c0000000000007001) dm-1 IBM,2107900
[size=1.0G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=0][active]
\_ 5:0:0:1 sdc 8:32  [active][undef]
\_ 5:0:1:1 sdg 8:96  [active][undef]
\_ 6:0:0:1 sdk 8:160 [active][undef]
\_ 6:0:1:1 sdo 8:224 [active][undef]
mpath0 (36005076304ffd17c0000000000007000) dm-0 IBM,2107900
[size=1.0G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=0][active]
\_ 5:0:0:0 sdb 8:16  [active][undef]
\_ 5:0:1:0 sdf 8:80  [active][undef]
\_ 6:0:0:0 sdj 8:144 [active][undef]
\_ 6:0:1:0 sdn 8:208 [active][undef]
mpath3 (36005076304ffd17c0000000000007100) dm-3 IBM,2107900
[size=1.0T][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=0][active]
\_ 5:0:0:3 sde 8:64  [active][undef]
\_ 5:0:1:3 sdi 8:128 [active][undef]
\_ 6:0:0:3 sdm 8:192 [active][undef]
\_ 6:0:1:3 sdq 65:0  [active][undef]
4. 更新内核分区表:
[root@rac1 ~]# /sbin/partprobe
5. 在新的mapper分区表上创建 asmlib 磁盘,在节点1执行
格式:
# /etc/init.d/oracleasm createdisk    /dev/mapper/mpath
<!-- 正文结束 -->

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

上一篇: 没有了~
下一篇: 没有了~
请登录后发表评论 登录
全部评论