ORACLE 11g R2 RAC群集堆栈的关闭过程分析

时间:2022-01-26 08:35:45

http://blog.sina.com.cn/s/blog_70bb8186010159n3.html

下面的操作是一套基于Redhat 5.4 上面安装的 oracle 11g R2 11.2.0.3  rac来执行的。

通过观察命令的输出信息,我们可以分析出,oracle grid堆栈的关闭过程。

[root@node2-11gr2-rac ~]# crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'node2-11gr2-rac'
CRS-2673: Attempting to stop 'ora.crsd' on 'node2-11gr2-rac'  ==先停止ora.crsd
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'node2-11gr2-rac'
CRS-2673: Attempting to stop 'ora.jerry.db' on 'node2-11gr2-rac'
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'node2-11gr2-rac'
CRS-2673: Attempting to stop 'ora.oc4j' on 'node2-11gr2-rac'
CRS-2673: Attempting to stop 'ora.cvu' on 'node2-11gr2-rac'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'node2-11gr2-rac'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'node2-11gr2-rac'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'node2-11gr2-rac' succeeded
CRS-2673: Attempting to stop 'ora.node2-11gr2-rac.vip' on 'node2-11gr2-rac'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'node2-11gr2-rac' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'node2-11gr2-rac'
CRS-2677: Stop of 'ora.scan1.vip' on 'node2-11gr2-rac' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'node1-11gr2-rac'
CRS-2677: Stop of 'ora.node2-11gr2-rac.vip' on 'node2-11gr2-rac' succeeded
CRS-2672: Attempting to start 'ora.node2-11gr2-rac.vip' on 'node1-11gr2-rac'
CRS-2677: Stop of 'ora.jerry.db' on 'node2-11gr2-rac' succeeded
CRS-2673: Attempting to stop 'ora.DATADG.dg' on 'node2-11gr2-rac'
CRS-2676: Start of 'ora.scan1.vip' on 'node1-11gr2-rac' succeeded
CRS-2676: Start of 'ora.node2-11gr2-rac.vip' on 'node1-11gr2-rac' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'node1-11gr2-rac'
CRS-2677: Stop of 'ora.DATADG.dg' on 'node2-11gr2-rac' succeeded
CRS-2677: Stop of 'ora.registry.acfs' on 'node2-11gr2-rac' succeeded
CRS-2673: Attempting to stop 'ora.GRIDDG.dg' on 'node2-11gr2-rac'
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'node1-11gr2-rac' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'node2-11gr2-rac' succeeded
CRS-2672: Attempting to start 'ora.oc4j' on 'node1-11gr2-rac'
CRS-2677: Stop of 'ora.cvu' on 'node2-11gr2-rac' succeeded
CRS-2672: Attempting to start 'ora.cvu' on 'node1-11gr2-rac'
CRS-2676: Start of 'ora.cvu' on 'node1-11gr2-rac' succeeded
CRS-2676: Start of 'ora.oc4j' on 'node1-11gr2-rac' succeeded
CRS-2677: Stop of 'ora.GRIDDG.dg' on 'node2-11gr2-rac' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'node2-11gr2-rac'
CRS-2677: Stop of 'ora.asm' on 'node2-11gr2-rac' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'node2-11gr2-rac'
CRS-2677: Stop of 'ora.ons' on 'node2-11gr2-rac' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'node2-11gr2-rac'
CRS-2677: Stop of 'ora.net1.network' on 'node2-11gr2-rac' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'node2-11gr2-rac' has completed
CRS-2677: Stop of 'ora.crsd' on 'node2-11gr2-rac' succeeded
===这个这里ora.crsd相关的服务关闭结束
CRS-2673: Attempting to stop 'ora.mdnsd' on 'node2-11gr2-rac'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'node2-11gr2-rac'
CRS-2673: Attempting to stop 'ora.ctssd' on 'node2-11gr2-rac'
CRS-2673: Attempting to stop 'ora.evmd' on 'node2-11gr2-rac'
CRS-2673: Attempting to stop 'ora.asm' on 'node2-11gr2-rac'
CRS-2677: Stop of 'ora.evmd' on 'node2-11gr2-rac' succeeded                 ==关闭ora.evmd
CRS-2677: Stop of 'ora.ctssd' on 'node2-11gr2-rac' succeeded                ==关闭ora.ctssd
CRS-2677: Stop of 'ora.mdnsd' on 'node2-11gr2-rac' succeeded                ==关闭ora.mdnsd
CRS-2677: Stop of 'ora.drivers.acfs' on 'node2-11gr2-rac' succeeded         ==关闭ora.drivers.acfs
CRS-2677: Stop of 'ora.asm' on 'node2-11gr2-rac' succeeded                  ==关闭asm实例
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'node2-11gr2-rac'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'node2-11gr2-rac' succeeded  ==关闭haip
CRS-2673: Attempting to stop 'ora.cssd' on 'node2-11gr2-rac'                     
CRS-2677: Stop of 'ora.cssd' on 'node2-11gr2-rac' succeeded                    ==关闭ora.cssd
CRS-2673: Attempting to stop 'ora.gipcd' on 'node2-11gr2-rac'                  ==关闭ora.gipcd
CRS-2677: Stop of 'ora.gipcd' on 'node2-11gr2-rac' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'node2-11gr2-rac'                  ==关闭ora.gpnpd
CRS-2677: Stop of 'ora.gpnpd' on 'node2-11gr2-rac' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'node2-11gr2-rac' has completed
CRS-4133: Oracle High Availability Services has been stopped.                  ==关闭ohasd.bin

 

通过上面的日志可以判断oracle grid infrastructure关闭的过程大致如下:

1、先关闭ora.crsd服务,这个过程中所有依赖于crsd的服务必须关闭,这包括

   Listener/SCAN_Listener/VIP/Database Instance/SCAN VIP/ASM DISKGROUP(不包含OCR和VOTING DISK的磁

  盘组)

2、在crsd服务停止后,对ASM实例执行shutdown immediate操作,这样OCR和Voting Disk所在的VG也就dismount,这个时候ASM的实例才关闭完成。

3、接下来依次关闭ora.evmd ora.ctssd ora.mdnsd ora.drivers.acfs haip ora.cssd等服务

4、最后关闭ora.gipcd ora.gpnpd ohasd.bin

 

查看asm的告警日志知道asm instance的关闭过程:

SQL> ALTER DISKGROUP DATADG DISMOUNT 
NOTE: cache dismounting (clean) group 1/0x3AE4D6AC (DATADG)
NOTE: messaging CKPT to quiesce pins Unix process pid: 26078, image: oracle@node1-11gr2-rac (TNS V1-V3)
Tue Apr 17 15:54:07 2012
NOTE: LGWR doing clean dismount of group 1 (DATADG)
NOTE: LGWR closing thread 2 of diskgroup 1 (DATADG) at ABA 23.2504
NOTE: LGWR released thread recovery enqueue
Tue Apr 17 15:54:07 2012
freeing rdom 1
Tue Apr 17 15:54:07 2012
NOTE: client +ASM1:asmvol deregistered
Tue Apr 17 15:54:07 2012
NOTE: detached from domain 1
NOTE: cache dismounted group 1/0x3AE4D6AC (DATADG)
Tue Apr 17 15:54:07 2012
GMON dismounting group 1 at 7 for pid 32, osid 26078
NOTE: Disk  in mode 0x8 marked for de-assignment
SUCCESS: diskgroup DATADG was dismounted   ==关闭database使用的DG比较顺利
NOTE: cache deleting context for group DATADG 1/0x3ae4d6ac
SUCCESS: ALTER DISKGROUP DATADG DISMOUNT 
SQL> ALTER DISKGROUP GRIDDG DISMOUNT 
Tue Apr 17 15:54:18 2012
GMON querying group 2 at 8 for pid 18, osid 25835
Tue Apr 17 15:54:18 2012
NOTE: Instance updated compatible.asm to 11.2.0.0.0 for grp 2
Tue Apr 17 15:54:18 2012
ORA-15032: not all alterations performed
ORA-15027: active use of diskgroup "GRIDDG" precludes its dismount
 

==因为OCR还在使用,因此这个DG无法dismount
ERROR: ALTER DISKGROUP GRIDDG DISMOUNT 
Tue Apr 17 15:54:28 2012
SQL> ALTER DISKGROUP GRIDDG DISMOUNT 
Tue Apr 17 15:54:38 2012
GMON querying group 2 at 9 for pid 18, osid 25835
Tue Apr 17 15:54:38 2012
NOTE: Instance updated compatible.asm to 11.2.0.0.0 for grp 2
Tue Apr 17 15:54:38 2012
ORA-15032: not all alterations performed
ORA-15027: active use of diskgroup "GRIDDG" precludes its dismount
ERROR: ALTER DISKGROUP GRIDDG DISMOUNT 
Tue Apr 17 15:54:48 2012
SQL> ALTER DISKGROUP GRIDDG DISMOUNT 
Tue Apr 17 15:54:58 2012
GMON querying group 2 at 10 for pid 18, osid 25835
Tue Apr 17 15:54:58 2012
NOTE: Instance updated compatible.asm to 11.2.0.0.0 for grp 2
Tue Apr 17 15:54:58 2012
ORA-15032: not all alterations performed
ORA-15027: active use of diskgroup "GRIDDG" precludes its dismount
ERROR: ALTER DISKGROUP GRIDDG DISMOUNT 
Tue Apr 17 15:55:08 2012
SQL> ALTER DISKGROUP GRIDDG DISMOUNT 
Tue Apr 17 15:55:18 2012
GMON querying group 2 at 11 for pid 18, osid 25835
Tue Apr 17 15:55:18 2012
NOTE: Instance updated compatible.asm to 11.2.0.0.0 for grp 2
Tue Apr 17 15:55:18 2012
ORA-15032: not all alterations performed
ORA-15027: active use of diskgroup "GRIDDG" precludes its dismount
ERROR: ALTER DISKGROUP GRIDDG DISMOUNT 
Tue Apr 17 15:55:28 2012
SQL> ALTER DISKGROUP GRIDDG DISMOUNT 
Tue Apr 17 15:55:38 2012
GMON querying group 2 at 12 for pid 18, osid 25835
Tue Apr 17 15:55:38 2012
NOTE: Instance updated compatible.asm to 11.2.0.0.0 for grp 2
Tue Apr 17 15:55:38 2012
ORA-15032: not all alterations performed
ORA-15027: active use of diskgroup "GRIDDG" precludes its dismount
ERROR: ALTER DISKGROUP GRIDDG DISMOUNT 
Tue Apr 17 15:55:49 2012
NOTE: client exited [25870]

Tue Apr 17 15:55:50 2012
NOTE: ASMB process exiting due to lack of ASM file activity for 1 seconds

在ora.crsd关闭后,确认没有人使用asm了,就开始关闭实例。
Tue Apr 17 15:55:50 2012
Shutting down instance (immediate)
Shutting down instance: further logons disabled
Stopping background process MMNL
Stopping background process MMON
License high water mark = 7
SQL> ALTER DISKGROUP ALL DISMOUNT
NOTE: cache dismounting (clean) group 2/0x3AE4D6AD (GRIDDG)
NOTE: messaging CKPT to quiesce pins Unix process pid: 25845, image: oracle@node1-11gr2-rac (TNS V1-V3)
Tue Apr 17 15:55:54 2012
NOTE: LGWR doing clean dismount of group 2 (GRIDDG)
NOTE: LGWR closing thread 2 of diskgroup 2 (GRIDDG) at ABA 28.222
NOTE: LGWR released thread recovery enqueue
Tue Apr 17 15:55:54 2012
freeing rdom 2
Tue Apr 17 15:55:55 2012
NOTE: detached from domain 2
NOTE: cache dismounted group 2/0x3AE4D6AD (GRIDDG)
Tue Apr 17 15:55:55 2012
GMON dismounting group 2 at 13 for pid 23, osid 25845
NOTE: Disk  in mode 0x8 marked for de-assignment
NOTE: Disk  in mode 0x8 marked for de-assignment
NOTE: Disk  in mode 0x8 marked for de-assignment
SUCCESS: diskgroup GRIDDG was dismounted  ==OCR所在的磁盘组可以dismount了,asm实例可以关闭了。
NOTE: cache deleting context for group GRIDDG 2/0x3ae4d6ad
SUCCESS: ALTER DISKGROUP ALL DISMOUNT
Tue Apr 17 15:55:56 2012
Stopping background process VKTM
Tue Apr 17 15:56:00 2012
NOTE: client +ASM1:asmvol registered, osid 26290, mbr 0x0
NOTE: client +ASM1:asmvol deregistered
Tue Apr 17 15:56:01 2012
freeing rdom 0
Tue Apr 17 15:56:04 2012
Instance shutdown complete

通过asm的告警日志可以看到先关闭了ora.crsd服务后,再关闭ora.asm实例的。