Oracle Database 11gR2 Clusterware之资源

.!.

上篇简单介绍了在11.2中新引入的后台进程,今天介绍11.2 CRS中的资源。

相当于11.1和10g,11.2的资源也增加了不少。首先在11.2中资源进行了分类:HAS资源和CRS资源。这里的CRS本身也是属于HAS的资源,在之前11.1中介绍到的nodeapps(包括vip, ons and gsd),listener,asm,rdbms等在11.2中都是属于CRS资源,那么新引入的HAS又包含哪些资源呢?

先简单学习下查看ohasd和crsd资源的命令:

$ crsctl stat res  -init -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.asm
      1        ONLINE  ONLINE       staig07                  Started             
ora.crsd
      1        ONLINE  ONLINE       staig07                                      
ora.cssd
      1        ONLINE  ONLINE       staig07                                      
ora.cssdmonitor
      1        ONLINE  ONLINE       staig07                                      
ora.ctssd
      1        ONLINE  ONLINE       staig07                  ACTIVE:0            
ora.diskmon
      1        ONLINE  ONLINE       staig07                                      
ora.drivers.acfs
      1        ONLINE  ONLINE       staig07                                      
ora.evmd
      1        ONLINE  ONLINE       staig07                                      
ora.gipcd
      1        ONLINE  ONLINE       staig07                                      
ora.gpnpd
      1        ONLINE  ONLINE       staig07                                      
ora.mdnsd
      1        ONLINE  ONLINE       staig07                                      
[crsusr@node1 sshsetup]$

这里简单说明其中的几个:
ctssd是11.2新增加的时间同步的资源和进程,是对ntp服务的一种增强。
acfs就是外界广为传说的ASM file system对应的资源。
gpnpd就是11.2最重要的feature,也就是即插即用对应的资源。
mdnsd是对应于SCAN和GNS的资源。

相对于与ohasd的资源,crsd的资源就多了去了。下面简单看一下:

 crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA1.dg
               ONLINE  ONLINE       staig07                                      
               ONLINE  ONLINE       staig10                                      
               ONLINE  ONLINE       staig12                                      
               ONLINE  ONLINE       staig13                                      
ora.DATA2.dg
               ONLINE  ONLINE       staig07                                      
               ONLINE  ONLINE       staig10                                      
               ONLINE  ONLINE       staig12                                      
               ONLINE  ONLINE       staig13                                      
ora.LISTENER.lsnr
               ONLINE  ONLINE       staig07                                      
               ONLINE  ONLINE       staig10                                      
               ONLINE  ONLINE       staig12                                      
               ONLINE  ONLINE       staig13                                      
ora.asm
               ONLINE  ONLINE       staig07                  Started             
               ONLINE  ONLINE       staig10                  Started             
               ONLINE  ONLINE       staig12                  Started             
               ONLINE  ONLINE       staig13                  Started             
ora.eons
               ONLINE  ONLINE       staig07                                      
               ONLINE  ONLINE       staig10                                      
               ONLINE  ONLINE       staig12                                      
               ONLINE  ONLINE       staig13                                      
ora.gsd
               OFFLINE OFFLINE      staig07                                      
               OFFLINE OFFLINE      staig10                                      
               OFFLINE OFFLINE      staig12                                      
               OFFLINE OFFLINE      staig13                                      
ora.net1.network
               ONLINE  ONLINE       staig07                                      
               ONLINE  ONLINE       staig10                                      
               ONLINE  ONLINE       staig12                                      
               ONLINE  ONLINE       staig13                                      
ora.ons
               ONLINE  ONLINE       staig07                                      
               ONLINE  ONLINE       staig10                                      
               ONLINE  ONLINE       staig12                                      
               ONLINE  ONLINE       staig13                                      
ora.registry.acfs
               ONLINE  ONLINE       staig07                                      
               ONLINE  ONLINE       staig10                                      
               ONLINE  ONLINE       staig12                                      
               ONLINE  ONLINE       staig13                                      
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       staig10                                      
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       staig12                                      
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       staig07                                      
ora.oc4j
      1        ONLINE  ONLINE       staig13                                      
ora.orcldb.db
      1        ONLINE  ONLINE       staig07                  Open                
      2        ONLINE  ONLINE       staig10                  Open                
      3        ONLINE  ONLINE       staig12                  Open                
      4        ONLINE  ONLINE       staig13                  Open                
ora.scan1.vip
      1        ONLINE  ONLINE       staig10                                      
ora.scan2.vip
      1        ONLINE  ONLINE       staig12                                      
ora.scan3.vip
      1        ONLINE  ONLINE       staig07                                      
ora.staig07.vip
      1        ONLINE  ONLINE       staig07                                      
ora.staig10.vip
      1        ONLINE  ONLINE       staig10                                      
ora.staig12.vip
      1        ONLINE  ONLINE       staig12                                      
ora.staig13.vip
      1        ONLINE  ONLINE       staig13                                      
[crsusr@staig07 sshsetup]$

对于CRSD资源,在11.2中也进行了重新分类,包括cluster-wide范围的资源,比如SCAN,scan listener, VIP等等,还有一些是local (node-wide)的资源,比如network(注意,11.2把网络也作为了一种资源),eons,asm,diskgroup(11.2把ASM diskgroup也作为了一种资源)等等。

这些资源之间也有相互的依赖关系,比如DG resource依赖于ASM,VIP依赖于network。这些可以从资源的详细属性看出,列出资源的详细属性,用下面的命令:

 
 crsctl stat res ora.DATA2.dg -p
NAME=ora.DATA2.dg
TYPE=ora.diskgroup.type
ACL=owner:crsusr:rwx,pgrp:oinstall:rwx,other::r--
ACTION_FAILURE_TEMPLATE=
ACTION_SCRIPT=
AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%
ALIAS_NAME=
AUTO_START=never
CHECK_INTERVAL=300
CHECK_TIMEOUT=600
DEFAULT_TEMPLATE=
DEGREE=1
DESCRIPTION=CRS resource type definition for ASM disk group resource
ENABLED=1
LOAD=1
LOGGING_LEVEL=1
NLS_LANG=
NOT_RESTARTING_TEMPLATE=
OFFLINE_CHECK_INTERVAL=0
PROFILE_CHANGE_TEMPLATE=
RESTART_ATTEMPTS=5
SCRIPT_TIMEOUT=60
START_DEPENDENCIES=hard(ora.asm) pullup(ora.asm)
START_TIMEOUT=900
STATE_CHANGE_TEMPLATE=
STOP_DEPENDENCIES=hard(intermediate:ora.asm)
STOP_TIMEOUT=180
UPTIME_THRESHOLD=1d
USR_ORA_ENV=
USR_ORA_OPI=false
USR_ORA_STOP_MODE=
VERSION=11.2.0.1.0
 
[crsusr@staig07 sshsetup]$

这里可以看出,DG2有一个hard依赖于asm,并有一个pullup关系。关于start、stop依赖关系以及资源的属性,以后在做介绍。

This entry was posted in 数据库 and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *