关闭全过程:
--- 2 Node 的RAC 显示状态
bash-3.00# ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.ora10g.db application ONLINE ONLINE sun1
ora....g1.inst application ONLINE ONLINE sun1
ora....g2.inst application ONLINE ONLINE sun2
ora....SM1.asm application ONLINE ONLINE sun1
ora....N1.lsnr application ONLINE ONLINE sun1
ora.sun1.gsd application ONLINE ONLINE sun1
ora.sun1.ons application ONLINE ONLINE sun1
ora.sun1.vip application ONLINE ONLINE sun1
ora....SM2.asm application ONLINE ONLINE sun2
ora....N2.lsnr application ONLINE ONLINE sun2
ora.sun2.gsd application ONLINE ONLINE sun2
ora.sun2.ons application ONLINE ONLINE sun2
ora.sun2.vip application ONLINE ONLINE sun2
Node 1 Ip:
# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843 mtu 1500 index 2
inet 10.89.56.111 netmask ffffff00 broadcast 10.89.56.255
ether 0:3:ba:92:b3:d1
ce0:1: flags=1040843 mtu 1500 index 2
inet 10.89.56.211 netmask ffffff00 broadcast 10.89.56.255
ce2: flags=1000843 mtu 1500 index 3
inet 192.168.11.111 netmask ffffff00 broadcast 192.168.11.255
ether 0:3:ba:92:b4:b7
Node 2 Ip:
# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843 mtu 1500 index 2
inet 10.89.56.122 netmask ffffff00 broadcast 10.89.56.255
ether 0:3:ba:31:97:e6
ce0:2: flags=1040843 mtu 1500 index 2
inet 10.89.56.212 netmask ffffff00 broadcast 10.89.56.255
qfe3: flags=1000843 mtu 1500 index 3
inet 192.168.11.122 netmask ffffff00 broadcast 192.168.11.255
ether 0:3:ba:5e:29:f1
---关闭Instance
Node1:
sun1:\./srvctl stop inst -d ora10g -i ora10g1
sun1:\./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.ora10g.db application ONLINE ONLINE sun1
ora....g1.inst application OFFLINE OFFLINE
ora....g2.inst application ONLINE ONLINE sun2
ora....SM1.asm application ONLINE ONLINE sun1
ora....N1.lsnr application ONLINE ONLINE sun1
ora.sun1.gsd application ONLINE ONLINE sun1
ora.sun1.ons application ONLINE ONLINE sun1
ora.sun1.vip application ONLINE ONLINE sun1
ora....SM2.asm application ONLINE ONLINE sun2
ora....N2.lsnr application ONLINE ONLINE sun2
ora.sun2.gsd application ONLINE ONLINE sun2
ora.sun2.ons application ONLINE ONLINE sun2
ora.sun2.vip application ONLINE ONLINE sun2
Node2 数据库继续访问,所有用户连接连入node2.
Node 2:
sun1:\./srvctl stop inst -d ora10g -i ora10g2
sun1:\./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.ora10g.db application OFFLINE OFFLINE
ora....g1.inst application OFFLINE OFFLINE
ora....g2.inst application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE sun1
ora....N1.lsnr application ONLINE ONLINE sun1
ora.sun1.gsd application ONLINE ONLINE sun1
ora.sun1.ons application ONLINE ONLINE sun1
ora.sun1.vip application ONLINE ONLINE sun1
ora....SM2.asm application ONLINE ONLINE sun2
ora....N2.lsnr application ONLINE ONLINE sun2
ora.sun2.gsd application ONLINE ONLINE sun2
ora.sun2.ons application ONLINE ONLINE sun2
ora.sun2.vip application ONLINE ONLINE sun2
Instance 2 关闭,数据库关闭(RAC 为2nodes)。
等效下面:
---关闭数据库
bash-3.00# ./srvctl stop database -d ora10g
bash-3.00# ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.ora10g.db application OFFLINE OFFLINE
ora....g1.inst application OFFLINE OFFLINE
ora....g2.inst application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE sun1
ora....N1.lsnr application ONLINE ONLINE sun1
ora.sun1.gsd application ONLINE ONLINE sun1
ora.sun1.ons application ONLINE ONLINE sun1
ora.sun1.vip application ONLINE ONLINE sun1
ora....SM2.asm application ONLINE ONLINE sun2
ora....N2.lsnr application ONLINE ONLINE sun2
ora.sun2.gsd application ONLINE ONLINE sun2
ora.sun2.ons application ONLINE ONLINE sun2
ora.sun2.vip application ONLINE ONLINE sun2
bash-3.00#
---关闭ASM instance
Node 1:
sun1:\ORACLE_SID=+ASM1
sun1:\sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.3.0 - Production on Mon Mar 16 14:43:16 2009
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> shutdown immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL>
Node 2:
sun2:\ORACLE_SID=+ASM2
sun2:\sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.3.0 - Production on Mon Mar 16 14:44:56 2009
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> shutdown immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL>
sun1:\./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.ora10g.db application OFFLINE OFFLINE
ora....g1.inst application OFFLINE OFFLINE
ora....g2.inst application OFFLINE OFFLINE
ora....SM1.asm application OFFLINE OFFLINE
ora....N1.lsnr application ONLINE ONLINE sun1
ora.sun1.gsd application ONLINE ONLINE sun1
ora.sun1.ons application ONLINE ONLINE sun1
ora.sun1.vip application ONLINE ONLINE sun1
ora....SM2.asm application OFFLINE OFFLINE
ora....N2.lsnr application ONLINE ONLINE sun2
ora.sun2.gsd application ONLINE ONLINE sun2
ora.sun2.ons application ONLINE ONLINE sun2
ora.sun2.vip application ONLINE ONLINE sun2
关闭 Listener:
sun1:\srvctl stop listener -n sun1 -l LISTENER_SUN1
sun1:\./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.ora10g.db application OFFLINE OFFLINE
ora....g1.inst application OFFLINE OFFLINE
ora....g2.inst application OFFLINE OFFLINE
ora....SM1.asm application OFFLINE OFFLINE
ora....N1.lsnr application OFFLINE OFFLINE
ora.sun1.gsd application ONLINE ONLINE sun1
ora.sun1.ons application ONLINE ONLINE sun1
ora.sun1.vip application ONLINE ONLINE sun1
ora....SM2.asm application ONLINE ONLINE
ora....N2.lsnr application ONLINE ONLINE sun2
ora.sun2.gsd application ONLINE ONLINE sun2
ora.sun2.ons application ONLINE ONLINE sun2
ora.sun2.vip application ONLINE ONLINE sun2
sun1:\./srvctl stop listener -n sun2 -l LISTENER_SUN2
sun1:\./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.ora10g.db application OFFLINE OFFLINE
ora....g1.inst application OFFLINE OFFLINE
ora....g2.inst application OFFLINE OFFLINE
ora....SM1.asm application OFFLINE OFFLINE
ora....N1.lsnr application OFFLINE OFFLINE
ora.sun1.gsd application ONLINE ONLINE sun1
ora.sun1.ons application ONLINE ONLINE sun1
ora.sun1.vip application ONLINE ONLINE sun1
ora....SM2.asm application ONLINE ONLINE
ora....N2.lsnr application OFFLINE OFFLINE
ora.sun2.gsd application ONLINE ONLINE sun2
ora.sun2.ons application ONLINE ONLINE sun2
ora.sun2.vip application ONLINE ONLINE sun2
sun1:\
关闭CRS 服务:
Node 1:
# ./crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
# ./crs_stat -t
CRS-0184: Cannot communicate with the CRS daemon.
sun2:\./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.ora10g.db application OFFLINE OFFLINE
ora....g1.inst application OFFLINE OFFLINE
ora....g2.inst application OFFLINE OFFLINE
ora....SM1.asm application OFFLINE OFFLINE
ora....N1.lsnr application OFFLINE OFFLINE
ora.sun1.gsd application ONLINE OFFLINE
ora.sun1.ons application ONLINE OFFLINE
ora.sun1.vip application ONLINE ONLINE sun2
ora....SM2.asm application OFFLINE OFFLINE
ora....N2.lsnr application OFFLINE OFFLINE
ora.sun2.gsd application ONLINE ONLINE sun2
ora.sun2.ons application ONLINE ONLINE sun2
ora.sun2.vip application ONLINE ONLINE sun2
应为CRS在 node 已经关闭VIP 自动切换到Node2 上。
Node1 Ip address:
# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843 mtu 1500 index 2
inet 10.89.56.111 netmask ffffff00 broadcast 10.89.56.255
ether 0:3:ba:92:b3:d1
ce2: flags=1000843 mtu 1500 index 3
inet 192.168.11.111 netmask ffffff00 broadcast 192.168.11.255
ether 0:3:ba:92:b4:b7
# ps -ef|grep crs
root 16078 1 0 15:24:08 ? 0:00 /bin/sh /etc/init.d/init.crsd run
root 16896 15572 0 15:27:12 pts/3 0:00 grep crs
Node 2:
# ./crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843 mtu 1500 index 2
inet 10.89.56.122 netmask ffffff00 broadcast 10.89.56.255
ether 0:3:ba:31:97:e6
qfe3: flags=1000843 mtu 1500 index 3
inet 192.168.11.122 netmask ffffff00 broadcast 192.168.11.255
ether 0:3:ba:5e:29:f1
# ps -ef|grep crs
root 16992 16178 0 15:28:09 pts/2 0:00 grep crs
root 16607 1 0 15:26:45 ? 0:00 /bin/sh /etc/init.d/init.crsd run
Finish
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/34596/viewspace-567532/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/34596/viewspace-567532/