RAC(11gR2) OCR BACKUP & RESTORE

首先检查下OCR盘

[[email protected]1 cdata]$ ocrcheck

Status of OracleCluster Registry is as follows :

Version                  :          3

Total space (kbytes)     :    262120

Used space (kbytes)      :      3068

Available space (kbytes) :     259052

ID                       : 1088979561

Device/File Name         :      +CRS

Device/Fileintegrity check succeeded

Device/Filenot configured

Device/Filenot configured

Device/Filenot configured

Device/Filenot configured

Cluster registry integrity checksucceeded

Logical corruption check bypassed dueto non-privileged user

[[email protected]]$ cluvfy comp ocr -n all

Verifying OCR integrity

Checking OCRintegrity...

Checking the absence ofa non-clustered configuration...

All nodes free ofnon-clustered, local-only configurations

ASM Running checkpassed. ASM is running on all specified nodes

Checking OCR configfile "/etc/oracle/ocr.loc"...

OCR config file"/etc/oracle/ocr.loc" check successful

Disk group for ocrlocation "+CRS" available on all the nodes

NOTE:

This check does notverify the integrity of the OCR contents. Execute ‘ocrcheck‘ as a privilegeduser to verify the contents of OCR.

OCR integrity checkpassed

Verification of OCRintegrity was successful.

备份asm参数文件

[[email protected]]$ sqlplus / as sysasm

SQL> createpfile=‘/tmp/asm_pfile_20150306.txt‘ from spfile;

备份OCR盘

[root@rac1 grid]#bin/ocrconfig-export /tmp/ocr_bak20150306.dmp

模拟破坏OCR盘:

[[email protected]]# dd if=/dev/zero of=/dev/oracleasm/disks/CRS bs=1024 count=1000

破坏完后,检查集群状态

[[email protected]]$ crsctl check crs

CRS-4638: Oracle HighAvailability Services is online

CRS-4537: Cluster ReadyServices is online

CRS-4529: ClusterSynchronization Services is online

CRS-4533: Event Manageris online

检查OCR一致性

[[email protected]]$ cluvfy comp ocr -n all

Verifying OCR integrity

Checking OCRintegrity...

Checking the absence ofa non-clustered configuration...

All nodes free ofnon-clustered, local-only configurations

ASM Running checkpassed. ASM is running on all specified nodes

Checking OCR configfile "/etc/oracle/ocr.loc"...

OCR config file"/etc/oracle/ocr.loc" check successful

Disk group for ocrlocation "+CRS" available on all the nodes

NOTE:

This check does notverify the integrity of the OCR contents. Execute ‘ocrcheck‘ as a privilegeduser to verify the contents of OCR.

OCR integrity checkpassed

Verification of OCRintegrity was successful.

重启CRS

[[email protected]]# bin/crsctl stop crs

CRS-2791: Startingshutdown of Oracle High Availability Services-managed resources on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.crsd‘ on ‘rac1‘

CRS-2790: Startingshutdown of Cluster Ready Services-managed resources on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.CRS.dg‘ on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.rac.db‘ on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.registry.acfs‘ on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.cvu‘ on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.oc4j‘ on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.LISTENER_SCAN1.lsnr‘ on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.LISTENER.lsnr‘ on ‘rac1‘

CRS-2677: Stop of‘ora.cvu‘ on ‘rac1‘ succeeded

CRS-2672: Attempting tostart ‘ora.cvu‘ on ‘rac2‘

CRS-2677: Stop of‘ora.LISTENER_SCAN1.lsnr‘ on ‘rac1‘ succeeded

CRS-2673: Attempting tostop ‘ora.scan1.vip‘ on ‘rac1‘

CRS-2676: Start of‘ora.cvu‘ on ‘rac2‘ succeeded

CRS-2677: Stop of‘ora.LISTENER.lsnr‘ on ‘rac1‘ succeeded

CRS-2673: Attempting tostop ‘ora.rac1.vip‘ on ‘rac1‘

CRS-2677: Stop of‘ora.scan1.vip‘ on ‘rac1‘ succeeded

CRS-2672: Attempting tostart ‘ora.scan1.vip‘ on ‘rac2‘

CRS-2677: Stop of‘ora.rac1.vip‘ on ‘rac1‘ succeeded

CRS-2672: Attempting tostart ‘ora.rac1.vip‘ on ‘rac2‘

CRS-2677: Stop of‘ora.registry.acfs‘ on ‘rac1‘ succeeded

CRS-2676: Start of‘ora.scan1.vip‘ on ‘rac2‘ succeeded

CRS-2672: Attempting tostart ‘ora.LISTENER_SCAN1.lsnr‘ on ‘rac2‘

CRS-2677: Stop of‘ora.rac.db‘ on ‘rac1‘ succeeded

CRS-2673: Attempting tostop ‘ora.DATA.dg‘ on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.FRA.dg‘ on ‘rac1‘

CRS-2676: Start of‘ora.rac1.vip‘ on ‘rac2‘ succeeded

CRS-2676: Start of‘ora.LISTENER_SCAN1.lsnr‘ on ‘rac2‘ succeeded

CRS-2677: Stop of‘ora.CRS.dg‘ on ‘rac1‘ succeeded

CRS-2677: Stop of‘ora.FRA.dg‘ on ‘rac1‘ succeeded

CRS-2677: Stop of‘ora.DATA.dg‘ on ‘rac1‘ succeeded

CRS-2673: Attempting tostop ‘ora.asm‘ on ‘rac1‘

CRS-2677: Stop of‘ora.asm‘ on ‘rac1‘ succeeded

CRS-2677: Stop of‘ora.oc4j‘ on ‘rac1‘ succeeded

CRS-2672: Attempting tostart ‘ora.oc4j‘ on ‘rac2‘

CRS-2676: Start of‘ora.oc4j‘ on ‘rac2‘ succeeded

CRS-2673: Attempting tostop ‘ora.ons‘ on ‘rac1‘

CRS-2677: Stop of‘ora.ons‘ on ‘rac1‘ succeeded

CRS-2673: Attempting tostop ‘ora.net1.network‘ on ‘rac1‘

CRS-2677: Stop of‘ora.net1.network‘ on ‘rac1‘ succeeded

CRS-2792: Shutdown ofCluster Ready Services-managed resources on ‘rac1‘ has completed

CRS-2677: Stop of‘ora.crsd‘ on ‘rac1‘ succeeded

CRS-2673: Attempting tostop ‘ora.crf‘ on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.ctssd‘ on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.evmd‘ on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.asm‘ on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.mdnsd‘ on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.drivers.acfs‘ on ‘rac1‘

CRS-2677: Stop of‘ora.crf‘ on ‘rac1‘ succeeded

CRS-2677: Stop of‘ora.evmd‘ on ‘rac1‘ succeeded

CRS-2677: Stop of‘ora.mdnsd‘ on ‘rac1‘ succeeded

CRS-2677: Stop of‘ora.ctssd‘ on ‘rac1‘ succeeded

CRS-2677: Stop of‘ora.asm‘ on ‘rac1‘ succeeded

CRS-2673: Attempting tostop ‘ora.cluster_interconnect.haip‘ on ‘rac1‘

CRS-2677: Stop of‘ora.cluster_interconnect.haip‘ on ‘rac1‘ succeeded

CRS-2673: Attempting tostop ‘ora.cssd‘ on ‘rac1‘

CRS-2677: Stop of‘ora.drivers.acfs‘ on ‘rac1‘ succeeded

CRS-2677: Stop of‘ora.cssd‘ on ‘rac1‘ succeeded

CRS-2673: Attempting tostop ‘ora.gipcd‘ on ‘rac1‘

CRS-2677: Stop of‘ora.gipcd‘ on ‘rac1‘ succeeded

CRS-2673: Attempting tostop ‘ora.gpnpd‘ on ‘rac1‘

CRS-2677: Stop of‘ora.gpnpd‘ on ‘rac1‘ succeeded

CRS-2793: Shutdown ofOracle High Availability Services-managed resources on ‘rac1‘ has completed

CRS-4133: Oracle HighAvailability Services has been stopped.

启动

[[email protected]]# bin/crsctl start crs

CRS-4123: Oracle HighAvailability Services has been started.

观察告警日志

[[email protected] grid]# tail -100f/u01/app/11.2.0.4/grid/log/rac1/alertrac1.log

[/u01/app/11.2.0.4/grid/bin/orarootagent.bin(21098)]CRS-5016:Process"/u01/app/11.2.0.4/grid/bin/acfsregistrymount" spawned by agent"/u01/app/11.2.0.4/grid/bin/orarootagent.bin" for action"check" failed: details at "(:CLSN00010:)" in"/u01/app/11.2.0.4/grid/log/rac1/agent/crsd/orarootagent_root/orarootagent_root.log"

2015-03-0523:52:17.725:

[/u01/app/11.2.0.4/grid/bin/orarootagent.bin(21098)]CRS-5016:Process"/u01/app/11.2.0.4/grid/bin/acfsregistrymount" spawned by agent"/u01/app/11.2.0.4/grid/bin/orarootagent.bin" for action"check" failed: details at "(:CLSN00010:)" in"/u01/app/11.2.0.4/grid/log/rac1/agent/crsd/orarootagent_root/orarootagent_root.log"

2015-03-0618:46:58.197:

[/u01/app/11.2.0.4/grid/bin/orarootagent.bin(21098)]CRS-5822:Agent‘/u01/app/11.2.0.4/grid/bin/orarootagent_root‘ disconnected from server.Details at (:CRSAGF00117:) {0:3:22642} in/u01/app/11.2.0.4/grid/log/rac1/agent/crsd/orarootagent_root/orarootagent_root.log.

2015-03-0618:47:00.102:

[ctssd(20098)]CRS-2405:TheCluster Time Synchronization Service on host rac1 is shutdown by user

[client(7931)]CRS-10001:06-Mar-1518:47 ACFS-9290: Waiting for ASM to shutdown.

2015-03-0618:47:01.435:

[mdnsd(19905)]CRS-5602:mDNSservice stopping by request.

2015-03-0618:47:11.506:

[cssd(19972)]CRS-1603:CSSDon node rac1 shutdown by user.

2015-03-0618:47:11.721:

[cssd(19972)]CRS-1660:TheCSS daemon shutdown has completed

2015-03-0618:47:12.299:

[ohasd(15515)]CRS-2767:Resourcestate recovery not attempted for ‘ora.cssdmonitor‘ as its target state isOFFLINE

2015-03-0618:47:12.326:

[ohasd(15515)]CRS-2769:Unableto failover resource ‘ora.cssdmonitor‘.

2015-03-0618:47:13.861:

[ohasd(15515)]CRS-2769:Unableto failover resource ‘ora.cssd‘.

2015-03-0618:47:19.278:

[gpnpd(19923)]CRS-2329:GPNPDon node rac1 shutdown.

2015-03-0618:49:03.584:

[client(8370)]CRS-2302:Cannotget GPnP profile. Error CLSGPNP_NO_DAEMON (GPNPD daemon is not running).

2015-03-0618:49:03.585:

[client(8370)]CRS-1013:TheOCR location in an ASM disk group is inaccessible. Details in/u01/app/11.2.0.4/grid/log/rac1/client/crsctl_oracle.log.

...

2015-03-0618:54:12.281:

[client(9870)]CRS-2302:Cannotget GPnP profile. Error CLSGPNP_NO_DAEMON (GPNPD daemon is not running).

2015-03-0618:54:12.282:

[client(9870)]CRS-1013:TheOCR location in an ASM disk group is inaccessible. Details in/u01/app/11.2.0.4/grid/log/rac1/client/crsctl_oracle.log.

2015-03-0618:54:12.311:

[ohasd(9880)]CRS-2112:TheOLR service started on node rac1.

2015-03-0618:54:12.326:

[ohasd(9880)]CRS-1301:OracleHigh Availability Service started on node rac1.

2015-03-0618:54:12.382:

[ohasd(9880)]CRS-8017:location:/etc/oracle/lastgasp has 2 reboot advisory log files, 0 were announced and 0errors occurred

2015-03-0618:54:16.606:

[/u01/app/11.2.0.4/grid/bin/orarootagent.bin(9940)]CRS-2302:Cannotget GPnP profile. Error CLSGPNP_NO_DAEMON (GPNPD daemon is not running).

2015-03-0618:54:17.004:

[client(10084)]CRS-2302:Cannotget GPnP profile. Error CLSGPNP_NO_DAEMON (GPNPD daemon is not running).

2015-03-0618:54:17.005:

[client(10084)]CRS-1013:TheOCR location in an ASM disk group is inaccessible. Details in/u01/app/11.2.0.4/grid/log/rac1/client/crsctl_oracle.log.

2015-03-0618:54:20.445:

[client(10096)]CRS-2302:Cannotget GPnP profile. Error CLSGPNP_NO_DAEMON (GPNPD daemon is not running).

2015-03-0618:54:20.446:

[client(10096)]CRS-1013:TheOCR location in an ASM disk group is inaccessible. Details in/u01/app/11.2.0.4/grid/log/rac1/client/crsctl_oracle.log.

2015-03-0618:54:20.878:

[gpnpd(10132)]CRS-2328:GPNPDstarted on node rac1.

2015-03-0618:54:23.356:

[cssd(10234)]CRS-1713:CSSDdaemon is started in clustered mode

2015-03-0618:54:25.105:

[ohasd(9880)]CRS-2767:Resourcestate recovery not attempted for ‘ora.diskmon‘ as its target state is OFFLINE

2015-03-0618:54:25.106:

[ohasd(9880)]CRS-2769:Unableto failover resource ‘ora.diskmon‘.

2015-03-0618:54:27.522:

[cssd(10234)]CRS-1714:Unableto discover any voting files, retrying discovery in 15 seconds; Details at(:CSSNM00070:) in /u01/app/11.2.0.4/grid/log/rac1/cssd/ocssd.log

2015-03-0618:54:42.598:

[cssd(10234)]CRS-1714:Unableto discover any voting files, retrying discovery in 15 seconds; Details at(:CSSNM00070:) in /u01/app/11.2.0.4/grid/log/rac1/cssd/ocssd.log

2015-03-0618:54:57.663:

[cssd(10234)]CRS-1714:Unableto discover any voting files, retrying discovery in 15 seconds; Details at(:CSSNM00070:) in /u01/app/11.2.0.4/grid/log/rac1/cssd/ocssd.log

2015-03-0618:55:12.729:

[cssd(10234)]CRS-1714:Unableto discover any voting files, retrying discovery in 15 seconds; Details at(:CSSNM00070:) in /u01/app/11.2.0.4/grid/log/rac1/cssd/ocssd.log

2015-03-0618:55:26.190:

[client(10467)]CRS-1013:TheOCR location in an ASM disk group is inaccessible. Details in/u01/app/11.2.0.4/grid/log/rac1/client/crsctl_oracle.log.

2015-03-0618:55:27.787:

[cssd(10234)]CRS-1714:Unableto discover any voting files, retrying discovery in 15 seconds; Details at(:CSSNM00070:) in /u01/app/11.2.0.4/grid/log/rac1/cssd/ocssd.log

2015-03-0618:55:42.844:

[cssd(10234)]CRS-1714:Unableto discover any voting files, retrying discovery in 15 seconds; Details at(:CSSNM00070:) in /u01/app/11.2.0.4/grid/log/rac1/cssd/ocssd.log

发现错误啦

检查集群进程状态

[[email protected]]# bin/crsctl check crs

CRS-4638: Oracle HighAvailability Services is online

CRS-4535: Cannotcommunicate with Cluster Ready Services

CRS-4530:Communications failure contacting Cluster Synchronization Services daemon

CRS-4534: Cannotcommunicate with Event Manager

检查OCR盘

[[email protected]]# bin/ocrcheck

PROT-602: Failed toretrieve data from the cluster registry

PROC-26: Error whileaccessing the physical storage

ORA-15077: could notlocate ASM instance serving a required diskgroup

ORA-29701: unable toconnect to Cluster Synchronization Service

恢复开始...

停掉CRS

[[email protected]]# bin/crsctl stop crs -f

CRS-2791: Startingshutdown of Oracle High Availability Services-managed resources on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.mdnsd‘ on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.crf‘ on ‘rac1‘

CRS-2677: Stop of‘ora.crf‘ on ‘rac1‘ succeeded

CRS-2673: Attempting tostop ‘ora.gipcd‘ on ‘rac1‘

CRS-2677: Stop of‘ora.mdnsd‘ on ‘rac1‘ succeeded

CRS-2677: Stop of‘ora.gipcd‘ on ‘rac1‘ succeeded

CRS-2673: Attempting tostop ‘ora.gpnpd‘ on ‘rac1‘

CRS-2677: Stop of‘ora.gpnpd‘ on ‘rac1‘ succeeded

CRS-2793: Shutdown ofOracle High Availability Services-managed resources on ‘rac1‘ has completed

CRS-4133: Oracle HighAvailability Services has been stopped.

以独占方式启动CRS

[[email protected]]# bin/crsctl start crs -excl -nocrs

CRS-4123: Oracle HighAvailability Services has been started.

CRS-2672: Attempting tostart ‘ora.mdnsd‘ on ‘rac1‘

CRS-2676: Start of‘ora.mdnsd‘ on ‘rac1‘ succeeded

CRS-2672: Attempting tostart ‘ora.gpnpd‘ on ‘rac1‘

CRS-2676: Start of‘ora.gpnpd‘ on ‘rac1‘ succeeded

CRS-2672: Attempting tostart ‘ora.cssdmonitor‘ on ‘rac1‘

CRS-2672: Attempting tostart ‘ora.gipcd‘ on ‘rac1‘

CRS-2676: Start of‘ora.cssdmonitor‘ on ‘rac1‘ succeeded

CRS-2676: Start of‘ora.gipcd‘ on ‘rac1‘ succeeded

CRS-2672: Attempting tostart ‘ora.cssd‘ on ‘rac1‘

CRS-2672: Attempting tostart ‘ora.diskmon‘ on ‘rac1‘

CRS-2676: Start of‘ora.diskmon‘ on ‘rac1‘ succeeded

CRS-2676: Start of‘ora.cssd‘ on ‘rac1‘ succeeded

CRS-2672: Attempting tostart ‘ora.drivers.acfs‘ on ‘rac1‘

CRS-2679: Attempting toclean ‘ora.cluster_interconnect.haip‘ on ‘rac1‘

CRS-2672: Attempting tostart ‘ora.ctssd‘ on ‘rac1‘

CRS-2681: Clean of‘ora.cluster_interconnect.haip‘ on ‘rac1‘ succeeded

CRS-2672: Attempting tostart ‘ora.cluster_interconnect.haip‘ on ‘rac1‘

CRS-2676: Start of‘ora.ctssd‘ on ‘rac1‘ succeeded

CRS-2676: Start of‘ora.drivers.acfs‘ on ‘rac1‘ succeeded

CRS-2676: Start of‘ora.cluster_interconnect.haip‘ on ‘rac1‘ succeeded

CRS-2672: Attempting tostart ‘ora.asm‘ on ‘rac1‘

CRS-2676: Start of‘ora.asm‘ on ‘rac1‘ succeeded

添加ASM磁盘组,用来作为新的OCR盘

[[email protected]]$ sqlplus / as sysasm

SQL>create diskgroup OCRVOTE external redundancy disk ‘ORCL:OCRVOTE‘ attribute‘compatible.asm‘=‘11.2.0.0.0‘,‘compatible.rdbms‘=‘11.2.0.0.0‘;

将ASM参数文件创建到OCRVOTE盘上

SQL>create spfile=‘+OCRVOTE‘ from pfile=‘/tmp/asm_pfile_20150306.txt‘;

File created.

查看参数文件

[[email protected]]$ asmcmd

ASMCMD> pwd

+OCRVOTE/rac/ASMPARAMETERFILE

ASMCMD> ls

REGISTRY.253.873671069

OCR指向新盘,所有节点都改

[[email protected] grid]# vi/etc/oracle/ocr.loc

ocrconfig_loc=+OCRVOTE

local_only=FALSE

Restore OCRcontents from manual backup

[[email protected] grid]# bin/ocrconfig -import /tmp/ocr_bak20150306.dmp

注,如果这边是用自动备份(即/u01/app/11.2.0.4/grid/cdata/rac/下的几个备份)的话,则用ocrconfig-restore /…./backup00.ocr来restore

ocrcheck一把

[[email protected]]# bin/ocrcheck

Status of OracleCluster Registry is as follows :

Version                  :          3

Total space (kbytes)     :    262120

Used space (kbytes)      :      3100

Available space (kbytes) :     259020

ID                       :  408582211

Device/File Name         :  +OCRVOTE

Device/Fileintegrity check succeeded

Device/Filenot configured

Device/Filenot configured

Device/Filenot configured

Device/Filenot configured

Cluster registry integrity checksucceeded

Logical corruption check succeeded

Restore voting disk

[[email protected]]# bin/crsctl query css votedisk

Located 0 votingdisk(s).

[[email protected]]# bin/crsctl replace votedisk +OCRVOTE

Successful addition ofvoting disk 794a9685b6154fbfbf7095ba72878188.

Successfully replacedvoting disk group with +OCRVOTE.

CRS-4266: Votingfile(s) successfully replaced

[[email protected]]# bin/crsctl query css votedisk

##  STATE   File Universal Id               File Name Disk group

--  -----   -----------------               --------- ---------

1. ONLINE  794a9685b6154fbfbf7095ba72878188 (ORCL:OCRVOTE) [OCRVOTE]

Located 1 votingdisk(s).

重启CRS

[[email protected]]# bin/crsctl stop crs

CRS-2791: Startingshutdown of Oracle High Availability Services-managed resources on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.drivers.acfs‘ on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.mdnsd‘ on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.ctssd‘ on ‘rac1‘

CRS-2673: Attempting tostop ‘ora.asm‘ on ‘rac1‘

CRS-2677: Stop of‘ora.mdnsd‘ on ‘rac1‘ succeeded

CRS-2677: Stop of‘ora.asm‘ on ‘rac1‘ succeeded

CRS-2673: Attempting tostop ‘ora.cluster_interconnect.haip‘ on ‘rac1‘

CRS-2677: Stop of‘ora.cluster_interconnect.haip‘ on ‘rac1‘ succeeded

CRS-2677: Stop of‘ora.drivers.acfs‘ on ‘rac1‘ succeeded

CRS-2677: Stop of‘ora.ctssd‘ on ‘rac1‘ succeeded

CRS-2673: Attempting tostop ‘ora.cssd‘ on ‘rac1‘

CRS-2677: Stop of‘ora.cssd‘ on ‘rac1‘ succeeded

CRS-2673: Attempting tostop ‘ora.gipcd‘ on ‘rac1‘

CRS-2677: Stop of‘ora.gipcd‘ on ‘rac1‘ succeeded

CRS-2673: Attempting tostop ‘ora.gpnpd‘ on ‘rac1‘

CRS-2677: Stop of‘ora.gpnpd‘ on ‘rac1‘ succeeded

CRS-2793: Shutdown ofOracle High Availability Services-managed resources on ‘rac1‘ has completed

CRS-4133: Oracle HighAvailability Services has been stopped.

[[email protected]]# bin/crsctl start crs

CRS-4123: Oracle HighAvailability Services has been started.

[[email protected] grid]# bin/crsctl stat res -t               --11g集群资源启动需要点时间,过一会就OK了

CRS-4535: Cannotcommunicate with Cluster Ready Services

CRS-4000: CommandStatus failed, or completed with errors.

[[email protected]]# bin/crsctl stat res -t

CRS-4535: Cannotcommunicate with Cluster Ready Services

CRS-4000: CommandStatus failed, or completed with errors.

[[email protected]]# bin/crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE       SERVER                  STATE_DETAILS

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.CRS.dg

ONLINE  OFFLINE      rac1

OFFLINE OFFLINE      rac2

ora.DATA.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.FRA.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.LISTENER.lsnr

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.asm

ONLINE  ONLINE      rac1                    Started

ONLINE  ONLINE      rac2                    Started

ora.gsd

OFFLINE OFFLINE      rac1

OFFLINE OFFLINE      rac2

ora.net1.network

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.ons

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.registry.acfs

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

1       ONLINE  ONLINE       rac1

ora.cvu

1       ONLINE  ONLINE       rac1

ora.oc4j

1       ONLINE  ONLINE       rac1

ora.rac.db

1       ONLINE  ONLINE       rac1                     Open

2       ONLINE  ONLINE       rac2                     Open

ora.rac1.vip

1       ONLINE  ONLINE       rac1

ora.rac2.vip

1       ONLINE  ONLINE       rac2

ora.scan1.vip

1       ONLINE  ONLINE       rac1

注意,因为这里我们磁盘组的名字已经换了,因此这里需要修改下CRS资源,并配置开机启动

查看原资源具体信息

[[email protected]]# bin/crsctl stat res ora.CRS.dg -p

NAME=ora.CRS.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=CRSresource 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.4.0

[[email protected] grid]# bin/crsctl stop res ora.CRS.dg

CRS-2500: Cannot stopresource ‘ora.CRS.dg‘ as it is not running

CRS-4000: Command Stopfailed, or completed with errors.

[[email protected]]# bin/crsctl stop res ora.CRS.dg -f

CRS-2500: Cannot stop resource ‘ora.CRS.dg‘ as itis not running

CRS-4000: Command Stopfailed, or completed with errors.

[[email protected]]# bin/crsctl  delete res ora.CRS.dg-f

[[email protected]]# bin/crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE       SERVER                  STATE_DETAILS

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.DATA.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.FRA.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.LISTENER.lsnr

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.asm

ONLINE  ONLINE      rac1                    Started

ONLINE  ONLINE      rac2                    Started

ora.gsd

OFFLINE OFFLINE      rac1

OFFLINE OFFLINE      rac2

ora.net1.network

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.ons

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.registry.acfs

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

1       ONLINE  ONLINE       rac1

ora.cvu

1       ONLINE  ONLINE       rac1

ora.oc4j

1       ONLINE  ONLINE       rac1

ora.rac.db

1       ONLINE  ONLINE       rac1                     Open

2       ONLINE  ONLINE       rac2                     Open

ora.rac1.vip

1       ONLINE  ONLINE       rac1

ora.rac2.vip

1       ONLINE  ONLINE       rac2

ora.scan1.vip

1       ONLINE  ONLINE       rac1

已经删除了ora.CRS.dg资源,现在添加新的资源

[[email protected]]$ crsctl add res ora.OCRVOTE.dg -type ora.diskgroup.type -attr"ACL=‘owner:grid:rwx,pgrp:oinstall:rwx,other::r--‘,AUTO_START=always,VERSION=11.2.0.4.0"-i

[[email protected]]$ crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE       SERVER                  STATE_DETAILS

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.DATA.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.FRA.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.LISTENER.lsnr

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.OCRVOTE.dg

OFFLINE OFFLINE      rac1

OFFLINE OFFLINE      rac2

ora.asm

ONLINE  ONLINE      rac1                    Started

ONLINE  ONLINE      rac2                    Started

ora.gsd

OFFLINE OFFLINE      rac1

OFFLINE OFFLINE      rac2

ora.net1.network

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.ons

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.registry.acfs

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

1       ONLINE  ONLINE       rac1

ora.cvu

1       ONLINE  ONLINE       rac1

ora.oc4j

1       ONLINE  ONLINE       rac1

ora.rac.db

1       ONLINE  ONLINE       rac1                     Open

2       ONLINE  ONLINE       rac2                     Open

ora.rac1.vip

1       ONLINE  ONLINE       rac1

ora.rac2.vip

1       ONLINE  ONLINE       rac2

ora.scan1.vip

1       ONLINE  ONLINE       rac1

启动资源

[[email protected]]$ crsctl start res ora.OCRVOTE.dg

CRS-2672: Attempting tostart ‘ora.OCRVOTE.dg‘ on ‘rac1‘

CRS-2672: Attempting tostart ‘ora.OCRVOTE.dg‘ on ‘rac2‘

CRS-2676: Start of‘ora.OCRVOTE.dg‘ on ‘rac2‘ succeeded

CRS-2676: Start of‘ora.OCRVOTE.dg‘ on ‘rac1‘ succeeded

[[email protected]]$ crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE       SERVER                  STATE_DETAILS

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.DATA.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.FRA.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.LISTENER.lsnr

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.OCRVOTE.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.asm

ONLINE  ONLINE      rac1                    Started

ONLINE  ONLINE      rac2                    Started

ora.gsd

OFFLINE OFFLINE      rac1

OFFLINE OFFLINE      rac2

ora.net1.network

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.ons

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.registry.acfs

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

1       ONLINE  ONLINE       rac1

ora.cvu

1       ONLINE  ONLINE       rac1

ora.oc4j

1       ONLINE  ONLINE       rac1

ora.rac.db

1       ONLINE  ONLINE       rac1                     Open

2       ONLINE  ONLINE       rac2                     Open

ora.rac1.vip

1       ONLINE  ONLINE       rac1

ora.rac2.vip

1       ONLINE  ONLINE       rac2

ora.scan1.vip

1       ONLINE  ONLINE       rac1

至此OCR、VOTINGDISK恢复完成。

RAC(11gR2) OCR BACKUP & RESTORE

时间: 2024-08-02 07:07:08

RAC(11gR2) OCR BACKUP & RESTORE的相关文章

Oracle Study之--AIX RAC下OCR磁盘故障(PROT-602)

Oracle Study之--AIX RAC下OCR磁盘故障(PROT-602) ********************************************************************************  Welcome to AIX Version 5.3!                                                **                                                  

重新初始化RAC的OCR盘和Votedisk盘,修复RAC系统

假设我们的RAC环境中OCR磁盘和votedisk磁盘全部被破坏,并且都没有备份,那么我们该如何恢复我们的RAC环境.最近简单的办法就是重新初始化我们的ocr盘和votedisk盘,把集群中的所有相关资源重新注册到OCR磁盘和votedisk磁盘中. 1.停掉所有节点的Clusterware Stack [[email protected] bin]# ./crsctl stop crs Stopping resources. Successfully stopped CRS resources

Oracle RAC 11gR2+WebLogic集群6节点项目安装实施维护视频课程套餐

Oracle RAC 11gR2+WebLogic集群6节点项目安装实施维护视频课程套餐 套餐介绍:高薪必学的企业级核心应用Oracle+WebLogic集群教程. 基础:介绍Oracle RAC 11gR2集群组件概念,ASM存储,体系结构,WebLogic集群相关概念,域,JDK,JVM,数据源,连接池. 实战:1.企业级应用系统项目的实施流程,如调研,方案,规划等;2.Linux统安装与环境配置,ASM存储配置,Oracle 11gRAC集群软件安装与数据RAC数据库创建,RAC集群日常维

Oracle RAC 重建OCR和Votedisk

哈哈,刚说最后一篇,闲的无聊又搞了个测试. 环境: OS:redhat 5.8 DB:Oracle 10.2.0.5 raw device 我们要养成经常备份ocr跟votedisk的习惯.但是ocr跟votedisk没有备份也是可以重建的.就像控制文件.但是过程较为麻烦.以下为详细步骤: 首先备份ocr跟votedisk: [[email protected] ~]# [[email protected] ~]# ocrcheck Status of Oracle Cluster Regist

Oracle RAC 11gR2 修改本地及SCAN监听端口

昨天同事说有套RAC集群客户要求修改数据库的监听端口,在处理的过程中,发现网上的相关资料都不是很全面,所以整理了一下,希望给其他有需要的朋友提供一点有利的参考资料.具体操作过程如下: --修改配置信息中保存的端口信息 使用GRID用户修改 srvctl modify listener -l LISTENER -p 15210srvctl modify scan_listener -p 15210 --修改本地监听及SCAN监听端口 以oracle用户登陆,执行以下修改: alter system

Linux系统Oracle RAC 11gR2安装维护(前言)

在学习RAC集群技术这块时,发现网上大多数的文章以及博客写的都不是很完整,缺斤少两.在本人经过多次实验后整理出一篇完整的博客,方便自己记忆. 1.VMware虚拟机安装两台主机与共享存储配 2.为两台虚拟机安装Oracle Linux操作系统 3.安装RAC之前配置Linux系统环境相关参数 4.Linux系统中ssh通信与存储ASM磁盘配置 5.Grid Infrastructure集群组件安装与调试 6.ASM磁盘组创建与CRS磁盘组的镜像 7.Oracle RAC 11gR2集群数据库软件

转 RMAN: RAC Backup, Restore and Recovery using RMAN

PURPOSE The purpose of this document is to give a quick guide for using RMAN on RAC databases. We will follow this points: 1. Verify the database mode and archive destination.2. Verify connectivity using sqlnet for target and catalog.3. Determine the

SQL Service Database BACKUP & RESTORE

1. 完整恢复模式下的数据库备份 1 USE master; 2 ALTER DATABASE AdventureWorks2012 SET RECOVERY FULL; 3 GO 4 -- Back up the AdventureWorks2012 database to new media set (backup set 1). 5 BACKUP DATABASE AdventureWorks2012 6 TO DISK = 'Z:\SQLServerBackups\AdventureWo

利用Oracle Rac 11gR2 新特性renamedg来更改diskgroup name

交代环境: AIX7.1 + 双节点Oracle Rac 11.2.0.3 由于此套Rac并非自己部门安装,是开发部安装,现交由运维部分来管理,客户需要要将asm  diskgroup name 安装部门规范来命令.遂需要将oasmdgdata1更改为datadg. 幸好Oracle的版本是11gR2,在11gR2中,Oracle有一项新特性,可以直接使用renamedg命令更改diskgroup的名称. 下面是具体的操作步骤. [email protected]:/home/grid>asmc