怎样注冊 diskgroup 到集群

Posted cynchanpin

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了怎样注冊 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

 


[[email protected] ~]$ 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 的配置信息:


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

[[email protected] ~]$ 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                                       

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


                                 
[[email protected] ~]$ 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:
[[email protected] ~]$ crsctl delete res ora.DUPCRS.dg

------注冊资源ora.DUPCRS.dg
[[email protected] ~]$  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 配置信息:
[[email protected] ~]$ 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 状态信息:
[[email protected] ~]$ 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 资源:                                 
[[email protected] ~]$ 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 状态信息:
[[email protected] ~]$ 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                                      

[[email protected] ~]$

以上是关于怎样注冊 diskgroup 到集群的主要内容,如果未能解决你的问题,请参考以下文章

Oracle数据库集群添加表空间操作规范

Zookeeper集群搭建

怎样利用WordPress创建自己定义注冊表单插件

集群通信组件Tribes之怎样维护集群成员信息

redis主从集群 主挂掉 java怎样调用从

浅析 vSAN 磁盘组架构和缓存盘的“消亡”