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 to add OCR mirror disks and mirror disk groups

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly explains the "Oracle add OCR mirror disk and mirror disk group method is what", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "Oracle add OCR mirror disk and mirror disk group method is what" it!

Add OCR mirrored disks / mirrored disk groups:

View current information:

[grid @ rac1 rac1] $ocrcheck

Status of Oracle Cluster Registry is as follows:

Version: 3

Total space (kbytes): 262120

Used space (kbytes): 3288

Available space (kbytes): 258832

ID: 785902757

Device/File Name: + OCR

[root @ rac1 ~] # / oracle/grid/crs_1/bin/crsctl query css votedisk

# # STATE File Universal Id File Name Disk group

\ 1. ONLINE 5d0d201e0ab24f66bf24bfd4a88f2f30 (/ dev/asm-disk2) [OCR]

\ 2. ONLINE 9520d9d3ab8d4fefbfe5d05b62dac9cf (/ dev/asm-disk3) [OCR]

\ 3. ONLINE 361f26ddd0b34feabfeba6a1123533d7 (/ dev/asm-disk4) [OCR]

Located 3 voting disk (s).

Add a mirror disk:

[root @ rac1 ~] # / oracle/grid/crs_1/bin/ocrconfig-add / dev/asm-disk5

[root @ rac1 ~] # / oracle/grid/crs_1/bin/ocrcheck

Status of Oracle Cluster Registry is as follows:

Version: 3

Total space (kbytes): 262120

Used space (kbytes): 3288

Available space (kbytes): 258832

ID: 785902757

Device/File Name: + OCR

Device/File integrity check succeeded

Device/File Name: / dev/asm-disk5

Device/File integrity check succeeded

Delete the mirror disk:

[root @ rac1 ~] # / oracle/grid/crs_1/bin/ocrconfig-delete / dev/asm-disk5

The significance of a separate mirror disk is that when you use a bare device to store OCR/VF, you can mirror a single bare device disk.

Add an OCR mirrored disk group:

(1) create a disk group:

Create diskgroup OCR2 normal redundancy disk'/ dev/asm-disk6','/dev/asm-disk7','/ dev/asm-disk8' ATTRIBUTE 'compatible.asm'='11.2.0.0.0'

/ / check whether the OCR2 disk group is in the mount state on both nodes.

(2) add OCR mirrored disk group:

[root @ rac1 ~] # / oracle/grid/crs_1/bin/ocrconfig-add + OCR2

(3) ocrcheck to view OCR devices

[grid @ rac1 ~] $ocrcheck

Status of Oracle Cluster Registry is as follows:

Version: 3

Total space (kbytes): 262120

Used space (kbytes): 3304

Available space (kbytes): 258816

ID: 785902757

Device/File Name: + OCR

Device/File integrity check succeeded

Device/File Name: + OCR2

Device/File integrity check succeeded

There is no Voting File information in the mirrored disk and disk group, and it cannot be added. VF can only replace the current VF disk group with replace.

Replace the demo:

Currently:

[grid @ rac1 ~] $crsctl query css votedisk

# # STATE File Universal Id File Name Disk group

\ 1. ONLINE 5d0d201e0ab24f66bf24bfd4a88f2f30 (/ dev/asm-disk2) [OCR]

\ 2. ONLINE 9520d9d3ab8d4fefbfe5d05b62dac9cf (/ dev/asm-disk3) [OCR]

\ 3. ONLINE 361f26ddd0b34feabfeba6a1123533d7 (/ dev/asm-disk4) [OCR]

Replace replacement:

[root @ rac1 ~] # / oracle/grid/crs_1/bin/crsctl replace votedisk + OCR2

Successful addition of voting disk 3a6ec9fdcf4b4f3ebf8efebcbd5b748c.

Successful addition of voting disk 06963edca0eb4f3ebf78a5695cea1bc1.

Successful addition of voting disk 90dab584c1a24fc0bffa1c20b0aaf1d0.

Successful deletion of voting disk 5d0d201e0ab24f66bf24bfd4a88f2f30.

Successful deletion of voting disk 9520d9d3ab8d4fefbfe5d05b62dac9cf.

Successful deletion of voting disk 361f26ddd0b34feabfeba6a1123533d7.

Successfully replaced voting disk group with + OCR2.

CRS-4266: Voting file (s) successfully replaced

/ / you can see deletion from the display

View that changes have taken place:

[grid @ rac1 ~] $crsctl query css votedisk

# # STATE File Universal Id File Name Disk group

\ 1. ONLINE 3a6ec9fdcf4b4f3ebf8efebcbd5b748c (/ dev/asm-disk6) [OCR2]

\ 2. ONLINE 06963edca0eb4f3ebf78a5695cea1bc1 (/ dev/asm-disk7) [OCR2]

\ 3. ONLINE 90dab584c1a24fc0bffa1c20b0aaf1d0 (/ dev/asm-disk8) [OCR2]

Located 3 voting disk (s).

If we add a disk to the disk group of OCR/VF, then VF and OCR will automatically synchronize to the newly added disk.

Test:

Add a disk to the OCR2 disk group

SQL > alter diskgroup ocr2 add disk'/ dev/asm-disk5'

No change in crsctl view:

[grid @ rac1 ~] $crsctl query css votedisk

# # STATE File Universal Id File Name Disk group

\ 1. ONLINE 3a6ec9fdcf4b4f3ebf8efebcbd5b748c (/ dev/asm-disk6) [OCR2]

\ 2. ONLINE 06963edca0eb4f3ebf78a5695cea1bc1 (/ dev/asm-disk7) [OCR2]

\ 3. ONLINE 90dab584c1a24fc0bffa1c20b0aaf1d0 (/ dev/asm-disk8) [OCR2]

View query:

SQL > select name,path,voting_file from v$asm_disk

NAME PATH V

OCR2_0000 / dev/asm-disk6 Y

OCR_0000 / dev/asm-disk2 N

OCR_0001 / dev/asm-disk3 N

OCR_0002 / dev/asm-disk4 N

OCR2_0001 / dev/asm-disk7 Y

OCR2_0002 / dev/asm-disk8 Y

OCR2_0003 / dev/asm-disk5 N

DATA_0000 / dev/asm-disk1 N

From the view, we can see that the newly added disk does not have voting file. What if I kick out a disk and / dev/asm-disk6 at this time?

Delete / dev/asm-disk6

SQL > alter diskgroup ocr2 drop disk OCR2_0000

Note that you need to write the alias of the name disk corresponding to / dev/asm-disk6 in ASM.

Diskgroup altered.

Check it again (here it comes! )

[grid @ rac1 ~] $crsctl query css votedisk

# # STATE File Universal Id File Name Disk group

\ 1. ONLINE 6b0b1252344a4f5fbf56d18ba7b4b49f (/ dev/asm-disk7) [OCR2]

\ 2. ONLINE 78057d6e288c4f73bf4df35b12bc0686 (/ dev/asm-disk8) [OCR2]

\ 3. ONLINE 30dbcc684e724ff5bf2e2e5e8279c2ab (/ dev/asm-disk5) [OCR2]

Query through the view:

Select name,path,voting_file from v$asm_disk where path='/dev/asm-disk5'

NAME PATH V

OCR2_0003 / dev/asm-disk5 Y

Thank you for your reading, the above is the "Oracle add OCR mirror disk and mirror disk group method is what" the content, after the study of this article, I believe you add OCR mirror disk and mirror disk group method for Oracle has a deeper understanding of this problem, the specific use of the need for you to practice verification. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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