时间就像海绵里的水,挤一挤,还是有
gns(dhcp+dns)
个人认为,如果单单是为了 oracle 的实施,gns 也只是锦上添花的作用,不使用 gns 同样可 以实现服务器端的 taf,gns 依赖于 dhcp 和 dns 服务器,使用 gns 代表着需要额外的服务器 开销,并且又多了一处单点故障 。 一般比较大型的企业内部为了节省网络带宽,会有自己
的 dns 服务器。这时候使用就比 较合 理了。
根据上面的图示,简单的理解为 gns 负责 vip 和 scanip 的解决方案。所以,dns 服务器上面 配置的东西较少,只需要将 scan_domain 转发给 gns 即可。下面有几个 和 gns 相关的后台进程说明,有兴趣的可以自己看一下。
摘抄几份英文资料来自于 Pro Oracle Database 11g RAC on Linux page 386
The Grid Plug And Play (GPnP) daemon: This daemon maintains the Grid Plug andPlay profile and coordinates distribution of updates across all nodes in the cluster.
This helps ensure that all nodes have the current profile. The Grid Plug and Play
profile essentially contains sufficient information to start Clusterware. In previous
versions, this information could be stored directly in the OCR. However, in Oracle
11gR2, the OCR can optionally be stored in ASM, which means sufficient
configuration information must be available to start ASM and to access the OCR.
(The GPNP daemon is sometimes referred to by the initials, GPNPD).
The Grid Interprocess Communication (GIPC) daemon: This daemon is new in
Oracle 11gR2. The daemon process is gipcd, and it supports Grid Infrastructure
时间就像海绵里的水,挤一挤,还是有
Communication. Although this daemon is created when High Availability Services
stack is started, GIPC has no functionality in this release. There are plans to
activate GIPC in a future release.
• The multicast DNS (mDNS) service: This service manages name resolution and
service discovery within the cluster. It resolves DNS requests on behalf of the Grid
Naming Service (GNS). A separate daemon is created within the High Availability
Services stack to support multicast DNS.
• The Grid Naming Service (GNS): This service performs name resolution within the
cluster. It is implemented by the gnsd daemon, and it provides a gateway between
the cluster mDNS service and the external DNS servers.
配置 dns
linux 下只需配置一个正向解析即可zone “ha-scan.grid.orcl.com” {
type forward;forward only ;forwarders {192.168.100.185 port 53 ;};
}
笔者使用的是 windows2003
配置一个正向作 用域配置新主 机 gns-vip
时间就像海绵里的水,挤一挤,还是有
配置 dhcp
作用域用大一点就可以了。
节点配置
[oracle@oel1 grid]$ ./runcluvfy.sh stage -pre crsinst -n oel1,oel2 -fixup –verbose
Pre-check for cluster services setup was successful.
看一 下 hosts 文件配置# Do not remove the following line, or various programs# that require network functionality will fail.127.0.0.1 localhost192.168.100.210 oel1.orcl.com oel1192.168.10.210 oel1-priv.orcl.com oel1-priv
192.168.100.211 oel2.orcl.com oel2192.168.10.211 oel2-priv.orcl.com oel2-priv
看一 下 dns 客户端配置
时间就像海绵里的水,挤一挤,还是有
[oracle@oel2 ~]$ strings /etc/resolv.conf search grid.dexs.comnameserver 192.168.100.200
[oracle@oel2 ~]$ nslookup gns-vip.grid.orcl.comServer: 192.168.100.200Address: 192.168.100.200#53
Name: gns-vip.grid.orcl.comAddress: 192.168.100.185
看一下裸设备权限[oracle@oel2 ~]$ ll /dev/raw total 0crw------- 1 oracle oinstall 162, 1 May 17 15:10 raw1 crw------- 1 oracle oinstall 162, 2 May 17 15:10 raw2 crw------- 1 oracle oinstall 162, 3 May 17 15:10 raw3 crw------- 1 oracle oinstall 162, 4 May 17 15:10 raw4 crw------- 1 oracle oinstall 162, 5 May 17 15:10 raw5
安装了
时间就像海绵里的水,挤一挤,还是有
执行脚本千万记住要使 用 root 用户顺序:oel1:orainstRoot.sh----->oel2:orainstRoot.sh------->oel1:root.sh------>oel2:root.sh
[root@oel1 ~]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group.Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.The execution of the script is complete.
[root@oel1 ~]# /u01/app/11.2.0/grid/root.sh输出情况请看链接[root@oel2 ~]# /u01/app/11.2.0/grid/root.sh输出情况请看链接
ok 两个节点执行结束
时间就像海绵里的水,挤一挤,还是有
安装结束
[oracle@oel1 ~]$ crsctl stat res -t--------------------------------------------------------------------------------NAME TARGET STATE SERVER STATE_DETAILS-------------------------------------------------------------------------------- Local Resources--------------------------------------------------------------------------------ora.DATA.dg
ora.LISTENER.lsnr
ora.asm
ora.eons ora.gsd
ora.net1.network
ora.ons
ONLINE ONLINE oel1ONLINE ONLINE oel2
ONLINE ONLINE oel1ONLINE ONLINE oel2
ONLINE ONLINE oel1 StartedONLINE ONLINE oel2 Started
ONLINE ONLINE oel1ONLINE ONLINE oel2
OFFLINE OFFLINE oel1OFFLINE OFFLINE oel2
ONLINE ONLINE oel1ONLINE ONLINE oel2
ONLINE ONLINE oel1ONLINE ONLINE oel2
-------------------------------------------------------------------------------- Cluster Resources-------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE oel2ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE oel1 ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE oel1ora.gns
1 ONLINE ONLINE oel1ora.gns.vip
1 ONLINE ONLINE oel1
时间就像海绵里的水,挤一挤,还是有
ora.oc4j1 OFFLINE OFFLINE
ora.oel1.vip1 ONLINE ONLINE oel1
ora.oel2.vip1 ONLINE ONLINE oel2
ora.scan1.vip1 ONLINE ONLINE oel2
ora.scan2.vip1 ONLINE ONLINE oel1
ora.scan3.vip1 ONLINE ONLINE oel1
额外绑定 的 ip:节点 的 vip*2 gns_vip*1scan_vip*3一共额外绑定 6 个 ip
从上面的输出可以看到ora.gns 和 ora.gns.vip 都是 作为 Cluster Resources 来管理的。所以不用担心单点故障,服务
会 自动 failover。
客户端配置
客户 端 dns 服务器配置
测试一下C:\Users\dex>nslookup ha-scan.grid.orcl.com服务器: UnKnownAddress: 192.168.100.200
非权威应答:名称: ha-scan.grid.orcl.comAddresses: 192.168.100.222
192.168.100.221
时间就像海绵里的水,挤一挤,还是有
192.168.100.228
C:\Users\dex>nslookup ha-scan.grid.orcl.com服务器: UnKnownAddress: 192.168.100.200
非权威应答:名称: ha-scan.grid.orcl.comAddresses: 192.168.100.222
192.168.100.228192.168.100.221
可以看到,它是轮循的方式
看一 下 lsnr 状况C:\Users\dex>tnsping ha-scan.grid.orcl.com
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 17-MAY-2012 16:07:37
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:D:\apps\work\db\oracle11g\product\11.2.0\dbhome_1\NETWORK\ADMIN\sqlnet.ora
Used EZCONNECT adapter to resolve the aliasAttempting to contact(DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.222)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.221)(PORT=1521))(ADDR ESS=(PROTOCOL=TCP)(HOST=192.168.100.228)(PORT=1521)))OK (20 msec)
看一下 scan 的状态(11gr2 以后主张使用 crsctl 和 srvctl 这两个命令,功能增加了不少,大家可以看看, 让 crs_stat、crs_start、crs_stop 拜拜吧)[oracle@oel1 ~]$ srvctl config scanSCAN name: ha-scan.grid.orcl.com, Network: 1/192.168.100.0/255.255.255.0/eth0SCAN VIP name: scan1, IP: /192.168.100.221/192.168.100.221SCAN VIP name: scan2, IP: /192.168.100.222/192.168.100.222SCAN VIP name: scan3, IP: /192.168.100.228/192.168.100.228因为这里没有反向解析,所以这里没有出现域名,无伤大雅。
[oracle@oel1 ~]$ srvctl status scanSCAN VIP scan1 is enabledSCAN VIP scan1 is running on node oel2SCAN VIP scan2 is enabled
时间就像海绵里的水,挤一挤,还是有
SCAN VIP scan2 is running on node oel1SCAN VIP scan3 is enabledSCAN VIP scan3 is running on node oel1
[oracle@oel1 ~]$ lsnrctl stat LISTENER_SCAN2
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 17-MAY-2012 16:52:03
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2))) STATUS of the LISTENER------------------------Alias LISTENER_SCAN2Version TNSLSNR for Linux: Version 11.2.0.1.0 - ProductionStart Date 17-MAY-2012 15:51:24Uptime 0 days 1 hr. 0 min. 39 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /u01/app/11.2.0/grid/network/admin/listener.oraListener Log File /u01/app/oracle/diag/tnslsnr/oel1/listener_scan2/alert/log.xmlListening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)
(KEY=LISTENER_SCAN2))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.222)(PORT=1521)))
The listener supports no servicesThe command completed successfully
without gns
不启 用 gns 服务,有两种方式,一种是通 过 dns 解析 scan_listener 一种是直接使用/etc/hosts 文件来解析,这里只讲一下最简单的使用/etc/hosts 文件解析的安装过程。其实
和 10g 是一 样的,只是需要增加一 个 scan_vip。
时间就像海绵里的水,挤一挤,还是有
hosts 文件的配置
两个节点 的 hosts 文件:[root@oel1 ~]# vi /etc/hosts# Do not remove the following line, or various programs# that require network functionality will fail.127.0.0.1 localhost192.168.100.210 oel1.dex.com oel1192.168.10.210 oel1-priv.dex.com oel1-priv192.168.100.212 oel1-vip.dex.com oel1-vip
192.168.100.211 oel2.dex.com oel2192.168.10.211 oel2-priv.dex.com oel2-priv192.168.100.213 oel2-vip.dex.com oel2-vip
192.168.100.220 ha-scan.dex.com ha-scan
验证一下:[oracle@oel1 grid]$ ./runcluvfy.sh stage -pre crsinst -n oel1,oel2 -fixup –verbosePre-check for cluster services setup was successful.
[oracle@oel1 grid]$ ls -l /dev/raw total 0crw------- 1 oracle oinstall 162, 1 May 19 14:36 raw1 crw------- 1 oracle oinstall 162, 2 May 19 14:36 raw2 crw------- 1 oracle oinstall 162, 3 May 19 14:36 raw3 crw------- 1 oracle oinstall 162, 4 May 19 14:36 raw4crw------- 1 oracle oinstall 162, 5 May 19 14:36 raw5
开始安装
时间就像海绵里的水,挤一挤,还是有
执行脚 本 注意顺序和权限[root@oel1 ~]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group.Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.The execution of the script is complete.
[root@oel2 ~]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group.Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.The execution of the script is complete.
[root@oel1 ~]# /u01/app/11.2.0/grid/root.sh
[root@oel2 ~]# /u01/app/11.2.0/grid/root.sh
两个节点安装结束后点击 ok
时间就像海绵里的水,挤一挤,还是有
会报这个错误,看一下日志文件会有这样一段信息
vi /u01/app/oraInventory/logs/installActions2012-05-19_02-56-24PM.log
INFO: Checking Single Client Access Name (SCAN)...
时间就像海绵里的水,挤一挤,还是有
INFO: Checking name resolution setup for "ha-scan"... INFO: ERROR:INFO: PRVF-4664 : Found inconsistent name resolution entries for SCAN name "ha-scan"INFO: ERROR:INFO: PRVF-4657 : Name resolution setup check for "ha-scan" (IP address: 192.168.100.220)failedINFO: ERROR:INFO: PRVF-4664 : Found inconsistent name resolution entries for SCAN name "ha-scan" INFO: Verification of SCAN VIP and Listener setup failed
这是因为你使用 了 hosts 文件代替 了 dns or gns 所导致的。 没关系,现在只要两个节点能 够 ping 通 scan vip 即可[oracle@oel1 bin]$ ping ha-scanPING ha-scan.dex.com (192.168.100.220) 56(84) bytes of data.64 bytes from ha-scan.dex.com (192.168.100.220): icmp_seq=1 ttl=64 time=0.021 ms
[root@oel2 ~]# ping ha-scanPING ha-scan.dex.com (192.168.100.220) 56(84) bytes of data.64 bytes from ha-scan.dex.com (192.168.100.220): icmp_seq=1 ttl=64 time=2.37 ms
直接 next
时间就像海绵里的水,挤一挤,还是有
安装结束
看一下状态
[oracle@oel1 bin]$ crsctl stat res -t--------------------------------------------------------------------------------NAME TARGET STATE SERVER STATE_DETAILS-------------------------------------------------------------------------------- Local Resources--------------------------------------------------------------------------------ora.DATA.dg
ora.LISTENER.lsnr
ora.asm
ora.eons ora.gsd
ora.net1.network
ora.ons
ONLINE ONLINE oel1ONLINE ONLINE oel2
ONLINE ONLINE oel1ONLINE ONLINE oel2
ONLINE ONLINE oel1 StartedONLINE ONLINE oel2 Started
ONLINE ONLINE oel1ONLINE ONLINE oel2
OFFLINE OFFLINE oel1OFFLINE OFFLINE oel2
ONLINE ONLINE oel1ONLINE ONLINE oel2
ONLINE ONLINE oel1ONLINE ONLINE oel2
-------------------------------------------------------------------------------- Cluster Resources--------------------------------------------------------------------------------ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE oel1 ora.oc4j
1 OFFLINE OFFLINEora.oel1.vip
1 ONLINE ONLINE oel1 ora.oel2.vip
1 ONLINE ONLINE oel2
现在只有一 个 scan1 vip。
手动备份一下
[root@oel1 bin]# ./ocrconfig -manualbackup
oel1/u
2012/05/19
时间就像海绵里的水,挤一挤,还是有
ora.scan1.vip1 ONLINE ONLINE oel1
15:53:05
[root@oel1 bin]# ./ocrconfig -showbackupPROT-24: Auto backups for the Oracle Cluster Registry are not available
oel1 2012/05/19 15:53:05/u01/app/11.2.0/grid/cdata/ha/backup_20120519_155305.ocr
客户端配置
C:\Users\dex>tnsping 192.168.100.220:1521
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 19-MAY-2012 16:05:59
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:D:\apps\work\db\oracle11g\product\11.2.0\dbhome_1\NETWORK\ADMIN\sqlnet.ora
Used EZCONNECT adapter to resolve the aliasAttempting to contact(DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.220)(PORT=1521))) OK (100 msec)
余下的就不说了。
时间就像海绵里的水,挤一挤,还是有
修改 hosts 文件
将 vip 和 scanvip 条目删掉vi /etc/hostsDo not remove the following line, or various programs# that require network functionality will fail.127.0.0.1 localhost192.168.100.210 oel1.dex.com oel1192.168.10.210 oel1-priv.dex.com oel1-priv
192.168.100.211 oel2.dex.com oel2192.168.10.211 oel2-priv.dex.com oel2-priv
修改 dns 设置
vi /etc/resolv.conf search grid.dex.com nameserver 192.168.100.200
时间就像海绵里的水,挤一挤,还是有
两个节点测试一下
[root@oel1 bin]# nslookup gns-vip.grid.dex.comServer: 192.168.100.200Address: 192.168.100.200#53
Name: gns-vip.grid.dex.comAddress: 192.168.100.123
添加 gns 服务
root 用户执行
[root@oel1 bin]# ./srvctl add gns -i 192.168.100.123 -d grid.dex.com
修改 network 配置(这句是关键)
11.2.0.2 里面可以使用srvctl modify network -w dhcp来修 改 network 获取 ip 地址的方式如果没有这步下面添加 scan 的时候就会报错, 因为 orarootagent 不会使 用 dhcp 的方式获取vip 或 者 scan_vip[root@oel1 bin]# ./crsctl modify resource ora.net1.network -attr "USR_ORA_AUTO=dhcp"
配置 scan
[root@oel1 bin]# ./srvctl stop scan_listener[root@oel1 bin]# ./srvctl remove scan –f[root@oel1 bin]# ./srvctl remove scan_listener –f
[root@oel1 bin]# ./srvctl add scan -n ha-scan.grid.dex.com[root@oel1 bin]# ./srvctl config scanSCAN name: ha-scan.grid.dex.com, Network: 1/192.168.100.0/255.255.255.0/eth0SCAN VIP name: scan1, IP: <not assigned> SCAN VIP name: scan2, IP: <not assigned> SCAN VIP name: scan3, IP: <not assigned>
重启一下[root@oel1 bin]# ./crsctl stop cluster –all
ONLINE ONLINE oel1ONLINE ONLINE oel2
ora.LISTENER.lsnrONLINE ONLINE oel1ONLINE ONLINE oel2
ora.asmONLINE ONLINE oel1 StartedONLINE ONLINE oel2 Started
ora.eonsONLINE ONLINE oel1ONLINE ONLINE oel2
ora.gsd
时间就像海绵里的水,挤一挤,还是有
[root@oel1 bin]# ./crsctl start cluster -all
[oracle@oel1 ~]$ srvctl config scanSCAN name: ha-scan.grid.dex.com, Network: 1/192.168.100.0/255.255.255.0/eth0SCAN VIP name: scan1, IP: /192.168.100.221/192.168.100.221SCAN VIP name: scan2, IP: /192.168.100.222/192.168.100.222SCAN VIP name: scan3, IP: /192.168.100.228/192.168.100.228
配置 vip
./srvctl stop listener
./srvctl stop vip -n oel1
./srvctl stop vip -n oel2
./srvctl stop nodeapps –f
./srvctl remove nodeapps -f
./srvctl add nodeapps -S 192.168.100.0/255.255.255.0/eth0 -l 6100 -r 6200
./srvctl config nodeapps
[root@oel1 bin]# ./crsctl stop cluster –all[root@oel1 bin]# ./crsctl start cluster -all
看一下状态[oracle@oel1 admin]$ crsctl stat res -t--------------------------------------------------------------------------------NAME TARGET STATE SERVER STATE_DETAILS-------------------------------------------------------------------------------- Local Resources-------------------------------------------------------------------------------- ora.DATA.dg
时间就像海绵里的水,挤一挤,还是有
ora.net1.network
ora.ons
OFFLINE OFFLINE oel1OFFLINE OFFLINE oel2
ONLINE ONLINE oel1ONLINE ONLINE oel2
ONLINE ONLINE oel1ONLINE ONLINE oel2
-------------------------------------------------------------------------------- Cluster Resources-------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE oel2 ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE oel1 ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE oel1ora.gns
1 ONLINE ONLINE oel1ora.gns.vip
1 ONLINE ONLINE oel1 ora.oc4j
1 OFFLINE OFFLINEora.oel1.vip
1 ONLINE ONLINE oel1 ora.oel2.vip
1 ONLINE ONLINE oel2 ora.scan1.vip
1 ONLINE ONLINE oel2 ora.scan2.vip
1 ONLINE ONLINE oel1 ora.scan3.vip
1 ONLINE ONLINE oel1
配置客户端和上面所说的一样客户端 的 dns 服务器要设置为 192.168.100.200C:\Users\dex>tnsping ha-scan.grid.dex.com
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 19-MAY-2012 22:30:30
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files: D:\apps\work\db\oracle11g\product\11.2.0\dbhome_1\NETWORK\ADMIN\sqlnet.ora
时间就像海绵里的水,挤一挤,还是有
Used EZCONNECT adapter to resolve the aliasAttempting to contact(DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.221)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.222)(PORT=1521))(ADDR ESS=(PROTOCOL=TCP)(HOST=192.168.100.228)(PORT=1521)))OK (100 msec)
ok
删除 gns 服务
先备份一下,错了还可以恢复。
[root@oel2 bin]# ./ocrconfig -manualbackup
oel1/u01/app/11.2.0/grid/cdata/ha/backup_20120518_151633.ocr
2012/05/18 15:16:33
oel1/u01/app/11.2.0/grid/cdata/ha/backup_20120518_151624.ocr
2012/05/18 15:16:24
oel1/u01/app/11.2.0/grid/cdata/ha/backup_20120518_151619.ocr
2012/05/18 15:16:19
首先停止 scan 和 scan_listener
[root@oel1 bin]# ./srvctl stop scan_listener[root@oel1 bin]# ./srvctl stop scan
删除 scan 和 scan_listener
[root@oel1 bin]# ./srvctl remove scan_listenerRemove scan listener? (y/[n]) y [root@oel1 bin]# ./srvctl remove scan Remove the scan? (y/[n]) y
时间就像海绵里的水,挤一挤,还是有
删除 gns
[root@oel1 bin]# ./srvctl stop gns [root@oel1 bin]# ./srvctl remove gns Remove GNS? (y/[n]) y
修改 host 文件
[root@oel1 bin]# vi /etc/hosts
# Do not remove the following line, or various programs# that require network functionality will fail.127.0.0.1 localhost192.168.100.210 oel1.dex.com oel1192.168.10.210 oel1-priv.dex.com oel1-priv192.168.100.110 oel1-vip.dex.com oel1-vip
192.168.100.211 oel2.dex.com oel2192.168.10.211 oel2-priv.dex.com oel2-priv192.168.100.111 oel2-vip.dex.com oel2-vip
192.168.100.12 ha-scan.dex.com ha-scan
修改 network
[root@oel1 bin]# ./crsctl modify resource ora.net1.network -attr "USR_ORA_AUTO= " [root@oel1 bin]# ./crsctl stat res ora.net1.network -pUSR_ORA_AUTO=
添加 scan
[root@oel1 bin]# ./srvctl add scan -n ha-scan.dex.com[root@oel1 bin]# ./srvctl add scan_listener
时间就像海绵里的水,挤一挤,还是有
修改 vip
[root@oel1 bin]# ./srvctl modify nodeapps -n oel1 -A oel1-vip/255.255.255.0/eth0[root@oel1 bin]# ./srvctl modify nodeapps -n oel2 -A oel2-vip/255.255.255.0/eth0
重启一下[root@oel1 bin]# ./crsctl stop cluster –all[root@oel1 bin]# ./crsctl start cluster -all
结束[root@oel1 bin]# ./crsctl stat res -t--------------------------------------------------------------------------------NAME TARGET STATE SERVER STATE_DETAILS-------------------------------------------------------------------------------- Local Resources--------------------------------------------------------------------------------ora.DATA.dg
ora.LISTENER.lsnr
ora.asm
ora.eons
ora.gsd
ora.net1.network
ora.ons
ONLINE ONLINE oel1ONLINE ONLINE oel2
ONLINE ONLINE oel1ONLINE ONLINE oel2
ONLINE ONLINE oel1 StartedONLINE ONLINE oel2 Started
ONLINE ONLINE oel1ONLINE ONLINE oel2
OFFLINE OFFLINE oel1OFFLINE OFFLINE oel2
ONLINE ONLINE oel1ONLINE ONLINE oel2
ONLINE ONLINE oel1ONLINE ONLINE oel2
-------------------------------------------------------------------------------- Cluster Resources-------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE oel2
时间就像海绵里的水,挤一挤,还是有
ora.oc4j1 OFFLINE OFFLINE
ora.oel1.vip1 ONLINE ONLINE oel1
ora.oel2.vip1 ONLINE ONLINE oel2
ora.scan1.vip1 ONLINE ONLINE oel2
客户端:C:\Users\dex>tnsping 192.168.100.12
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 19-MAY-2012 22:54:33
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:D:\apps\work\db\oracle11g\product\11.2.0\dbhome_1\NETWORK\ADMIN\sqlnet.ora
Used EZCONNECT adapter to resolve the aliasAttempting to contact(DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.12)(PORT=1521))) OK (20 msec)
C:\Users\dex>
附录
gns oel1:root.sh 输出
Running Oracle 11g root.sh script...
The following environment variables are set as: ORACLE_OWNER= oracleORACLE_HOME= /u01/app/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
时间就像海绵里的水,挤一挤,还是有
Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ...Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script.Now product-specific root actions will be performed.2012-05-17 15:44:40: Parsing the host name2012-05-17 15:44:40: Checking for super user privileges2012-05-17 15:44:40: User has super user privilegesUsing configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_paramsCreating trace directoryLOCAL ADD MODECreating OCR keys for user 'root', privgrp 'root'.. Operation successful.
root walletroot wallet cert root cert export peer walletprofile reader wallet pa walletpeer wallet keyspa wallet keys peer cert request pa cert request peer certpa certpeer root cert TPprofile reader root cert TPpa root cert TP peer pa cert TP pa peer cert TPprofile reader pa cert TP profile reader peer cert TP peer user certpa user cert
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started. ohasd is startingacfsroot: ACFS-9301: ADVM/ACFS installation can not proceed:
时间就像海绵里的水,挤一挤,还是有
acfsroot: ACFS-9302: No installation files found at/u01/app/11.2.0/grid/install/usm/EL5/x86_64/2.6.18-8/2.6.18-8.el5uek-x86_64/bin.
CRS-2672: Attempting to start 'ora.gipcd' on 'oel1' CRS-2672: Attempting to start 'ora.mdnsd' on 'oel1' CRS-2676: Start of 'ora.gipcd' on 'oel1' succeeded CRS-2676: Start of 'ora.mdnsd' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'oel1' CRS-2676: Start of 'ora.gpnpd' on 'oel1' succeededCRS-2672: Attempting to start 'ora.cssdmonitor' on 'oel1' CRS-2676: Start of 'ora.cssdmonitor' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'oel1'CRS-2672: Attempting to start 'ora.diskmon' on 'oel1'CRS-2676: Start of 'ora.diskmon' on 'oel1' succeededCRS-2676: Start of 'ora.cssd' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.ctssd' on 'oel1' CRS-2676: Start of 'ora.ctssd' on 'oel1' succeeded
ASM created and started successfully.
DiskGroup DATA created successfully.
clscfg: -install mode specifiedSuccessfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful.CRS-2672: Attempting to start 'ora.crsd' on 'oel1' CRS-2676: Start of 'ora.crsd' on 'oel1' succeeded CRS-4256: Updating the profileSuccessful addition of voting disk 24afba413a1f4fb3bf34bf375d6db0ba. Successfully replaced voting disk group with +DATA.CRS-4256: Updating the profileCRS-4266: Voting file(s) successfully replaced## STATE File Universal Id File Name Disk group-- ----- ----------------- --------- ---------
1. ONLINE 24afba413a1f4fb3bf34bf375d6db0ba (/dev/raw/raw1) [DATA] Located 1 voting disk(s).CRS-2673: Attempting to stop 'ora.crsd' on 'oel1' CRS-2677: Stop of 'ora.crsd' on 'oel1' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'oel1' CRS-2677: Stop of 'ora.asm' on 'oel1' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'oel1' CRS-2677: Stop of 'ora.ctssd' on 'oel1' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'oel1' CRS-2677: Stop of 'ora.cssdmonitor' on 'oel1' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'oel1'CRS-2677: Stop of 'ora.cssd' on 'oel1' succeededCRS-2673: Attempting to stop 'ora.gpnpd' on 'oel1' CRS-2677: Stop of 'ora.gpnpd' on 'oel1' succeeded CRS-2673: Attempting to stop 'ora.gipcd' on 'oel1' CRS-2677: Stop of 'ora.gipcd' on 'oel1' succeeded CRS-2673: Attempting to stop 'ora.mdnsd' on 'oel1' CRS-2677: Stop of 'ora.mdnsd' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.mdnsd' on 'oel1' CRS-2676: Start of 'ora.mdnsd' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.gipcd' on 'oel1' CRS-2676: Start of 'ora.gipcd' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'oel1' CRS-2676: Start of 'ora.gpnpd' on 'oel1' succeededCRS-2672: Attempting to start 'ora.cssdmonitor' on 'oel1' CRS-2676: Start of 'ora.cssdmonitor' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'oel1'CRS-2672: Attempting to start 'ora.diskmon' on 'oel1' CRS-2676: Start of 'ora.diskmon' on 'oel1' succeeded CRS-2676: Start of 'ora.cssd' on 'oel1' succeededCRS-2672: Attempting to start 'ora.ctssd' on 'oel1' CRS-2676: Start of 'ora.ctssd' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.asm' on 'oel1' CRS-2676: Start of 'ora.asm' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'oel1' CRS-2676: Start of 'ora.crsd' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.evmd' on 'oel1' CRS-oel1/u01/app/11.2.0/grid/cdata/oel1/backup_20120517_155127.olrPreparing packages for installation... cvuqdisk-1.0.7-1Configure Oracle Grid Infrastructure for a Cluster ... succeededUpdating inventory properties for clusterware
2012/05/17
时间就像海绵里的水,挤一挤,还是有
15:51:27
Checking swap space: must be greater than 500 MB. Actual 4083 MB Passed
时间就像海绵里的水,挤一挤,还是有
The inventory pointer is located at /etc/oraInst.locThe inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
gns oel2:root.sh 输出
[root@oel2 ~]# /u01/app/11.2.0/grid/root.shRunning Oracle 11g root.sh script...
The following environment variables are set as: ORACLE_OWNER= oracleORACLE_HOME= /u01/app/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ...Copying oraenv to /usr/local/bin ...Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script.Now product-specific root actions will be performed.2012-05-17 15:53:25: Parsing the host name2012-05-17 15:53:25: Checking for super user privileges2012-05-17 15:53:25: User has super user privilegesUsing configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_paramsCreating trace directoryacfsroot: ACFS-9301: ADVM/ACFS installation can not proceed:
acfsroot: ACFS-9302: No installation files found at/u01/app/11.2.0/grid/install/usm/EL5/x86_64/2.6.18-8/2.6.18-8.el5uek-x86_64/bin.
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node oel1, number 1, and is terminatingAn active cluster was found during exclusive startup, restarting to join the clusterCRS-2672: Attempting to start 'ora.mdnsd' on 'oel2' CRS-2676: Start of 'ora.mdnsd' on 'oel2' succeeded CRS-2672: Attempting to start 'ora.gipcd' on 'oel2' CRS-2676: Start of 'ora.gipcd' on 'oel2' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'oel2' CRS-2676: Start of 'ora.gpnpd' on 'oel2' succeededCRS-2672: Attempting to start 'ora.cssdmonitor' on 'oel2'CRS-2676: Start of 'ora.cssdmonitor' on 'oel2' succeededCRS-2672: Attempting to start 'ora.cssd' on 'oel2'CRS-2672: Attempting to start 'ora.diskmon' on 'oel2' CRS-2676: Start of 'ora.diskmon' on 'oel2' succeeded CRS-2676: Start of 'ora.cssd' on 'oel2' succeededCRS-2672: Attempting to start 'ora.ctssd' on 'oel2' CRS-2676: Start of 'ora.ctssd' on 'oel2' succeeded CRS-2672: Attempting to start 'ora.asm' on 'oel2' CRS-2676: Start of 'ora.asm' on 'oel2' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'oel2' CRS-2676: Start of 'ora.crsd' on 'oel2' succeeded CRS-2672:
oel2/u01/app/11.2.0/grid/cdata/oel2/backup_20120517_155623.olrPreparing packages for installation... cvuqdisk-1.0.7-1Configure Oracle Grid Infrastructure for a Cluster ... succeededUpdating inventory properties for clusterware
2012/05/17
时间就像海绵里的水,挤一挤,还是有
15:56:23
Checking swap space: must be greater than 500 MB. Actual 4093 MB PassedThe inventory pointer is located at /etc/oraInst.locThe inventory is located at /u01/app/oraInventory'UpdateNodeList' was successful.
host oel1:root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as: ORACLE_OWNER= oracleORACLE_HOME= /u01/app/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ...
时间就像海绵里的水,挤一挤,还是有
Copying oraenv to /usr/local/bin ...Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script.Now product-specific root actions will be performed.2012-05-19 15:22:24: Parsing the host name2012-05-19 15:22:24: Checking for super user privileges2012-05-19 15:22:24: User has super user privilegesUsing configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_paramsCreating trace directoryLOCAL ADD MODECreating OCR keys for user 'root', privgrp 'root'.. Operation successful.
root walletroot wallet cert root cert export peer walletprofile reader wallet pa walletpeer wallet keys pa wallet keys peer cert request pa cert request peer certpa certpeer root cert TPprofile reader root cert TPpa root cert TP peer pa cert TP pa peer cert TPprofile reader pa cert TP profile reader peer cert TP peer user certpa user cert
Adding daemon to inittabCRS-4123: Oracle High Availability Services has been started. ohasd is startingacfsroot: ACFS-9301: ADVM/ACFS installation can not proceed:
acfsroot: ACFS-9302: No installation files found at
时间就像海绵里的水,挤一挤,还是有
/u01/app/11.2.0/grid/install/usm/EL5/x86_64/2.6.18-8/2.6.18-8.el5uek-x86_64/bin.
CRS-2672: Attempting to start 'ora.gipcd' on 'oel1' CRS-2672: Attempting to start 'ora.mdnsd' on 'oel1' CRS-2676: Start of 'ora.gipcd' on 'oel1' succeeded CRS-2676: Start of 'ora.mdnsd' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'oel1' CRS-2676: Start of 'ora.gpnpd' on 'oel1' succeededCRS-2672: Attempting to start 'ora.cssdmonitor' on 'oel1' CRS-2676: Start of 'ora.cssdmonitor' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'oel1'CRS-2672: Attempting to start 'ora.diskmon' on 'oel1' CRS-2676: Start of 'ora.diskmon' on 'oel1' succeeded CRS-2676: Start of 'ora.cssd' on 'oel1' succeededCRS-2672: Attempting to start 'ora.ctssd' on 'oel1'CRS-2676: Start of 'ora.ctssd' on 'oel1' succeeded
ASM created and started successfully.
DiskGroup DATA created successfully.
clscfg: -install mode specifiedSuccessfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful.CRS-2672: Attempting to start 'ora.crsd' on 'oel1'CRS-2676: Start of 'ora.crsd' on 'oel1' succeededCRS-4256: Updating the profileSuccessful addition of voting disk 50e83ca5f0614fb5bf803504ee9172f7. Successfully replaced voting disk group with +DATA.CRS-4256: Updating the profileCRS-4266: Voting file(s) successfully replaced## STATE File Universal Id File Name Disk group-- ----- ----------------- --------- ---------
1. ONLINE 50e83ca5f0614fb5bf803504ee9172f7 (/dev/raw/raw1) [DATA] Located 1 voting disk(s).CRS-2673: Attempting to stop 'ora.crsd' on 'oel1'CRS-2677: Stop of 'ora.crsd' on 'oel1' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'oel1' CRS-2677: Stop of 'ora.asm' on 'oel1' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'oel1' CRS-2677: Stop of 'ora.ctssd' on 'oel1' succeededCRS-2673: Attempting to stop 'ora.cssdmonitor' on 'oel1' CRS-2677: Stop of 'ora.cssdmonitor' on 'oel1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'oel1' CRS-2677: Stop of 'ora.cssd' on 'oel1' succeeded CRS-2673: Attempting to stop 'ora.gpnpd' on 'oel1' CRS-2677: Stop of 'ora.gpnpd' on 'oel1' succeeded CRS-2673: Attempting to stop 'ora.gipcd' on 'oel1' CRS-2677: Stop of 'ora.gipcd' on 'oel1' succeeded CRS-2673: Attempting to stop 'ora.mdnsd' on 'oel1' CRS-2677: Stop of 'ora.mdnsd' on 'oel1' succeededCRS-2672: Attempting to start 'ora.mdnsd' on 'oel1' CRS-2676: Start of 'ora.mdnsd' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.gipcd' on 'oel1' CRS-2676: Start of 'ora.gipcd' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'oel1' CRS-2676: Start of 'ora.gpnpd' on 'oel1' succeededCRS-2672: Attempting to start 'ora.cssdmonitor' on 'oel1'CRS-2676: Start of 'ora.cssdmonitor' on 'oel1' succeededCRS-2672: Attempting to start 'ora.cssd' on 'oel1'CRS-2672: Attempting to start 'ora.diskmon' on 'oel1' CRS-2676: Start of 'ora.diskmon' on 'oel1' succeeded CRS-2676: Start of 'ora.cssd' on 'oel1' succeededCRS-2672: Attempting to start 'ora.ctssd' on 'oel1' CRS-2676: Start of 'ora.ctssd' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.asm' on 'oel1' CRS-2676: Start of 'ora.asm' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'oel1' CRS-2676: Start of 'ora.crsd' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.evmd' on 'oel1' CRS-2676: Start of 'ora.evmd' on 'oel1' succeeded CRS-2672: Attempting to start 'ora.asm' on 'oel1'
oel1/u01/app/11.2.0/grid/cdata/oel1/backup_20120519_152754.olrPreparing packages for installation... cvuqdisk-1.0.7-1Configure Oracle Grid Infrastructure for a Cluster ... succeededUpdating inventory properties for clusterware
2012/05/19
时间就像海绵里的水,挤一挤,还是有
15:27:54
Checking swap space: must be greater than 500 MB. Actual 4070 MB PassedThe inventory pointer is located at /etc/oraInst.locThe inventory is located at /u01/app/oraInventory
时间就像海绵里的水,挤一挤,还是有
'UpdateNodeList' was successful.
host oel2:root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as: ORACLE_OWNER= oracleORACLE_HOME= /u01/app/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ...Copying oraenv to /usr/local/bin ...Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script.Now product-specific root actions will be performed.2012-05-19 15:28:41: Parsing the host name2012-05-19 15:28:41: Checking for super user privileges2012-05-19 15:28:41: User has super user privilegesUsing configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_paramsCreating trace directoryLOCAL ADD MODECreating OCR keys for user 'root', privgrp 'root'.. Operation successful.Adding daemon to inittabCRS-4123: Oracle High Availability Services has been started. ohasd is starting
acfsroot: ACFS-9301: ADVM/ACFS installation can not proceed:
acfsroot: ACFS-9302: No installation files found at/u01/app/11.2.0/grid/install/usm/EL5/x86_64/2.6.18-8/2.6.18-8.el5uek-x86_64/bin.
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node oel1, number 1, and is terminating
oel2 2012/05/19/uPreparing packages for installation...cvuqdisk-1.0.7-1Configure Oracle Grid Infrastructure for a Cluster ... succeededUpdating inventory properties for clusterwareStarting Oracle Universal Installer...
时间就像海绵里的水,挤一挤,还是有
An active cluster was found during exclusive startup, restarting to join the clusterCRS-2672: Attempting to start 'ora.mdnsd' on 'oel2' CRS-2676: Start of 'ora.mdnsd' on 'oel2' succeeded CRS-2672: Attempting to start 'ora.gipcd' on 'oel2' CRS-2676: Start of 'ora.gipcd' on 'oel2' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'oel2' CRS-2676: Start of 'ora.gpnpd' on 'oel2' succeededCRS-2672: Attempting to start 'ora.cssdmonitor' on 'oel2' CRS-2676: Start of 'ora.cssdmonitor' on 'oel2' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'oel2'CRS-2672: Attempting to start 'ora.diskmon' on 'oel2' CRS-2676: Start of 'ora.diskmon' on 'oel2' succeeded CRS-2676: Start of 'ora.cssd' on 'oel2' succeededCRS-2672: Attempting to start 'ora.ctssd' on 'oel2'CRS-2676: Start of 'ora.ctssd' on 'oel2' succeeded CRS-2672: Attempting to start 'ora.asm' on 'oel2' CRS-2676: Start of 'ora.asm' on 'oel2' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'oel2' CRS-2676: Start of 'ora.crsd' on 'oel2' succeeded CRS-2672: Attempting to start 'ora.evmd' on 'oel2' CRS-2676: Start of 'ora.evmd' on 'oel2' succeeded
15:31:25
Checking swap space: must be greater than 500 MB. Actual 4094 MB PassedThe inventory pointer is located at /etc/oraInst.locThe inventory is located at /u01/app/oraInventory'UpdateNodeList' was successful.
这么辛苦,给个好评吧!作者:任Good luck !