怎樣註冊 diskgroup 到集羣

以前使用 renamedg  對 ora.CRS.dg 進行重命名ora.DUPCRS.dg
但是 renamedg 有個缺點就是沒法將改動的信息同步到整個集羣層面,而且改動前的dg 會依舊保留在集羣層面:
例如如下所看到的:所以需要手動去清除,和又一次註冊改動後的dg 信息。post

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

 

grid :11203同步

db: 11202it

 


[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                                       
       
                                    

【測試一】io


--------這是經過 crsctl add  res ora.DUPCRS.dg -type ora.diskgroup.type  來註冊後 ora.DUPCRS.dg 的配置信息:asm


--------集羣資源狀態信息例如如下:class

[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=   -------------這裏也有問題。但是我認爲這個參數不是很是要緊grid

 

 

【測試二】

------刪除 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 ~]$

相關文章
相關標籤/搜索