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

[MOS] OCR/Vote disk maintenance operation: (add / remove / replace / move) (document ID 1674859.1)

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

[MOS] OCR/Vote disk maintenance operation: (add / remove / replace / move) (document ID 1674859.1)

Document content

Target solution prepares disk 1. Disk size 2. Bare device or block device (pre 11.2) 3. ASM disks (11.2 +) 4. Cluster file system 5. Authority 6. Redundant add / remove / replace / move OCR device1. When there is only one OCR device, add an OCRMIRROR device: 2. Delete an OCR device 3. Replace or move OCR device location 4. How to restore OCR add / remove / move voting disk when the cluster stops corresponding to 10gR2 version for 11gR1 version for 11gR2 version for modifying online OCR or Vote file: for Voting disk maintenance reference on Extended Cluster

For: Oracle Database-Enterprise Edition-versions 10.2.0.1 to 11.2.0.1.0 [releases 10.2 to 11.2]

The information contained in this document is applicable to all platforms

target

Provides steps to add, remove, replace, and move Oracle Cluster Repository (OCR) and / or Voting Disk in Oracle Clusterware 10gR2, 11gR1, and 11gR2 environments. It also includes the step of moving the OCR/voting from the bare device to the block device and the ASM device. For Oracle Clusterware 12c, refer to Document 1558920.1 Software Patch Level and 12c Grid Infrastructure OCR Backup/Restore.

This article is suitable for DBA and technical support engineers who need to modify and move OCR,voting disk. Customers have deployed a clustered environment on a set of storage and may need to migrate to new storage in the shortest downtime.

Generally speaking, once the storage already exists, you can use the cp or dd file, but there are some difficulties for the cluster because:

1. Oracle Clusterware's OCR and voting disks are used online. (including primary and mirroring)

two。 The API (ocrconfig and crsctl) provided by Oracle is more suitable for implementing these functions than the cp and dd commands.

Back up OC R and voting disk before performing the operation.

Note: when OCR and Voting disk files are stored together, like OCFS (for example, in a pre-11.2 Clusterware environment) or in the same ASM diskgroup (for example, in an Oracle Clusterware environment), in fact OCR and Voting disk are two separate files and entities, so if you want to modify or move OCR and Voting disk, you must follow the steps provided below.

Solution preparation disk

To add or replace OCR or voting disk, prepare a new disk in advance. Please refer to the disk requirements in the Clusteware/Gird Infrastructure installation documentation for each platform.

1. Disk Siz

Version 10.1:

OCR device minimum size (each): 100m

Voting disk minimum size (each): 20m

Version 10.2:

Minimum OCR device (each): 256m

Minimum Voting disk (each): 256m

Version 11.1:

Minimum OCR device (each): 280m

Minimum Voting disk (each): 280m

Version 11.2:

Minimum OCR device (each): 300m

Minimum Voting disk (each): 300m

two。 Bare device or block device (pre 11.2)

Please refer to the Clusteware/Gird Infrastructure installation documentation for each platform.

For the windows platform, use the command $CRS_HOME\ bin\ GUIOracleOBJManager.exe to create a new bare device link, for example:

\.\ VOTEDSK2

\.\ OCR2

3. ASM disks (11.2 +)

On the windows platform, please refer to Document 331796.1 How to setup ASM on Windows

On the Linux platform, please refer to Document 580153.1 How To Setup ASM on Linux Using ASMLIB Disks, Raw Devices or Block Devices?

For other platforms, please refer to the Clusterware/Gird Infrastructure installation manual OTN (Chapter: Oracle Automatic Storage Management Storage Configuration).

4. Cluster file system

If OCR is on a clustered file system, new OCR or OCRMIRROR files must be created in advance before adding / replacing, otherwise PROT-21: Invalid parameter (10.2 Invalid parameter 11.) Or PROT-30 The Oracle Cluster Registry location to be added is not accessible (for version 11.2) error.

Use root users

# touch / cluster_fs/ocrdisk.dat

# touch / cluster_fs/ocrmirror.dat

# chown root:oinstall / cluster_fs/ocrdisk.dat / cluster_fs/ocrmirror.dat

# chmod 640 / cluster_fs/ocrdisk.dat / cluster_fs/ocrmirror.dat

There is no need to create voting disk files on the cluster file system in advance.

After executing the delete command, you need to manually delete the ocr/voting file on the cluster file system.

5. Authority

For OCR devices:

Chown root:oinstall

Chmod 640

For Voting devices:

Chown: oinstall

Chmod 644

If OCR/Voting disk uses ASM disks:

Chown griduser:asmadmin

Chmod 660

6. redundancy

Voting disks (do not use even numbers):

External requires a minimum of 1 Voting disk (or 1 failure group)

Normal requires a minimum of 3 Voting disks (or 3 failure group)

High requires a minimum of 5 Voting disks (or 5 failure group)

The lack of failure group causes voting disk creation to fail. For example, ORA-15274: Not enough failgroups (3) to create voting files

OCR:

10.2 and 11.1, up to 2 OCR devices: OCR and OCRMIRROR

11.2 cycles, up to 5 OCR.

Please refer to the corresponding document Oracle for each platform. Grid Infrastructure Installation Guide gets more information

Add / remove / replace / move OCR device Note: you must log in as a root user because the root user has an OCR file. The "ocrconfig-replace" command can only be executed while CRS is running, otherwise the error "PROT-1: Failed to initialize ocrconfig" is reported.

Make sure that the CRS is running on all nodes when performing these operations, otherwise these commands will not take effect on the closed node, and there will be problems starting the CRS of the shutdown node in the future. You need to use the "ocrconfig-repair" command to repair the ocr.loc file.

For clusters with OCR in ASM disk groups and 11.2 or later, due to the existence of unpublished Bug 8604794-FAIL TO CHANGE OCR LOCATION TO DG WITH 'OCRCONFIG-REPAIR-REPLACE', using the "ocrconfig-repair" command to change the OCR location to a different ASM disk group will not work properly. The temporary workaround is to manually edit the / etc/oracle/ocr.loc or / var/opt/oracle/ocr.loc file or Windows registry HYKEY_LOCAL_MACHINE\ SOFTWARE\ Oracle\ ocr finger to point to the set disk group.

If you have any questions with OLR, please refer to How to restore OLR in 11.2 Grid Infrastructure Note 1193643.1.

Make sure you have a recent backup of OCR files before making any changes:

Ocrconfig-showbackup

If you do not have a recent OCR file backup, you can export the current OCR file. Generate an export file of the online OCR file using the following command:

Version 10.2

# ocrconfig-export-s online

Versions 11.1 and 11.2

# ocrconfig-manualbackup

Node1 2008-08-06 06:11:58 / crs/cdata/crs/backup_20080807_003158.ocr

To restore OCR using the export file, execute the following command:

# ocrconfig-import

From 11.2 onwards, please refer to How to restore ASM based OCR after complete loss of the CRS diskgroup on Linux/Unix systems Document 1062983.1

Check that OCR is healthy and run the ocrcheck command, which should return the following information:

# ocrcheck

Status of Oracle Cluster Registry is as follows:

Version: 2

Total space (kbytes): 497928

Used space (kbytes): 312

Available space (kbytes): 497616

ID: 576761409

Device/File Name: / dev/raw/raw1

Device/File integrity check succeeded

Device/File Name: / dev/raw/raw2

Device/File integrity check succeeded

Cluster registry integrity check succeeded

For versions 11.1 and above, the ocrcheck command should also return:

Logical corruption check succeeded1. When there is only one OCR device, add an OCRMIRROR device:

Add an OCR mirror device that provides the full path including the file name.

10.2 and 11.1:

# ocrconfig-replace ocrmirror

Eg:

# ocrconfig-replace ocrmirror / dev/raw/raw2

# ocrconfig-replace ocrmirror / dev/sdc1

# ocrconfig-replace ocrmirror / cluster_fs/ocrdisk.dat

> ocrconfig-replace ocrmirror\\.\ OCRMIRROR2-for Windows

11.2 ocrmirrors: after version 11.2, a maximum of 4 can be added

# ocrconfig-add

Eg:

# ocrconfig-add + OCRVOTE2

# ocrconfig-add / cluster_fs/ocrdisk.dat2. Delete an OCR device

Delete an OCR device:

10.2 and 11.1:

# ocrconfig-replace ocr

11.2mm:

# ocrconfig-delete

Eg:

# ocrconfig-delete + OCRVOTE1

* once the OCR device is deleted, the ocrmirror device is automatically converted to OCR.

* if there is only one OCR device, it is not allowed to delete OCR, and the command will return an error PROT-16.

Delete the OCR mirror device:

10.2 and 11.1:

# ocrconfig-replace ocrmirror

11.2mm:

# ocrconfig-delete

Eg:

# ocrconfig-delete + OCRVOTE2

If it is a clustered file system, the old OCR/OCRMIRROR files can be deleted after deletion.

3. Pay attention to the location of replacing or moving OCR devices. 1. Before replacing an OCR device, an ocrmirror must exist, or an error PROT-16 will be reported.

two。 If the OCR device is replaced with a device of different size, the new device size will not be displayed until the cluster is restarted.

10.2 and 11.1:

Replace the OCR device and provide the full path including the file name:

# ocrconfig-replace ocr

Eg:

# ocrconfig-replace ocr / dev/sdd1

$ocrconfig-replace ocr\\. OCR2-for Windows

Replace the OCR mirror device and provide the full path including the file name:

# ocrconfig-replace ocrmirror

Eg:

# ocrconfig-replace ocrmirrow / dev/raw/raw4

# ocrconfig-replace ocrmirrow\\.\ OCRMIRROR2-for Windows

11.2:

The command to replace OCR or OCRMIRRORs is the same as the previous version (at least 2 OCR exist):

# ocrconfig-replace-replacement

Eg:

# ocrconfig-replace / cluster_file/ocr.dat-replacement + OCRVOTE

# ocrconfig-replace + CRS-replacement + OCRVOTE4. How to restore OCR when the cluster stops

If OCR is not accessible, the CRSD process will not start, so the cluster will not be able to start completely. To restore OCR, you need to access a good OCR backup and view the automatic OCR backup:

# ocrconfig-showbackup

Restore from an OCR backup:

# ocrconfig-restore

For 11.2: if OCR is on ASM disk, but ASM DISK is also missing, please refer to:

How to restore ASM based OCR after complete loss of the CRS diskgroup on Linux/Unix systems Document 1062983.1

How to Restore OCR After the 1st ASM Diskgroup is Lost on Windows Document 1294915.1

If you do not have a valid OCR backup, you need to reinitialize OCR and voting.

For 10.2 and 11.1:

Please refer to How to Recreate OCR/Voting Disk Accidentally Deleted Document 399482.1

For 11.2:

You need to deconfig the cluster software on all nodes of the cluster and rerun the roo.sh script.

Add / remove / move voting disk Note: 1. For versions 10.2 and 11.1, the crsctl votedisk command must be run as the root user, but for versions 11.2 and above, it can be run as the grid user.

two。 For 11.2, if OCR and voting use ASM disks, then this command is the same on Windows and Unix platforms.

For prior to 11.2, back up the voting disk:

$dd if=voting_disk_name of=backup_file_name

For Windows:

Ocopy\\.\ votedsk1 o:\ backup\ votedsk1.bak

For 11.2 cycles, there is no need to back up voting disk, and voting disk is automatically backed up to OCR in the event of any configuration changes. Oracle Clusterware automatically backs up voting disk if one of the following changes occurs in voting disk:

Configuration parameters, such as misscount being added or modified

Perform voting disk add or delete operation

When you add or replace voting disk, the voting disk content is automatically restored from the VF backup to the new VF.

Corresponds to the 10gR2 version

Stop the oracle cluster (use the root user to perform crsctl stop crs) before modifying any voting disk. View the current voting disk location:

Crsctl query css votedisk

1. Add a Voting Disk that provides the full path, including the file name:

# crsctl add css votedisk-force

Eg:

# crsctl add css votedisk / dev/raw/raw1-force

# crsctl add css votedisk / cluster_fs/votedisk.dat-force

> crsctl add css votedisk\\.\ VOTEDSK2-force-for windows

two。 Delete a Voting Disk and provide the full path including the file name:

# crsctl delete css votedisk-force

Eg:

# crsctl delete css votedisk / dev/raw/raw1-force

# crsctl delete css votedisk / cluster_fs/votedisk.dat-force

> crsctl delete css votedisk\\.\ VOTEDSK1-force-for windows

3. Move a Voting Disk, provide the full path including the file name, add a device first, and then delete the old one:

# crsctl add css votedisk-force

# crsctl delete css votedisk-force

Eg:

# crsctl add css votedisk / dev/raw/raw4-force

# crsctl delete css votedisk / dev/raw/raw1-force

After modifying the Voting Disk, start the oracle cluster on all nodes

# crsctl start crs

Confirm the Voting Disk location:

# crsctl query css votedisk for 11gR1 version

Starting from 11.1.0.6, the following command can be executed online (CRS is running)

1. Add a Voting Disk that provides the full path, including the file name:

# crsctl add css votedisk

Eg:

# crsctl add css votedisk / dev/raw/raw1

# crsctl add css votedisk / cluster_fs/votedisk.dat

> crsctl add css votedisk\\.\ VOTEDSK2-for windows

two。 Delete a Voting Disk and provide the full path including the file name:

# crsctl delete css votedisk

Eg:

# crsctl delete css votedisk / dev/raw/raw1-force

# crsctl delete css votedisk / cluster_fs/votedisk.dat

> crsctl delete css votedisk\\.\ VOTEDSK1-for windows

3. Move a Voting Disk to provide the full path, including the file name

# crsctl add css votedisk

# crsctl delete css votedisk

Eg:

# crsctl add css votedisk / dev/raw/raw4

# crsctl delete css votedisk / dev/raw/raw1

Confirm the Voting Disk location:

# crsctl query css votedisk

For the 11gR2 version

Starting from 11.2, Voting Disk can be stored on ASM disk groups or cluster file systems, and when Grid Infrastructure is running, execute the following command to grid users:

1. Add a Voting Disk

a. When votedisk is located in the cluster file system:

$crsctl add css votedisk

b. When votedisk is in an ASM disk group, there is no option to add.

The number of Votedisk is determined by the redundancy of the disk group. If you want more copies of votedisk, you can move the votedisk to a more redundant disk group. See step 4.

If votedisk is removed from a normal or highly redundant disk group, you can add it back using the following command:

Alter diskgroup add disk''force

two。 Delete a Voting Disk

a. When Voting Disk is on a cluster file system:

$crsctl delete css votedisk

Or

$crsctl delete css votedisk (vdiskGUID is the File Universal Id from 'crsctl query css votedisk')

b. When Voting Disk is in ASM, there is no delete option and can only be replaced from one asm disk group to another asm disk group.

3. Move a Voting Disk on the cluster file system

$crsctl add css votedisk

$crsctl delete css votedisk

Or

$crsctl delete css votedisk

4. ASM disk group redundancy or position change

$crsctl replace votedisk |

Example: move from external redundant disk group + OCRVOTE to normal redundant disk group + CRS

1. Create new diskgroup + CRS as desired

2. $crsctl query css votedisk

# # STATE File Universal Id File Name Disk group

1. ONLINE 5e391d339a594fc7bf11f726f9375095 (ORCL:ASMDG02) [+ OCRVOTE]

Located 1 voting disk (s).

3. $crsctl replace votedisk + CRS

Successful addition of voting disk 941236c324454fc0bfe182bd6ebbcbff.

Successful addition of voting disk 07d2464674ac4fabbf27f3132d8448b0.

Successful addition of voting disk 9761ccf221524f66bff0766ad5721239.

Successful deletion of voting disk 5e391d339a594fc7bf11f726f9375095.

Successfully replaced voting disk group with + CRS.

CRS-4266: Voting file (s) successfully replaced

4. $crsctl query css votedisk

# # STATE File Universal Id File Name Disk group

1. ONLINE 941236c324454fc0bfe182bd6ebbcbff (ORCL:CRSD1) [CRS]

2. ONLINE 07d2464674ac4fabbf27f3132d8448b0 (ORCL:CRSD2) [CRS]

3. ONLINE 9761ccf221524f66bff0766ad5721239 (ORCL:CRSD3) [CRS]

Located 3 voting disk (s).

5. Move voting disk between ASM disk groups and cluster file systems

A. ASM disk group is moved to the cluster file system:

$crsctl query css votedisk

# # STATE File Universal Id File Name Disk group

1. ONLINE 6e5850d12c7a4f62bf6e693084460fd9 (ORCL:CRSD1) [CRS]

2. ONLINE 56ab5c385ce34f37bf59580232ea815f (ORCL:CRSD2) [CRS]

3. ONLINE 4f4446a59eeb4f75bfdfc4be2e3d5f90 (ORCL:CRSD3) [CRS]

Located 3 voting disk (s).

$crsctl replace votedisk / rac_shared/oradata/vote.test3

Now formatting voting disk: / rac_shared/oradata/vote.test3.

CRS-4256: Updating the profile

Successful addition of voting disk 61c4347805b64fd5bf98bf32ca046d6c.

Successful deletion of voting disk 6e5850d12c7a4f62bf6e693084460fd9.

Successful deletion of voting disk 56ab5c385ce34f37bf59580232ea815f.

Successful deletion of voting disk 4f4446a59eeb4f75bfdfc4be2e3d5f90.

CRS-4256: Updating the profile

CRS-4266: Voting file (s) successfully replaced

$crsctl query css votedisk

# # STATE File Universal Id File Name Disk group

1. ONLINE 61c4347805b64fd5bf98bf32ca046d6c (/ rac_shared/oradata/vote.disk) []

Located 1 voting disk (s).

b. Move from cluster file system to ASM disk group

$crsctl query css votedisk

# # STATE File Universal Id File Name Disk group

1. ONLINE 61c4347805b64fd5bf98bf32ca046d6c (/ rac_shared/oradata/vote.disk) []

Located 1 voting disk (s).

$crsctl replace votedisk + CRS

CRS-4256: Updating the profile

Successful addition of voting disk 41806377ff804fc1bf1d3f0ec9751ceb.

Successful addition of voting disk 94896394e50d4f8abf753752baaa5d27.

Successful addition of voting disk 8e933621e2264f06bfbb2d23559ba635.

Successful deletion of voting disk 61c4347805b64fd5bf98bf32ca046d6c.

Successfully replaced voting disk group with + CRS.

CRS-4256: Updating the profile

CRS-4266: Voting file (s) successfully replaced

[oragrid@auw2k4 crsconfig] $crsctl query css votedisk

# # STATE File Universal Id File Name Disk group

1. ONLINE 41806377ff804fc1bf1d3f0ec9751ceb (ORCL:CRSD1) [CRS]

2. ONLINE 94896394e50d4f8abf753752baaa5d27 (ORCL:CRSD2) [CRS]

3. ONLINE 8e933621e2264f06bfbb2d23559ba635 (ORCL:CRSD3) [CRS]

Located 3 voting disk (s).

6. Confirm:

$crsctl query css votedisk for modifying online OCR or Vote file operations:

For storage migration, if you use an asm disk group and keep the original size, disk group, and redundancy unchanged, we can directly add a new faiure group (disk), and then drop the old failure group (disk) to achieve the purpose of replacing the disk.

For more information, please refer to How to Swap Voting Disks Across Storage in a Diskgroup (Doc ID 1558007.1) and Exact Steps To Migrate ASM Diskgroups To Another SAN/Disk-Array/DAS/etc Without Downtime. (Doc ID 837308.1)

For Voting disk maintenance on Extended Cluster

Please refer to oracle White Paper: Oracle Clusterware 11g Release 2 (11.2)-Using standard NFS to support a third voting file for extended cluster configurations

If you have any problems using the asmca tool, please refer to How to Manually Add NFS voting disk to an Extended Cluster using ASM in 11.2 Note 1421588.1.

Refer to NOTE:866102.1-Renaming OCR Using "ocrconfig-overwrite" Fails

NOTE:390880.1-OCR Corruption after Adding/Removing voting disk to a cluster when CRS stack is running

NOTE:1573574.1-OCR Placement and Size Specification

NOTE:1558920.1-Software Patch Level and 12c Grid Infrastructure OCR Backup/Restore

NOTE:1062983.1-How to Restore ASM Based OCR After Complete Loss of the CRS Diskgroup on Linux/Unix Systems

To replace an OCR disk group

2. OCR volume group adjustment step 4

2.1. Add New Storage 4

2.2. Multipath binding configuration 4

2.3. ASMLib configuration 4

2.4. Backup OCR 5

2.5. New OCR Volume Group 5

2.6. Replace VOTE 6

2.7. Replace OCR 6

2.8. Migrate ASM SPFILE 7

2.9. Confirm if there are any other files in the old OCR disk group 8

2.10. Delete old OCR volume group 8

2.11. Delete disk 8

1. OCR volume group adjustment step 1.1. Add new storage

To establish an OCR volume group with Normal redundancy level, you need at least 3 LUN, each LUN with a minimum capacity of 1GB, and you need to configure 3 LUN to each node in the RAC cluster on the storage side.

1.2. Multipath binding configuration

Configure / etc/multipatch.conf, add the UUID of the new disk, assume that the paths after multipath binding are / dev/mapper/newocr1, / dev/mapper/newocr2, / dev/mapper/newocr3, and reload the Mutilpathd service takes effect.

1.3. ASMLib configuration

Node 1 operates as follows:

Add 3 new LUN to ASMLIB

# / usr/sbin/oracleasm createdisk OCRNEW1 / dev/mapper/newocr1

# / usr/sbin/oracleasm createdisk OCRNEW2 / dev/mapper/newocr2

# / usr/sbin/oracleasm createdisk OCRNEW3 / dev/mapper/newocr3

Node 2:

Scan for 3 new LUN:

# / usr/sbin/oracleasm scandisks

# / usr/sbin/oracleasm listdisks

1.4. Backup OCR

-- logical backup recovery

Ocrconfig-export / oracle/app/11.2.0/grid/cdata/ZFTPCCDB-crs/export_asm.bak

-- physical backup recovery

Ocrconfig-manualbackup

Ocrconfig-showbackup

Ocrcheck

1.5. Create a new OCR volume group

Set line 9999

Set pagesize 9999

Col path format a60

SELECT a.group_number, disk_number,mount_status, a.name, path FROM v$asm_disk an order by a.disk_number

Set line 999

Select name,state,free_mb,required_mirror_free_mb,usable_file_mb,a.group_number, disk_number,mount_status, path from v$asm_diskgroup a

Select a.group_number,name,TYPE,state,TOTAL_MB,free_mb from v$asm_diskgroup a

Select name,state,free_mb,required_mirror_free_mb,usable_file_mb,a.group_number from v$asm_diskgroup a

Node 1 create a new ASM volume group with Normal redundancy level

Sqlplus / as sysasm

Create diskgroup newocr normal redundancy disk

'/ dev/oracleasm/disks/neworc1'

'/ dev/oracleasm/disks/neworc2'

'/ dev/oracleasm/disks/neworc3'

Attribute 'compatible.asm'='11.2','compatible.rdbms'='11.2'

Node 1 executes the mount disk group:

ALTER DISKGROUP NEWOCR MOUNT

Crsctl stat res-t

1.6. Replace VOTE

On one of the nodes, execute under the root user:

Replace VOTE

Crsctl replace votedisk + newocr

confirm

Crsctl query css votedisk

[root@node1 ~] # crsctl replace votedisk + OCR

Successful addition of voting disk 83fc22d0d6164fd2bfc2c48c9edcd64d.

Successful deletion of voting disk afbe52656e124f8ebff3f7236ed85e32.

Successfully replaced voting disk group with + OCR.

CRS-4266: Voting file (s) successfully replaced

[root@node1 ~] # crsctl query css votedisk

# # STATE File Universal Id File Name Disk group

1. ONLINE 83fc22d0d6164fd2bfc2c48c9edcd64d (ORCL:OVDISK) [OCR]

Located 1 voting disk (s).

[root@node1 ~] #

1.7. Replace OCR

Execute under grid user

Node1:

Ocrconfig-add + newocr

Ocrconfig-delete + ocr

More / etc/oracle/ocr.loc

[root@node1 ~] # ocrconfig-add + OCR

[root@node1 ~] # more / etc/oracle/ocr.loc

# Device/file getting replaced by device + OCR

Ocrconfig_loc=+TEST

Ocrmirrorconfig_loc=+OCR

Local_only=false

[root@node1 ~] # ocrconfig-delete + TEST

[root@node1 ~] # more / etc/oracle/ocr.loc

# Device/file + TEST getting replaced by device + OCR

Ocrconfig_loc=+OCR

Local_only=false

[root@node1 ~] #

Node2 does not need to be executed:

Ocrconfig-repair-add + newocr

Ocrconfig-repair-delete + ocr

[root@node2 ~] # crsctl query css votedisk

# # STATE File Universal Id File Name Disk group

1. ONLINE afbe52656e124f8ebff3f7236ed85e32 (/ dev/asm-diskb) [TEST]

Located 1 voting disk (s).

[root@node2 ~] # crsctl query css votedisk

# # STATE File Universal Id File Name Disk group

1. ONLINE 83fc22d0d6164fd2bfc2c48c9edcd64d (ORCL:OVDISK) [OCR]

Located 1 voting disk (s).

[root@node2 ~] # more / etc/oracle/ocr.loc

# Device/file + OVDISK getting replaced by device + TEST

Ocrconfig_loc=+TEST

Local_only=false

[root@node2 ~] # more / etc/oracle/ocr.loc

# Device/file getting replaced by device + OCR

Ocrconfig_loc=+TEST

Ocrmirrorconfig_loc=+OCR

Local_only=false

[root@node2 ~] # more / etc/oracle/ocr.loc

# Device/file + TEST getting replaced by device + OCR

Ocrconfig_loc=+OCR

Local_only=false

[root@node2 ~] #

1.8. Migrate ASM SPFILE

Execute at any node under the GRID user

$asmcmd

View the current ASMSPFILE

ASMCMD > spget

Copy SPFILE to a new volume group

ASMCMD > spcopy-u + CRSDG/xx/asmparameterfile/registry.xx + newocr/spfileASM.ora

View the new SPFILE absolute path

ASMCMD > ls-l + newocr/spfileASM.ora

+ NEWOCR/XX/ASMPARAMETERFILE/REGISTRY.253.833623103

ASMCMD > spset + NEWOCR/XX/ASMPARAMETERFILE/REGISTRY.253.833623103

Modify the contents of the $ORACLE_HOME/dbs/init.ora file under two nodes for ORACLE users

SPFILE='+newocr/spfileASM.ora'

[grid@node1 ~] $asmcmd

ASMCMD > spget

+ TEST/node-cluster/ASMPARAMETERFILE/REGISTRY.253.936725677

ASMCMD > spcopy-u + TEST/node-cluster/ASMPARAMETERFILE/REGISTRY.253.936725677 + OCR/spfileASM.ora

ASMCMD > ls-l + ocr/spfileASM.ora

Type Redund Striped Time Sys Name

N spfileASM.ora = > + OCR/node-cluster/ASMPARAMETERFILE/REGISTRY.253.936729105

ASMCMD > spset + OCR/node-cluster/ASMPARAMETERFILE/REGISTRY.253.936729105

ASMCMD > spget

+ OCR/node-cluster/ASMPARAMETERFILE/REGISTRY.253.936729105

ASMCMD >

1.9. Confirm if there are any other files in the old OCR disk group

1.10. Delete the old OCR volume group

After restarting the cluster:

Node 2:

Su-grid

Sqlplus / as sysasm

Alter diskgroup OCR dismount

Exit

Node 1:

Su-grid

Sqlplus / as sysasm

Drop diskgroup ocr

Drop diskgroup OVDISK INCLUDING CONTENTS

Drop diskgroup OVDISK FORCE INCLUDING CONTENTS

1.11. Delete disk

Do the following for ROOT users on any node:

# / usr/sbin/oracleasm dropdisk OCR

Delete the multipath binding configuration and delete the contents of the original OCR disk in the configuration / etc/multipatch.conf.

Finally, the mapping to 2 nodes is removed from the storage.

About Me

.

● this article is sorted out from the network

● article is updated synchronously on itpub (http://blog.itpub.net/26736162), blog Park (http://www.cnblogs.com/lhrbest) and personal Wechat official account (xiaomaimiaolhr).

● article itpub address: http://blog.itpub.net/26736162/abstract/1/

● article blog park address: http://www.cnblogs.com/lhrbest

● pdf version of this article and wheat seedling cloud disk address: http://blog.itpub.net/26736162/viewspace-1624453/

● database written examination interview questions database and answers: http://blog.itpub.net/26736162/viewspace-2134706/

● QQ group: 230161599 WeChat group: private chat

● contact me, please add QQ friend (646634621), indicate the reason for adding

● was completed in Mordor from 09:00 on 2017-06-02 to 22:00 on 2017-06-30.

The content of the ● article comes from the study notes of wheat seedlings, and some of it is sorted out from the Internet. Please forgive me if there is any infringement or improper place.

Copyright ● all rights reserved, welcome to share this article, please reserve the source for reprint

.

Pick up your phone and use Wechat client to scan the picture on the left below to follow the Wechat official account of wheat seedlings: xiaomaimiaolhr, scan the QR code on the right to join the QQ group of wheat seedlings, and learn the most practical database technology.

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: 285

*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