首页 > 代码库 > 怎样注冊 diskgroup 到集群

怎样注冊 diskgroup 到集群

之前使用 renamedg  对 ora.CRS.dg 进行重命名ora.DUPCRS.dg
可是 renamedg 有个缺点就是无法将改动的信息同步到整个集群层面,并且改动前的dg 会依旧保留在集群层面:
例如以下所看到的:因此须要手动去清除,和又一次注冊改动后的dg 信息。

                                    rename
需求: ora.CRS.dg   --------------》 ora.DUPCRS.dg
       register ora.DUPCRS.dg into cluster

 

grid :11203

db: 11202

 


[grid@vmrac1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
               ONLINE  ONLINE       vmrac1                                      
               ONLINE  ONLINE       vmrac2                                      
ora.CRS.dg
               ONLINE  UNKNOWN      vmrac1                                      
               ONLINE  OFFLINE      vmrac2                                      
ora.DATANEW.dg
               ONLINE  ONLINE       vmrac1                                      
               ONLINE  ONLINE       vmrac2                                      
ora.DUPCRS.dg
               ONLINE  OFFLINE      vmrac1                                      
               ONLINE  UNKNOWN      vmrac2                                       
       
                                    

【測试一】


--------这是通过 crsctl add  res ora.DUPCRS.dg -type ora.diskgroup.type  来注冊后 ora.DUPCRS.dg 的配置信息:


--------集群资源状态信息例如以下:

[grid@vmrac1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
               ONLINE  ONLINE       vmrac1                                      
               ONLINE  ONLINE       vmrac2                                      
ora.CRS.dg
               ONLINE  UNKNOWN      vmrac1                                      
               ONLINE  OFFLINE      vmrac2                                      
ora.DATANEW.dg
               ONLINE  ONLINE       vmrac1                                      
               ONLINE  ONLINE       vmrac2                                      
ora.DUPCRS.dg
               ONLINE  OFFLINE      vmrac1                                      
               ONLINE  UNKNOWN      vmrac2                                      
ora.FLASH.dg
               ONLINE  ONLINE       vmrac1                                      
               ONLINE  ONLINE       vmrac2                                       

 
 -----配置结果显然是不正确的。


                                 
[grid@vmrac1 ~]$ crsctl stat res ora.DUPCRS.dg -p
NAME=ora.DUPCRS.dg
TYPE=ora.diskgroup.type
ACL=owner:grid: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=30
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
TYPE_VERSION=1.2
UPTIME_THRESHOLD=1d
USR_ORA_ENV=
USR_ORA_OPI=false
USR_ORA_STOP_MODE=
VERSION=   -------------这里也有问题。可是我认为这个參数不是非常要紧

 

 

【測试二】

------删除 DUPCRS dg:
[grid@vmrac1 ~]$ crsctl delete res ora.DUPCRS.dg

------注冊资源ora.DUPCRS.dg
[grid@vmrac1 ~]$  crsctl add  res ora.DUPCRS.dg -type ora.diskgroup.type -attr

"ACL=‘owner:grid:rwx,pgrp:oinstall:rwx,other::r--‘,AUTO_START=always,VERSION=11.2.0.2.0" -i

-----查看ora.DUPCRS.dg 配置信息:
[grid@vmrac1 ~]$ crsctl stat res ora.DUPCRS.dg -p
NAME=ora.DUPCRS.dg
TYPE=ora.diskgroup.type
ACL=owner:grid:rwx,pgrp:oinstall:rwx,other::r--
ACTION_FAILURE_TEMPLATE=
ACTION_SCRIPT=
AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%
ALIAS_NAME=
AUTO_START=always
CHECK_INTERVAL=300
CHECK_TIMEOUT=30
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
TYPE_VERSION=1.2
UPTIME_THRESHOLD=1d
USR_ORA_ENV=
USR_ORA_OPI=false
USR_ORA_STOP_MODE=
VERSION=11.2.0.2.0

----------再次查看集群中ora.DUPCRS.dg 状态信息:
[grid@vmrac1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
               ONLINE  ONLINE       vmrac1                                      
               ONLINE  ONLINE       vmrac2                                      
ora.CRS.dg
               ONLINE  UNKNOWN      vmrac1                                      
               ONLINE  OFFLINE      vmrac2                                      
ora.DATANEW.dg
               ONLINE  ONLINE       vmrac1                                      
               ONLINE  ONLINE       vmrac2                                      
ora.DUPCRS.dg
               OFFLINE OFFLINE      vmrac1                                      
               OFFLINE OFFLINE      vmrac2                                      
ora.FLASH.dg
               ONLINE  ONLINE       vmrac1                                      
               ONLINE  ONLINE       vmrac2                                      

 


------------须要又一次启动一下ora.DUPCRS.dg 资源:                                 
[grid@vmrac1 ~]$ crsctl start res ora.DUPCRS.dg
CRS-2672: Attempting to start ‘ora.DUPCRS.dg‘ on ‘vmrac2‘
CRS-2672: Attempting to start ‘ora.DUPCRS.dg‘ on ‘vmrac1‘
CRS-2676: Start of ‘ora.DUPCRS.dg‘ on ‘vmrac1‘ succeeded
CRS-2676: Start of ‘ora.DUPCRS.dg‘ on ‘vmrac2‘ succeeded


-----------再次确认dg 状态信息:
[grid@vmrac1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
               ONLINE  ONLINE       vmrac1                                      
               ONLINE  ONLINE       vmrac2                                      
ora.CRS.dg
               ONLINE  UNKNOWN      vmrac1                                      
               ONLINE  OFFLINE      vmrac2                                      
ora.DATANEW.dg
               ONLINE  ONLINE       vmrac1                                      
               ONLINE  ONLINE       vmrac2                                      
ora.DUPCRS.dg
               ONLINE  ONLINE       vmrac1 ---------状态正确了                                     
               ONLINE  ONLINE       vmrac2                                      
ora.FLASH.dg
               ONLINE  ONLINE       vmrac1                                      
               ONLINE  ONLINE       vmrac2                                      

[grid@vmrac1 ~]$

怎样注冊 diskgroup 到集群