Use import/export to back up and restore OCR (10 Gb)

Source: Internet
Author: User

Oracle recommends that you back up OCR when you adjust the cluster, such as before adding or deleting nodes. You can use export to back up to a specified file. If replace or restore is performed, we recommend that you use the cluvfy comp ocr-n all command to perform a comprehensive check.

Run the following command under an oracle user:

[Oracle @ felix1 bin] $ cluvfy comp ocr-n all

Verifying OCR integrity

Checking OCR integrity...

Checking the absence of a non-clusteredconfiguration...

All nodes free of non-clustered, local-onlyconfigurations.

Uniqueness check for OCR device passed.

Checking the version of OCR...

OCR of correct Version "2" exists.

Checking data integrity of OCR...

Data integrity check for OCR passed.

OCR integrity check passed.

Verification of OCR integrity was successful.

[Oracle @ felix1 bin] $

(1) Disable crs for all nodes

[Root @ felix1 bin] #./crsctl stop crs

Stopping resources. This cocould take severalminutes.

Successfully stopped CRS resources.

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

[Root @ felix1 bin] #

[Root @ felix2 bin] #./crsctl stop crs

Stopping resources. This cocould take severalminutes.

Successfully stopped CRS resources.

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

[Root @ felix2 bin] #

(2) Export OCR content

Cd $ CRS_HOME/bin

(Be sure to run the command under the root user)

[Root @ felix1 bin] #./ocrconfig-export ocr_exp.exp

(3) Start CRS

[Root @ felix2 bin] #./crsctl start crs

Attempting to start CRS stack

The CRS stack will be started shortly

[Root @ felix1 bin] #./crsctl start crs

Attempting to start CRS stack

The CRS stack will be started shortly

(4) Check the CRS status

[Root @ felix2 bin] #./crsctl check crs

CSS appears healthy

CRS appears healthy

EVM appears healthy

[Root @ felix2 bin] #

(5) destroy OCP content

[Root @ felix2 bin] #./ocrcheck

Status of Oracle Cluster Registry is as follows:

Version: 2

Total space (kbytes): 521836

Used space (kbytes): 3852

Available space (kbytes): 517984

ID: 383273474

Device/File Name:/dev/raw/raw1

Device/Fileintegrity check succeeded

Device/Filenot configured

Cluster registry integrity check succeeded

[Root @ felix2 bin] #

[Root @ felix2 bin] #Ddif =/dev/zero of =/dev/raw/raw1 bs = 1024 count = 102400

102400 + 0 records in

102400 + 0 records out

104857600 bytes (105 MB) copied, 143.294 seconds, 732 kB/s

[Root @ felix2 bin] #

(6) Check OCR consistency

[Root @ felix1 bin] #./ocrcheck

PROT-601: Failed to initialize ocrcheck

[Root @ felix1 bin] #

Check failed

(7) use the cluvfy tool to check consistency

[Oracle @ felix1 bin] $./cluvfy comp ocr-n all

Verifying OCR integrity

Unable to retrieve nodelist from Oracleclusterware.

Verification cannot proceed.

[Oracle @ felix1 bin] $

Check also failed

(8) use import to restore OCR content

[Root @ felix1 bin] #./ocrconfig-import/u01/oracle/ocr_exp.exp

PROT-19: Cannot proceed while clusterware isrunning. Shutdown clusterware first

[Root @ felix1 bin] #

Cluster needs to be stopped

[Root @ felix1 bin] #./crsctl stop crs

OCR initialization failed with invalid format: PROC-22: The OCR backend has an invalid format

[Root @ felix1 bin] #

Restart OS:

Reboot

After restart:

[Root @ felix1 bin] # ps-ef | grep d. bin

Root 3852 2532 0 00:00:00 pts/1 grep d. bin

[Root @ felix1 bin] #./ocrconfig-import/u01/oracle/ocr_exp.exp

[Root @ felix1 bin] # ps-ef | grep d. bin

Oracle 4090 4089 1? 00:00:00/u01/oracle/10.2.0/crs_1/bin/evmd. bin

Root 4260 3061 3? 00:00:00/u01/oracle/10.2.0/crs_1/bin/crsd. bin reboot

Root 4693 4267 0? 00:00:00/u01/oracle/10.2.0/crs_1/bin/oprocd. binrun-t 1000-m 500-f

Root 4737 2532 0 00:00:00 pts/1 grep d. bin

[Root @ felix1 bin] #

Start crs and check the crs resource status:

[Root @ felix2 bin] #./crs_stat-t

Name Type Target State Host

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

Ora. felix. db application ONLINE felix1

Ora... x1.inst application ONLINE felix1

Ora... x2.inst application ONLINE felix2

Ora... SM1.asm application ONLINE felix1

Ora... X1.lsnr application ONLINE felix1

Ora. felix1.gsd application ONLINE felix1

Ora. felix1.ons application ONLINE felix1

Ora. felix1.vip application ONLINE felix1

Ora... SM2.asm application ONLINE felix2

Ora... X2.lsnr application ONLINE felix2

Ora. felix2.gsd application ONLINE felix2

Ora. felix2.ons application ONLINE felix2

Ora. felix2.vip application ONLINE felix2

[Root @ felix2 bin] #

All resources are OK.

(9) Check the OCR status again

[Root @ felix2 bin] #./ocrcheck

Status of Oracle Cluster Registry is as follows:

Version: 2

Total space (kbytes): 521836

Used space (kbytes): 3852

Available space (kbytes): 517984

ID: 1105086789

Device/File Name:/dev/raw/raw1

Device/Fileintegrity check succeeded

Device/Filenot configured

Cluster registry integrity check succeeded

[Root @ felix2 bin] #

(11) check using the cluvfy Tool

[Oracle @ felix2 bin] $./cluvfy comp crs-n all

Verifying CRS integrity

Checking CRS integrity...

Checking daemon liveness...

Liveness check passed for "CRS daemon ".

Checking daemon liveness...

Liveness check passed for "CSS daemon ".

Checking daemon liveness...

Liveness check passed for "EVM daemon ".

Checking CRS health...

CRS health check passed.

CRS integrity check passed.

Verification of CRS integrity was successful.

[Oracle @ felix2 bin] $

(12) Check crs

[Oracle @ felix2 bin] $./crsctl check crs

CSS appears healthy

CRS appears healthy

EVM appears healthy

[Oracle @ felix2 bin] $

[Reference to RAC-Zhang Xiaoming]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.