Management and Maintenance of OracleCRS

Source: Internet
Author: User
Welcome to the Oracle community forum and interact with 2 million technical staff. 4. Managing VotingdiskVotingdisk is mainly used to record node member information, for example, the node members and Node Deletion records. (1) To view Votingdisk information, run the following command: crsctl

Welcome to the Oracle community forum and interact with 2 million technical staff> go to 4. Manage Voting disk (Voting disk), which is mainly used to record node member information, for example, the node members and Node Deletion records. (1) To view Voting disk information, run the following command: crsctl

Welcome to the Oracle community forum and interact with 2 million technical staff> enter


4. Manage Voting disk
Voting disk is mainly used to record node member information, such as node members and Node Deletion records.
(1) view Voting disk
To view the Voting disk information, run the following command:
Crsctl query css votedisk
For example:

 
 
  1. [oracle@node-rac1 ~]$ crsctl query css votedisk
  2. 0. 0 /dev/raw/raw3
  3. 1. 0 /dev/raw/raw4
  4. 2. 0 /dev/raw/raw5
  5. Located 3 voting disk(s).

(2) Back up Voting disk
Voting disk information is very important. You need to regularly back up votedisk, for example:
[Oracle @ node-rac1 ~] $ Dd if =/dev/raw/raw3 of =/tmp/votedisk. bak
In this way, the data is backed up to the/tmp directory.
(3) restore Voting disk
For example:
[Oracle @ node-rac1 ~] $ Dd if =/tmp/votedisk. bak of =/dev/raw/raw3

(4) Delete the voting disk image disk
To delete a voting disk, run the following command:
Crsctl delete css votedisk/dev/raw/raw5-force
This operation requires the root user identity, for example:

 
 
  1. [root@node-rac1 ~]#/app/oracrs/product/11.0.6/crs/bin/crsctl \
  2. >delete css votedisk /dev/raw/raw5
  3. Successful deletion of voting disk /dev/raw/raw5.
  4. [oracle@node-rac1 ~]$ crsctl query css votedisk
  5. 0. 0 /dev/raw/raw3
  6. 1. 0 /dev/raw/raw4

(5) Add a voting disk image disk
When adding a voting disk, run the following command:
Crsctl add css votedisk/dev/raw/raw5-force
This operation requires the root user identity, for example:

 
 
  1. [root@node-rac1 ~]#/app/oracrs/product/11.0.6/crs/bin/crsctl add css votedisk /dev/raw/raw5 Now formatting voting disk: /dev/raw/raw5.
  2. Successful addition of voting disk /dev/raw/raw5.
  3. [oracle@node-rac1 ~]$ crsctl query css votedisk
  4. crsctl query css votedisk
  5. 0. 0 /dev/raw/raw3
  6. 1. 0 /dev/raw/raw4
  7. 2. 0 /dev/raw/raw5

5. Manage OCR


OCR disks are mainly used to record the configuration information of node members, such as database, service, instance, vip address, listener, application process, and other CRS resource configuration information, OCR can be stored on bare devices or cluster file systems.
(1) Check ocr settings
You can run the following command to view the current OCR settings:

 
 
  1. [oracle@node-rac1 ~]$ ocrcheck
  2. Status of Oracle Cluster Registry is as follows :
  3. Version: 2
  4. Total space (kbytes): 4000280
  5. Used space (kbytes): 3840
  6. Available space (kbytes) : 3996440
  7. ID: 1806962807
  8. Device/File Name: /dev/raw/raw1
  9. Device/File integrity check succeeded
  10. Device/File Name: /dev/raw/raw2
  11. Device/File integrity check succeeded
  12. Cluster registry integrity check succeeded


(2) OCR backup and recovery
By default, Oracle automatically backs up OCR once every four hours and saves three valid versions, but only saves them on one node of the cluster.
To view the path of the automatic backup OCR file, run the following command:

 
 
  1. [oracle@node-rac1 ~]$ocrconfig -showbackup
  2. node-rac2 2011/03/11 13:10:27 /app/crs/product/11.0.6/crs/cdata/rac-cluster/backup00.ocr
  3. node-rac2 2011/03/11 09:10:25 /app/crs/product/11.0.6/crs/cdata/rac-cluster/backup01.ocr
  4. node-rac2 2011/03/11 05:10:24 /app/crs/product/11.0.6/crs/cdata/rac-cluster/backup02.ocr
  5. node-rac2 2011/03/10 21:10:20 /app/crs/product/11.0.6/crs/cdata/rac-cluster/day.ocr
  6. node-rac2 2011/03/10 21:10:20 /app/crs/product/11.0.6/crs/cdata/rac-cluster/week.ocr

The method for restoring OCR is also very simple, for example:
[Oracle @ node-rac1 ~] $ Ocrconfig? Restore \
>/App/clustered RS/product/11.0.6/crs/cdata/rac-cluster/backup01.ocr
In fact, OCR can also be exported and imported manually. The method is as follows:
Manually export: ocrconfig-export/tmp/ocr_bak
Manual import: ocrconfig-import/tmp/ocr_bak

(3) add an OCR image Disk
To add an OCR disk to a disk, follow these steps:
The supervisor executes the crsctl stop crs command to stop the CRS service.
Mirror creates RAW devices for image OCR, such as/dev/raw/raw11
Then execute "ocrconfig? Export command to export OCR Information
Modify the/etc/oracle/ocr. loc file to add a new raw device, for example:

 
 
  1. [oracle@node-rac1 ~]$more /etc/oracle/ocr.loc
  2. ocrconfig_loc=/dev/raw/raw1
  3. ocrmirrorconfig_loc=/dev/raw/raw2
  4. ocrmirrorconfig_loc=/dev/raw/raw11
  5. local_only=FALSE

 Execute the command "ocrconfig-import" to import the OCR backup information to the disk.
 Check the ocr settings to see if the addition is successful.
Finally, use "crsctl start crs" to start the CRS service.

6. Quickly uninstall CRS


CRS installation is very simple, but if there is a problem with CRS, it is not easy to uninstall CRS when you need to reinstall it. The following describes how to uninstall the CRS program in Linux.
(1) disable the CRS Service
Before uninstalling the CRS, you must stop the CRS service, that is, execute:
/Etc/init. d/init. crs stop
If the crs service cannot be stopped, disable the CRS service, namely:
/Etc/init. d/init. crs disable
Then restart the system.
(2) execute the delete script
First, execute $ ORA_CRS_HOME/install/rootdelete. sh on all nodes in the cluster. Here the node node-rac1 is used as an example.

 
 
  1. [root@node-rac1 install]# /app/oracrs/product/11.0.6/crs/install/rootdeinstall.sh
  2. Verifying existence of ocr.loc file
  3. Removing contents from OCR mirror device
  4. 2560+0 records in
  5. 2560+0 records out
  6. 10485760 bytes (10 MB) copied, 3.90308 seconds, 2.7 MB/s
  7. Removing contents from OCR device
  8. 2560+0 records in
  9. 2560+0 records out
  10. 10485760 bytes (10 MB) copied, 3.84383 seconds, 2.7 MB/s

Then, execute $ ORA_CRS_HOME/install/rootdeinstall. sh on any node in the machine (SET) group.

(3) uninstall crs using graphical interface OUI
Start the CRS installation welcome page under the CRS installation package directory, and click "Installed Products" on the welcome page. The following page is displayed: The Installed CRS information is displayed, click the Remove button in the lower-right corner to uninstall CRS.


(4) Delete other remaining files
The CRS uninstall program can delete most of the installation programs, but it cannot be fully uninstalled. Therefore, you need to manually delete ununinstalled files and run the following DELETE command on all nodes in the Cluster:

 
 
  1. rm -rf /app/oracrs/product/11.0.6/crs/
  2. /bin/rm -rf /var/tmp/.oracle
  3. /bin/rm -f /etc/oraInst.loc
  4. rm -rf /etc/oracle/
  5. rm -f /etc/oratab

After all the operations are completed, restart each node in the cluster and reinstall CRS.

[1] [2]

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.