分类: Oracle
2011-01-09 05:29:54
--关闭其中一个节点
srvctl stop listener -n node1
srvctl stop instance -d node -i node1
srvctl stop nodeapps -n node1
/etc/init.d/init.crs stop (root 停cluster 软件)
--正常
[oracle@node2 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....E1.inst application 0/5 0/0 ONLINE ONLINE node1
ora....E2.inst application 0/5 0/0 ONLINE ONLINE node2
ora.NODE.db application 0/1 0/1 ONLINE ONLINE node1
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE node1
ora....E1.lsnr application 0/5 0/0 ONLINE ONLINE node1
ora.node1.gsd application 0/5 0/0 ONLINE ONLINE node1
ora.node1.ons application 0/3 0/0 ONLINE ONLINE node1
ora.node1.vip application 0/0 0/0 ONLINE ONLINE node1
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE node2
ora....E2.lsnr application 0/5 0/0 ONLINE ONLINE node2
ora.node2.gsd application 0/5 0/0 ONLINE ONLINE node2
ora.node2.ons application 0/3 0/0 ONLINE ONLINE node2
ora.node2.vip application 0/0 0/0 ONLINE ONLINE node2
--关闭侦听
oracle@node2 ~]$ srvctl stop listener -n node1
[oracle@node2 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....E1.inst application 0/5 0/0 ONLINE ONLINE node1
ora....E2.inst application 0/5 0/0 ONLINE ONLINE node2
ora.NODE.db application 0/1 0/1 ONLINE ONLINE node2
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE node1
ora....E1.lsnr application 0/5 0/0 OFFLINE OFFLINE
ora.node1.gsd application 0/5 0/0 ONLINE ONLINE node1
ora.node1.ons application 0/3 0/0 ONLINE ONLINE node1
ora.node1.vip application 0/0 0/0 ONLINE ONLINE node1
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE node2
ora....E2.lsnr application 0/5 0/0 ONLINE ONLINE node2
ora.node2.gsd application 0/5 0/0 ONLINE ONLINE node2
ora.node2.ons application 0/3 0/0 ONLINE ONLINE node2
ora.node2.vip application 0/0 0/0 ONLINE ONLINE node2
--关闭实例
[oracle@node2 ~]$ srvctl stop instance -d node -i node1
[oracle@node2 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....E1.inst application 0/5 0/0 OFFLINE OFFLINE
ora....E2.inst application 0/5 0/0 ONLINE ONLINE node2
ora.NODE.db application 0/1 0/1 ONLINE ONLINE node2
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE node1
Ora.. .E1.lsnr application 0/5 0/0 OFFLINE OFFLINE
ora.node1.gsd application 0/5 0/0 ONLINE ONLINE node1
ora.node1.ons application 0/3 0/0 ONLINE ONLINE node1
ora.node1.vip application 0/0 0/0 ONLINE ONLINE node1
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE node2
ora....E2.lsnr application 0/5 0/0 ONLINE ONLINE node2
ora.node2.gsd application 0/5 0/0 ONLINE ONLINE node2
ora.node2.ons application 0/3 0/0 ONLINE ONLINE node2
ora.node2.vip application 0/0 0/0 ONLINE ONLINE node2
--关闭节点上的应用,10g下,将一起关闭vip,则导致vip为漂移到另外的节点
[oracle@node2 ~]$ srvctl stop nodeapps -n node1
CRS-0216: Could not stop resource 'ora.node1.LISTENER_NODE1.lsnr'.
[oracle@node2 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....E1.inst application 0/5 0/0 OFFLINE OFFLINE
ora....E2.inst application 0/5 0/0 ONLINE ONLINE node2
ora.NODE.db application 0/1 0/1 ONLINE ONLINE node2
ora....SM1.asm application 0/5 0/0 OFFLINE OFFLINE
ora....E1.lsnr application 0/5 0/0 OFFLINE OFFLINE
ora.node1.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.node1.ons application 0/3 0/0 OFFLINE OFFLINE
ora.node1.vip application 0/0 0/0 OFFLINE OFFLINE
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE node2
ora....E2.lsnr application 0/5 0/0 ONLINE ONLINE node2
ora.node2.gsd application 0/5 0/0 ONLINE ONLINE node2
ora.node2.ons application 0/3 0/0 ONLINE ONLINE node2
ora.node2.vip application 0/0 0/0 ONLINE ONLINE node2
如视
[oracle@node2 ~]$ /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:2C:8B:07
inet addr:192.168.32.130 Bcast:192.168.32.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe2c:8b07/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6540 errors:0 dropped:0 overruns:0 frame:0
TX packets:5947 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:539593 (526.9 KiB) TX bytes:645576 (630.4 KiB)
Interrupt:185 Base address:0x1480
eth0:1 Link encap:Ethernet HWaddr 00:0C:29:2C:8B:07
inet addr:192.168.32.141 Bcast:192.168.32.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:185 Base address:0x1480
eth1 Link encap:Ethernet HWaddr 00:0C:29:2C:8B:11
inet addr:192.168.160.136 Bcast:192.168.160.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe2c:8b11/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:89549 errors:0 dropped:0 overruns:0 frame:0
TX packets:69272 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:67873314 (64.7 MiB) TX bytes:36943018 (35.2 MiB)
Interrupt:193 Base address:0x1800
解决
[oracle@node2 ~]$ crs_start ora.node1.vip
Attempting to start `ora.node1.vip` on member `node1`
Start of `ora.node1.vip` on member `node1` succeeded.
[oracle@node2 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....E1.inst application 0/5 0/0 OFFLINE OFFLINE
ora....E2.inst application 0/5 0/0 ONLINE ONLINE node2
ora.NODE.db application 0/1 0/1 ONLINE ONLINE node2
ora....SM1.asm application 0/5 0/0 OFFLINE OFFLINE
ora....E1.lsnr application 0/5 0/0 OFFLINE OFFLINE
ora.node1.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.node1.ons application 0/3 0/0 OFFLINE OFFLINE
ora.node1.vip application 0/0 0/0 ONLINE ONLINE node1
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE node2
ora....E2.lsnr application 0/5 0/0 ONLINE ONLINE node2
ora.node2.gsd application 0/5 0/0 ONLINE ONLINE node2
ora.node2.ons application 0/3 0/0 ONLINE ONLINE node2
ora.node2.vip application 0/0 0/0 ONLINE ONLINE node2
关闭RAC
srvctl stop listener -n node1
srvctl stop listener -n node2
srvctl stop database -d node
srvctl stop nodeapps -n node1
srvctl stop nodeapps -n node2
在两个节点上执行./init.crs stop
--关闭侦听
[oracle@node2 ~]$ srvctl stop listener -n node1
[oracle@node2 ~]$ srvctl stop listener -n node2
[oracle@node2 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....E1.inst application 0/5 0/0 ONLINE ONLINE node1
ora....E2.inst application 0/5 0/0 ONLINE ONLINE node2
ora.NODE.db application 0/1 0/1 ONLINE ONLINE node2
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE node1
ora....E1.lsnr application 0/5 0/0 OFFLINE OFFLINE
ora.node1.gsd application 0/5 0/0 ONLINE ONLINE node1
ora.node1.ons application 0/3 0/0 ONLINE ONLINE node1
ora.node1.vip application 0/0 0/0 ONLINE ONLINE node1
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE node2
ora....E2.lsnr application 0/5 0/0 OFFLINE OFFLINE
ora.node2.gsd application 0/5 0/0 ONLINE ONLINE node2
ora.node2.ons application 0/3 0/0 ONLINE ONLINE node2
ora.node2.vip application 0/0 0/0 ONLINE ONLINE node2
--关闭数据库,db和两个实例
[oracle@node2 ~]$ srvctl stop database -d node
[oracle@node2 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....E1.inst application 0/5 0/0 OFFLINE OFFLINE
ora....E2.inst application 0/5 0/0 OFFLINE OFFLINE
ora.NODE.db application 0/1 0/1 OFFLINE OFFLINE
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE node1
ora....E1.lsnr application 0/5 0/0 OFFLINE OFFLINE
ora.node1.gsd application 0/5 0/0 ONLINE ONLINE node1
ora.node1.ons application 0/3 0/0 ONLINE ONLINE node1
ora.node1.vip application 0/0 0/0 ONLINE ONLINE node1
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE node2
ora....E2.lsnr application 0/5 0/0 OFFLINE OFFLINE
ora.node2.gsd application 0/5 0/0 ONLINE ONLINE node2
ora.node2.ons application 0/3 0/0 ONLINE ONLINE node2
ora.node2.vip application 0/0 0/0 ONLINE ONLINE node2
--关闭节点上的应用
[oracle@node2 ~]$ srvctl stop nodeapps -n node1
CRS-0216: Could not stop resource 'ora.node1.LISTENER_NODE1.lsnr'.
[oracle@node2 ~]$ srvctl stop nodeapps -n node2
CRS-0216: Could not stop resource 'ora.node2.LISTENER_NODE2.lsnr'.
[oracle@node2 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....E1.inst application 0/5 0/0 OFFLINE OFFLINE
ora....E2.inst application 0/5 0/0 OFFLINE OFFLINE
ora.NODE.db application 0/1 0/1 OFFLINE OFFLINE
ora....SM1.asm application 0/5 0/0 OFFLINE OFFLINE
ora....E1.lsnr application 0/5 0/0 OFFLINE OFFLINE
ora.node1.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.node1.ons application 0/3 0/0 OFFLINE OFFLINE
ora.node1.vip application 0/0 0/0 OFFLINE OFFLINE
ora....SM2.asm application 0/5 0/0 OFFLINE OFFLINE
ora....E2.lsnr application 0/5 0/0 OFFLINE OFFLINE
ora.node2.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.node2.ons application 0/3 0/0 OFFLINE OFFLINE
ora.node2.vip application 0/0 0/0 OFFLINE OFFLINE
--关闭集群软件
--节点2
[oracle@node2 ~]$ su - root
Password:
[root@node2 ~]# cd /etc/init.d
[root@node2 init.d]# ./init.crs stop
Shutting down Oracle Cluster Ready Services (CRS):
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.
[root@node2 init.d]#
[oracle@node2 ~]$ crs_stat -t -v
CRS-0184: Cannot communicate with the CRS daemon.
--节点1
[oracle@node1 ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....E1.inst application 0/5 0/0 OFFLINE OFFLINE
ora....E2.inst application 0/5 0/0 OFFLINE OFFLINE
ora.NODE.db application 0/1 0/1 OFFLINE OFFLINE
ora....SM1.asm application 0/5 0/0 OFFLINE OFFLINE
ora....E1.lsnr application 0/5 0/0 OFFLINE OFFLINE
ora.node1.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.node1.ons application 0/3 0/0 OFFLINE OFFLINE
ora.node1.vip application 0/0 0/0 OFFLINE OFFLINE
ora....SM2.asm application 0/5 0/0 OFFLINE OFFLINE
ora....E2.lsnr application 0/5 0/0 OFFLINE OFFLINE
ora.node2.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.node2.ons application 0/3 0/0 OFFLINE OFFLINE
ora.node2.vip application 0/0 0/0 OFFLINE OFFLINE
[oracle@node1 ~]$ su - root
Password:
[root@node1~]# cd /etc/init.d
[root@node1 init.d]# ./init.crs stop
Shutting down Oracle Cluster Ready Services (CRS):
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.
[root@node1 init.d]#
[oracle@node1 ~]$ crs_stat -t -v
CRS-0184: Cannot communicate with the CRS daemon.
补充 :
[root@node2 bin]# ./crsctl disable stop --下次启动禁止crs
当启动集群软件的时候,将自动启动节点上应用。。
节点1 offline(但集群软件运行正常)
节点2offine 开启集群软件后
将自动启动各个节点集群(运行的)的节点
VIP-->[ASM]-->ONS-->INST-->LSNR-->[DB]-->GSD
chinaunix网友2011-06-05 01:56:09
大连法律咨询在线 http://www.fabowang.com 大连律师在线咨询 http://www.fabowang.com 大连法律顾问网 http://www.fabowang.com 大连律师咨询 http://www.fabowang.com