Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the method for Oracle RAC to migrate and replace OCR disks?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "what is the method of Oracle RAC migration and replacement of OCR disk". In daily operation, I believe that many people have doubts about the method of Oracle RAC migration and replacement of OCR disk. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubt of "what is the method of Oracle RAC migration and replacement of OCR disk". Next, please follow the editor to study!

Case background: due to a problem with the OCR disk group storage used when installing the cluster, you need to migrate to a new disk group.

The documents involved are:

1) OCR file

2) VOTING file

3) spfile file of ASM instance

Old OCR disk group name: + OCR

New OCR disk group name: + GRID

1. Migrate OCR files

Grid@pgylinux01-or@+ASM1 > ocrcheck

Status of Oracle Cluster Registry is as follows:

Version: 3

Total space (kbytes): 262120

Used space (kbytes): 3604

Available space (kbytes): 258516

ID: 1076986448

Device/File Name: + ocr

Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check bypassed due to non-privileged user

The OCR file is now in the OCR disk group

There are two ways to migrate OCR files:

Method 1: add a new location and delete the old location

[root@pgylinux01-or bin] # / oracle/grid/11.2.0.4/bin/ocrconfig-add + grid

# View the path of OCR disk

Grid@pgylinux01-or@+ASM1 > ocrcheck

Status of Oracle Cluster Registry is as follows:

Version: 3

Total space (kbytes): 262120

Used space (kbytes): 3600

Available space (kbytes): 258520

ID: 1076986448

Device/File Name: + ocr

Device/File integrity check succeeded

Device/File Name: + grid

Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check bypassed due to non-privileged user

You can also confirm the OCR file path by looking at the / etc/oracle/ocr.loc file

Oracle@pgylinux01-or@+ASM1 > cat / etc/oracle/ocr.loc

# Device/file getting replaced by device + grid

Ocrconfig_loc=+ocr

Ocrmirrorconfig_loc=+grid

At this time, one copy of the OCR file is saved in the + OCR and + GRID disk groups, and the copy in the + OCR disk can be deleted.

[root@pgylinux01-or bin] # / oracle/grid/11.2.0.4/bin/ocrconfig-delete + ocr

Method 2: replace directly with replace

[root@pgylinux01-or bin] # / oracle/grid/11.2.0.4/bin/ocrconfig-replace + ocr-replacement + grid

PROT-28: Cannot delete or replace the only configured Oracle Cluster Registry location

Prompt that there is only one OCR file, can not do delete and replace operation, need to add an OCR file, and then replace, add to which disk can be added, here directly use + GRID disk.

[root@pgylinux01-or bin] # / oracle/grid/11.2.0.4/bin/ocrconfig-add + grid

[root@pgylinux01-or bin] # / oracle/grid/11.2.0.4/bin/ocrconfig-replace + ocr-replacement + grid

PROT-29: The Oracle Cluster Registry location is already configured

The replacement is complete, and the OCR file has been transferred to the + GRID disk group.

2. Migrate VOTING files

# View the current VOTING file path

Grid@pgylinux01-or@+ASM1 > crsctl query css votedisk

# # STATE File Universal Id File Name Disk group

1. ONLINE 0de070fb41ae4f30bfd17c9dc7668f01 (ORCL:DATA_01) [OCR]

Located 1 voting disk (s).

# replace VOTING file to + GRID disk group

Grid@pgylinux01-or@+ASM1 > crsctl replace votedisk + grid

Successful addition of voting disk 53e1a6d5ebf84f41bf22d54601a9028f.

Successful deletion of voting disk 0de070fb41ae4f30bfd17c9dc7668f01.

Successfully replaced voting disk group with + grid.

CRS-4266: Voting file (s) successfully replaced

Grid@pgylinux01-or@+ASM1 > crsctl query css votedisk

# # STATE File Universal Id File Name Disk group

1. ONLINE 53e1a6d5ebf84f41bf22d54601a9028f (ORCL:DATA_03) [GRID]

Located 1 voting disk (s).

The replacement is complete, and the VOTING file has been transferred to the + GRID disk group.

3. Rebuild the spfile file of the ASM instance

SQL > CREATE PFILE='/home/grid/asm_pfile.ora' from spfile

File created.

SQL > CREATE SPFILE='+GRID' FROM PFILE='/home/grid/asm_pfile.ora'

File created.

All files are migrated, and restart the cluster to complete the migration. The old OCR disk group is no longer needed and can be deleted.

At this point, the study on "what is the method of Oracle RAC migration to replace OCR disk" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report