这两天在看ORACLE的网络部分的文档,看了最后,唉,好多都是RAC的配置,手上又没现成的环境, 以前的环境又全都扔了,只好安装一个。
根据ORACLE的安装文档一步一步做下来,没什么惊险的。
但共享存储使用的starwind模拟出来的,在LINUX检测时会出现磁盘挂载顺序不对的问题,我还没想出好的办法解决,临时使用以下的方法:
设置CRS在LINUX启动时禁止自动启动
/etc/init.d/init.crs disable
设置RAW的权限,编辑/etc/udev/permissions.d/50* 此文件不支持通配符
# raw devices
ram*:root:disk:0660
#raw/*:root:disk:0660
raw/raw1:root:oinstall:0640
raw/raw2:oracle:oinstall:0640
raw/raw3:oracle:dba:0660
raw/raw4:oracle:dba:0660
raw/raw5:oracle:dba:0660
raw/raw6:oracle:dba:0660
raw/raw7:oracle:dba:0660
raw/raw8:oracle:dba:0660
raw/raw9:oracle:dba:0660
raw/raw10:oracle:dba:0660
raw/raw11:oracle:dba:0660
raw/raw12:oracle:dba:0660
raw/raw13:oracle:dba:0660
raw/raw14:oracle:dba:0660
raw/raw15:oracle:dba:0660
raw/raw16:oracle:dba:0660
raw/raw17:oracle:dba:0660
这样设置以后可以把ISCSI,RAWDEVICES服务停止,在系统启动完成后,启动ISCSI,检查挂载的磁盘顺序是否正确,
fdisk -l
如果不正确,重新启动ISCSI
service iscsi start/restart/stop
直到挂载顺序正确后启动RAW服务会自动设置相关的RAW设备的权限
service rawdevices start/restart/stop
RAW的绑定情况
[root@rac2 ~]# raw -qa
/dev/raw/raw1: bound to major 8, minor 17
/dev/raw/raw2: bound to major 8, minor 18
/dev/raw/raw3: bound to major 8, minor 33
/dev/raw/raw4: bound to major 8, minor 34
/dev/raw/raw5: bound to major 8, minor 35
/dev/raw/raw6: bound to major 8, minor 37
/dev/raw/raw7: bound to major 8, minor 38
/dev/raw/raw8: bound to major 8, minor 39
/dev/raw/raw9: bound to major 8, minor 40
/dev/raw/raw10: bound to major 8, minor 41
/dev/raw/raw11: bound to major 8, minor 42
/dev/raw/raw12: bound to major 8, minor 43
/dev/raw/raw13: bound to major 8, minor 44
/dev/raw/raw14: bound to major 8, minor 45
/dev/raw/raw15: bound to major 8, minor 46
/dev/raw/raw16: bound to major 8, minor 47
/dev/raw/raw17: bound to major 8, minor 19
[root@rac2 ~]#
手工启动CRS
/etc/init.d/init.crs start
[root@rac2 ~]# /etc/init.d/init.crs start
Startup will be queued to init within 90 seconds.
[root@rac2 ~]#
安装 过程中出现
Enter value for datafile:
ERROR:
ORA-12547: TNS:lost contact
一时被这个问题给折腾晕了,看监听发现两个监听还是不太正常,原来的监听:
RAC1上的监听
LISTENER_RAC1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)(IP = FIRST))
)
)
在RAC2上面的127.0.0.1处则使用与rac1-vip同网段的那个IP,我把RAC2上监听改成与RAC1上的一样。
改了后发现还是没解决,又在网上找了半天发现是libaio没安装引起的,实际上在安装日志中已经显示了错误的原因:
oracledevdb1: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
oracledevdb1: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
oracledevdb1: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
oracledevdb1: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
oracledevdb1: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
oracledevdb1: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
为什么出这个错误的,全是手误,太不细心了,在安装libaio时是单独把RPM文件拿 出来安装的,结果文件搞错了,弄成这个了
libao-0.8.5-2.EL.0.i386.rpm
实际上应该是这个
libaio-0.3.105-2.i386.rpm
两个包的开头只差了一个字段i,结果就给搞成如此。以前怎么着也安装过5,6回了,也没出什么问题,还是不细心惹的。
把正确的RMP安装全,安装过程就正常了
[oracle@rac2 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.devdb.db application ONLINE ONLINE rac1
ora....b1.inst application OFFLINE OFFLINE
ora....b2.inst application ONLINE ONLINE rac2
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
[oracle@rac2 ~]$
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/280958/viewspace-704326/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/280958/viewspace-704326/
本文记录了Oracle RAC安装过程中的调试经历,包括解决共享存储挂载顺序问题及libaio缺失导致的错误。通过调整配置和服务启动顺序,最终实现RAC集群正常运行。
1503

被折叠的 条评论
为什么被折叠?



