oracle 11gR2 RAC Installation guide

打算部署oracle 11g r2 rac ASM

//操作系统的准备

1.os 版本
oel 5u9 x86_64;物理内存2G;swap 4G。安装oracle-validated包

2.oel rpm package选择

将如下的部分组件中的package全部选中安装
————————————————
Desktop Environments > GNOME Desktop Environment
Applications > Editors
Applications > Graphical Internet
Development > Development Libraries
Development > Development Tools
Servers > Server Configuration Tools
Base System > Administration Tools
Base System > Base
Base System > System Tools
Base System > X Window System
————————————————
需要额外注意:pdksh和unixODBC的rpm包,确保32位、64位的包都安装正确就可以了。

3.编辑主机的/etc/hosts文件,将其中的内容设置为类似如下: Continue reading “oracle 11gR2 RAC Installation guide”

oracle 11gR2 RAC admin(1)

1.关闭某个节点

[root@oel5-112-rac1 bin]# ./crsctl stop cluster -n oel-112-rac2
CRS-4405: The following nodes are unknown to Oracle High Availability Services:
oel-112-rac2
[root@oel5-112-rac1 bin]# ./crsctl stop cluster -n oel5-112-rac2
CRS-2673: Attempting to stop 'ora.crsd' on 'oel5-112-rac2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.gsd' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.OCR_VOTE.dg' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.racdb.db' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.gsd' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.scan1.vip' on 'oel5-112-rac2' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'oel5-112-rac1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.oel5-112-rac2.vip' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.oel5-112-rac2.vip' on 'oel5-112-rac2' succeeded
CRS-2672: Attempting to start 'ora.oel5-112-rac2.vip' on 'oel5-112-rac1'
CRS-2676: Start of 'ora.scan1.vip' on 'oel5-112-rac1' succeeded
CRS-2676: Start of 'ora.oel5-112-rac2.vip' on 'oel5-112-rac1' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac1'
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'oel5-112-rac1' succeeded
CRS-2677: Stop of 'ora.OCR_VOTE.dg' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.racdb.db' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.FLASHAREA.dg' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.DATA.dg' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.FLASHAREA.dg' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.asm' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.eons' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.ons' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.ons' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.net1.network' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.eons' on 'oel5-112-rac2' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'oel5-112-rac2' has completed
CRS-2677: Stop of 'ora.crsd' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.ctssd' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.evmd' on 'oel5-112-rac2'
CRS-2673: Attempting to stop 'ora.asm' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.cssdmonitor' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.evmd' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'oel5-112-rac2' succeeded
CRS-2677: Stop of 'ora.asm' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.cssd' on 'oel5-112-rac2' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'oel5-112-rac2'
CRS-2677: Stop of 'ora.diskmon' on 'oel5-112-rac2' succeeded

在oel5-112-rac2上的resource应该都关闭掉了,可以在另外一个节点oel5-112-rac1上看到关闭的resource都启动到另外节点了。

从下面这条信息可以看出,rac2节点上的crs被关闭了 Continue reading “oracle 11gR2 RAC admin(1)”

oracle 11gR2 RAC “oc4j” and “gsd” resource offline

11gR2 RAC安装完毕后,缺省oc4j这个resource是offline的。

[grid@oel5-112-rac1 ~]$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    oel5...rac1
ora....AREA.dg ora....up.type ONLINE    ONLINE    oel5...rac1
ora....ER.lsnr ora....er.type ONLINE    ONLINE    oel5...rac1
ora....N1.lsnr ora....er.type ONLINE    ONLINE    oel5...rac2
ora....VOTE.dg ora....up.type ONLINE    ONLINE    oel5...rac1
ora.asm        ora.asm.type   ONLINE    ONLINE    oel5...rac1
ora.eons       ora.eons.type  ONLINE    ONLINE    oel5...rac1
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE
ora....network ora....rk.type ONLINE    ONLINE    oel5...rac1
ora.oc4j       ora.oc4j.type  OFFLINE   OFFLINE
ora....SM1.asm application    ONLINE    ONLINE    oel5...rac1
ora....C1.lsnr application    ONLINE    ONLINE    oel5...rac1
ora....ac1.gsd application    OFFLINE   OFFLINE
ora....ac1.ons application    ONLINE    ONLINE    oel5...rac1
ora....ac1.vip ora....t1.type ONLINE    ONLINE    oel5...rac1
ora....SM2.asm application    ONLINE    ONLINE    oel5...rac2
ora....C2.lsnr application    ONLINE    ONLINE    oel5...rac2
ora....ac2.gsd application    OFFLINE   OFFLINE
ora....ac2.ons application    ONLINE    ONLINE    oel5...rac2
ora....ac2.vip ora....t1.type ONLINE    ONLINE    oel5...rac2
ora.ons        ora.ons.type   ONLINE    ONLINE    oel5...rac1
ora.racdb.db   ora....se.type ONLINE    ONLINE    oel5...rac1
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    oel5...rac2

尝试启动oc4j的resource

[grid@oel5-112-rac1 ~]$ srvctl start oc4j
OC4J could not be started
PRCR-1079 : Failed to start resource ora.oc4j
CRS-2501: Resource 'ora.oc4j' is disabled

需要先enable oc4j这个resource

[grid@oel5-112-rac1 ~]$ srvctl enable oc4j

再尝试启动oc4j这个resource

[grid@oel5-112-rac1 ~]$ srvctl start oc4j

[grid@oel5-112-rac1 ~]$ crs_stat -t|grep oc4j

ora.oc4j ora.oc4j.type ONLINE ONLINE oel5…rac1

还剩下gsd三个resource是offline的,接下来搞定gsd相关resource。

[grid@oel5-112-rac1 ~]$ srvctl status nodeapps
VIP oel5-112-rac1-vip is enabled
VIP oel5-112-rac1-vip is running on node: oel5-112-rac1
VIP oel5-112-rac2-vip is enabled
VIP oel5-112-rac2-vip is running on node: oel5-112-rac2
Network is enabled
Network is running on node: oel5-112-rac1
Network is running on node: oel5-112-rac2
GSD is disabled
GSD is not running on node: oel5-112-rac1
GSD is not running on node: oel5-112-rac2
ONS is enabled
ONS daemon is running on node: oel5-112-rac1
ONS daemon is running on node: oel5-112-rac2
eONS is enabled
eONS daemon is running on node: oel5-112-rac1
eONS daemon is running on node: oel5-112-rac2

可以看出:GSD is disabled,思路还是先enable GSD,然后启动

[grid@oel5-112-rac1 ~]$ srvctl enable nodeapps
PRKO-2415 : VIP is already enabled on node(s): oel5-112-rac1,oel5-112-rac2
PRKO-2416 : Network resource is already enabled.
PRKO-2417 : ONS is already enabled on node(s): oel5-112-rac1,oel5-112-rac2
PRKO-2418 : eONS is already enabled on node(s): oel5-112-rac1,oel5-112-rac2

再次查看nodeapps的enable情况

[grid@oel5-112-rac1 ~]$ srvctl status nodeapps
VIP oel5-112-rac1-vip is enabled
VIP oel5-112-rac1-vip is running on node: oel5-112-rac1
VIP oel5-112-rac2-vip is enabled
VIP oel5-112-rac2-vip is running on node: oel5-112-rac2
Network is enabled
Network is running on node: oel5-112-rac1
Network is running on node: oel5-112-rac2
GSD is enabled
GSD is not running on node: oel5-112-rac1
GSD is not running on node: oel5-112-rac2
ONS is enabled
ONS daemon is running on node: oel5-112-rac1
ONS daemon is running on node: oel5-112-rac2
eONS is enabled
eONS daemon is running on node: oel5-112-rac1
eONS daemon is running on node: oel5-112-rac2

启动GSD服务

[grid@oel5-112-rac1 ~]$ srvctl start nodeapps
PRKO-2421 : Network resource is already started on node(s): oel5-112-rac1,oel5-112-rac2
PRKO-2420 : VIP is already started on node(s): oel5-112-rac1,oel5-112-rac2
PRKO-2420 : VIP is already started on node(s): oel5-112-rac1,oel5-112-rac2
PRKO-2422 : ONS is already started on node(s): oel5-112-rac1,oel5-112-rac2
PRKO-2423 : eONS is already started on node(s): oel5-112-rac1,oel5-112-rac2

gsd相关的nodeapps都启动了

[grid@oel5-112-rac1 ~]$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    oel5...rac1
ora....AREA.dg ora....up.type ONLINE    ONLINE    oel5...rac1
ora....ER.lsnr ora....er.type ONLINE    ONLINE    oel5...rac1
ora....N1.lsnr ora....er.type ONLINE    ONLINE    oel5...rac2
ora....VOTE.dg ora....up.type ONLINE    ONLINE    oel5...rac1
ora.asm        ora.asm.type   ONLINE    ONLINE    oel5...rac1
ora.eons       ora.eons.type  ONLINE    ONLINE    oel5...rac1
ora.gsd        ora.gsd.type   ONLINE    ONLINE    oel5...rac1
ora....network ora....rk.type ONLINE    ONLINE    oel5...rac1
ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    oel5...rac1
ora....SM1.asm application    ONLINE    ONLINE    oel5...rac1
ora....C1.lsnr application    ONLINE    ONLINE    oel5...rac1
ora....ac1.gsd application    ONLINE    ONLINE    oel5...rac1
ora....ac1.ons application    ONLINE    ONLINE    oel5...rac1
ora....ac1.vip ora....t1.type ONLINE    ONLINE    oel5...rac1
ora....SM2.asm application    ONLINE    ONLINE    oel5...rac2
ora....C2.lsnr application    ONLINE    ONLINE    oel5...rac2
ora....ac2.gsd application    ONLINE    ONLINE    oel5...rac2
ora....ac2.ons application    ONLINE    ONLINE    oel5...rac2
ora....ac2.vip ora....t1.type ONLINE    ONLINE    oel5...rac2
ora.ons        ora.ons.type   ONLINE    ONLINE    oel5...rac1
ora.racdb.db   ora....se.type ONLINE    ONLINE    oel5...rac1
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    oel5...rac2

一个疑问:

缺省oracle 11g r2 rac安装完毕后,gsd和oc4j都是disable的?那干嘛放到crs中呢?

–EOF–

CRS-0184: Cannot communicate with the CRS daemon

客户那边发来了个报错信息:CRS-0184: Cannot communicate with the CRS daemon。这个报错太泛泛了。大致的意思是crs的通讯存在问题,也可能crs就没有启动。

客户的环境:oracle linux 5 update 9 +oracle 11.2.0.1 双节点 RAC。

远程登录用户的环境,执行了几条基本健康状况的查询。

查看CRS状态,CRS状态明显不对了。

[grid@oel5-112-rac1 ~]$ crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

查看votedisk状态,votedisk状态正常。


[grid@oel5-112-rac1 ~]$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   272b2097f2ef4fb4bf8cfd17fe8e7f69 (/dev/oracleasm/disks/OCR_VOTE03) [OCR_VOTE]
 2. ONLINE   9de9a00377c74ffdbf71248433b9f6c6 (/dev/oracleasm/disks/OCR_VOTE02) [OCR_VOTE]
 3. ONLINE   74b44406eb034f08bf3687d5a61af96d (/dev/oracleasm/disks/OCR_VOTE01) [OCR_VOTE]
Located 3 voting disk(s).

查看OCR的状态,OCR也是ok的。

[grid@oel5-112-rac1 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2536
         Available space (kbytes) :     259584
         ID                       :   13378993
         Device/File Name         :  +ocr_vote
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check bypassed due to non-privileged user

既然ocr和votedisk都是正常的,而ocr和votedisk都在ASM disk group->+OCR_VOTE上,很可能是asm instance没有启动。

启动asm instance,问题得到解决。

[grid@oel5-112-rac1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 17 13:48:33 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ASM instance started

Total System Global Area  283930624 bytes
Fixed Size                  2212656 bytes
Variable Size             256552144 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted

再次查看整个集群的状态

[grid@oel5-112-rac2 ~]$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    oel5...rac1
ora....AREA.dg ora....up.type ONLINE    ONLINE    oel5...rac1
ora....ER.lsnr ora....er.type ONLINE    ONLINE    oel5...rac1
ora....N1.lsnr ora....er.type ONLINE    ONLINE    oel5...rac2
ora....VOTE.dg ora....up.type ONLINE    ONLINE    oel5...rac1
ora.asm        ora.asm.type   ONLINE    ONLINE    oel5...rac1
ora.eons       ora.eons.type  ONLINE    ONLINE    oel5...rac1
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE
ora....network ora....rk.type ONLINE    ONLINE    oel5...rac1
ora.oc4j       ora.oc4j.type  OFFLINE   OFFLINE
ora....SM1.asm application    ONLINE    ONLINE    oel5...rac1
ora....C1.lsnr application    ONLINE    ONLINE    oel5...rac1
ora....ac1.gsd application    OFFLINE   OFFLINE
ora....ac1.ons application    ONLINE    ONLINE    oel5...rac1
ora....ac1.vip ora....t1.type ONLINE    ONLINE    oel5...rac1
ora....SM2.asm application    ONLINE    ONLINE    oel5...rac2
ora....C2.lsnr application    ONLINE    ONLINE    oel5...rac2
ora....ac2.gsd application    OFFLINE   OFFLINE
ora....ac2.ons application    ONLINE    ONLINE    oel5...rac2
ora....ac2.vip ora....t1.type ONLINE    ONLINE    oel5...rac2
ora.ons        ora.ons.type   ONLINE    ONLINE    oel5...rac1
ora.racdb.db   ora....se.type ONLINE    ONLINE    oel5...rac2
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    oel5...rac2

OCR和VOTEDISK都在ASM diskgroup上,asm instance不启动,CRS肯定是无法通讯的。

–EOF–

stop pushing

资所不欲,勿施于人;己所欲,也勿施于人。

从今往后,唯一能push的人,就是我自己了。不能再push你爱的人,尤其她认可这种方式。

你可以对自己狠一些,但别套用这种方式在别人身上。

切记。

 

blur 13

记得第一次见这个乐队是在南湖,人形logo格外的猥琐,像是受了气的小媳妇,哀怨的很。不过还好,时间过去,也便慢慢接受。我发现人的适应能力挺强的,有时令自己都感到吃惊。

姥爷走了,看着姥爷最后一面,感叹时间的力量,温柔的像把刀子,慢慢刺痛你。人这一辈子,从25年到13年,我会忍不住发呆,想教科书上那些关键的时点,姥爷当时的样子、在干什么。37年日本人在卢沟桥时,远在江苏的姥爷在做什么,是不是和我12岁的时候一样,在无忧无虑的玩耍;66年文革开始,不惑之年的姥爷又在哪里呢?带着母亲、姨妈,是不是在为吃的发愁呢?那89年呢?,姥爷是如何看待的呢?….也许,是我自己想太多了,让时间来抹平这一切吧。所有的纷争、苦恼,在当时那刻,都觉得微不足道,不过如此。再大,还能大过生命?

来去匆匆,从南到北,这一切都是值得的,就像”life of pie”里面说的一样,我得停住脚步,和自己生命中珍贵的人,道个别。我5.1强行拉着母亲回去看那一趟,现在想来真是最有必要的决定,生前不看,死后道别,这必定是生命中的遗憾,而这个决定,是需要我强迫母亲做的,她太懦弱,下不了这个决定,而且有万般借口,即使这看起来多么的天经地义。

没错,这就是天经地义,父母过逝,你不送,谁送?再简单不过了。

不过,一切随它去吧,时间会搞定这一切,无需徒增烦恼。

–EOF–