今天把一个rac的数据重启时遇到了如下错误,提示找不到一个叫FGDG的磁盘组资源:
[grid@srcbdb1 ~]$ srvctl start database -d dcdb
PRCR-1079 : Failed to start resource ora.dcdb.dbCRS-2640: Required resource 'ora.FGDG.dg' is missing.
改磁盘组的确不存在,之前删除掉了,而且使用crsctl -t -v查看资源组时的确没有看大:
[grid@srcbdb1 ~]$ cs
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE srcbdb1
ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE srcbdb1
ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE srcbdb2
ora....N2.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE srcbdb1
ora....N3.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE srcbdb1
ora.SFRA.dg ora....up.type 0/5 0/ ONLINE ONLINE srcbdb1
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE srcbdb1
ora.cvu ora.cvu.type 0/5 0/0 ONLINE ONLINE srcbdb1
ora.dcdb.db ora....se.type 0/2 0/1 OFFLINE OFFLINE
ora.gsd ora.gsd.type 0/5 0/ OFFLINE OFFLINE
ora....network ora....rk.type 0/5 0/ ONLINE ONLINE srcbdb1
ora....network ora....rk.type 0/5 0/ OFFLINE OFFLINE
ora.oc4j ora.oc4j.type 0/5 0/0 ONLINE ONLINE srcbdb1
ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE srcbdb1
ora....ry.acfs ora....fs.type 0/5 0/ ONLINE ONLINE srcbdb1
ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE srcbdb2
ora.scan2.vip ora....ip.type 0/0 0/0 ONLINE ONLINE srcbdb1
ora.scan3.vip ora....ip.type 0/0 0/0 ONLINE ONLINE srcbdb1
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE srcbdb1
ora....B1.lsnr application 0/5 0/0 ONLINE ONLINE srcbdb1
ora....db1.gsd application 0/5 0/0 OFFLINE OFFLINE
ora....db1.ons application 0/3 0/0 ONLINE ONLINE srcbdb1
ora....db1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE srcbdb1
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE srcbdb2
ora....B2.lsnr application 0/5 0/0 ONLINE ONLINE srcbdb2
ora....db2.gsd application 0/5 0/0 OFFLINE OFFLINE
ora....db2.ons application 0/3 0/0 ONLINE ONLINE srcbdb2
ora....db2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE srcbdb2
因此怀疑是之前删除该磁盘组后,Database资源的配置信息没有被更新,查看一下database资源的配置发现:
[grid@srcbdb2 ~]$ crsctl status resource ora.dcdb.db -f
NAME=ora.dcdb.db
TYPE=ora.database.type
STATE=OFFLINE
TARGET=OFFLINE
ACL=owner:Oracle:rwx,pgrp:oinstall:rwx,other::r--
ACTION_FAILURE_TEMPLATE=
ACTION_SCRIPT=
ACTIVE_PLACEMENT=1
AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%
AUTO_START=restore
CARDINALITY=2
CARDINALITY_ID=0
CHECK_INTERVAL=1
CHECK_TIMEOUT=30
CLUSTER_DATABASE=true
CREATION_SEED=327
DATABASE_TYPE=RAC
DB_UNIQUE_NAME=dcdb
DEFAULT_TEMPLATE=PROPERTY(RESOURCE_CLASS=database) PROPERTY(DB_UNIQUE_NAME= CONCAT(PARSE(%NAME%, ., 2), %USR_ORA_DOMAIN%, .)) ELEMENT(INSTANCE_NAME= %GEN_USR_ORA_INST_NAME%) ELEMENT(DATABASE_TYPE= %DATABASE_TYPE%)
DEGREE=1
DESCRIPTION=Oracle Database resource
ENABLED=1
FAILOVER_DELAY=0
FAILURE_INTERVAL=60
FAILURE_THRESHOLD=1
GEN_AUDIT_FILE_DEST=/soft/oracle/admin/dcdb/adump
GEN_START_OPTIONS=
GEN_START_OPTIONS@SERVERNAME(srcbdb1)=open
GEN_START_OPTIONS@SERVERNAME(srcbdb2)=open
GEN_USR_ORA_INST_NAME=
GEN_USR_ORA_INST_NAME@SERVERNAME(srcbdb1)=dcdb1
GEN_USR_ORA_INST_NAME@SERVERNAME(srcbdb2)=dcdb2
HOSTING_MEMBERS=
ID=ora.dcdb.db
INSTANCE_FAILOVER=0
LOAD=1
LOGGING_LEVEL=1
MANAGEMENT_POLICY=AUTOMATIC
NLS_LANG=
NOT_RESTARTING_TEMPLATE=
OFFLINE_CHECK_INTERVAL=0
ONLINE_RELOCATION_TIMEOUT=0
ORACLE_HOME=/soft/oracle/product/11.2.0.2/dbh
PLACEMENT=restricted
PROFILE_CHANGE_TEMPLATE=
RESTART_ATTEMPTS=2
ROLE=PRIMARY
SCRIPT_TIMEOUT=60
SERVER_POOLS=ora.dcdb
SPFILE=+DATA/dcdb/spfiledcdb.ora
START_DEPENDENCIES=hard(ora.DATA.dg,) weak(type:ora.listener.type,global:type:ora.scan_listener.type,uniform:ora.ons,global:ora.gns) pullup(ora.DATA.dg,)
START_TIMEOUT=600
STATE_CHANGE_TEMPLATE=
STOP_DEPENDENCIES=hard(intermediate:ora.asm,shutdown:ora.DATA.dg,shutdown:)
STOP_TIMEOUT=600
TYPE_VERSION=2.2
UPTIME_THRESHOLD=1h
USR_ORA_DB_NAME=dcdb
USR_ORA_DOMAIN=
USR_ORA_ENV=
USR_ORA_FLAGS=
USR_ORA_INST_NAME=
USR_ORA_INST_NAME@SERVERNAME(srcbdb1)=dcdb1
USR_ORA_INST_NAME@SERVERNAME(srcbdb2)=dcdb2
USR_ORA_OPEN_MODE=open
USR_ORA_OPI=false
USR_ORA_STOP_MODE=immediate
VERSION=11.2.0.2.0
在database的启动和停止的关联资源中的确有FGDG磁盘组资源,而这是不存在的,于是使用如下命令修改database关联的asm磁盘组
[grid@srcbdb2 ~]$ srvctl modify database -d dcdb -a "DATA,SFRA"