Oracle RAC voting disk (votedisk)

Source: Internet
Author: User

Today is. Due to the analysis of deadlock, writing RAC was delayed. Today, I will write an article about the disk management log voting in RAC. Record it here.
Votedisk is created because of split-brain caused by network. The voting disk is stored in ASM at 11 GB, and there are several requirements if it is stored in ASM.
First, all the voting disk files must be placed in ASM;
Second, the number of voting disks in asm cannot be deleted or added, but determined by the normal, high, and external redundancy levels of asm.
For example, in normal, there must be three fault groups with three votedisks, and in high, there must be five fault groups with five votedisks, so there is only one votedisk in external.
Third, voting on disk files at 11 GB does not support the backup and restoration of dd commands, but supports crsctl-related commands.
Fourth, the number of voting disk files is an odd number, which facilitates voting and election. The maximum number of voting disk files is 15, but generally there is no need to exceed 5.
This section describes the election process of voting disks in split-brain mode caused by the network.
If I have three RAC instance nodes, namely A, B, and C, when node A goes down, I try to stop the response resource in 11 GB and then remove the node, so why does it remove the node? That's because when split-brain occurs
When split-brain occurs, it is divided into two parts: A is A part of the vote for 1, BC is A part of the vote for 2, then more election will select the party with more votes, thus removing; this is an example of three nodes.
So how to deal with the RAC composed of two instances? In this case, voting on the disk will play a certain role. When split-brain occurs, each party will have one vote, and no one will be able to remove anyone? What should I do? Then Oracle will select
The party that first obtains a large number of voting disk files will be retained into a cluster to remove the other party. The heartbeat of a disk is usually detected by a voting disk in a shared disk.
Eg:
[Grid @ rac-one peer] $ crsctl get css disktimeout
CRS-4678: Successful get disktimeout 200 for Cluster Synchronization Services.
[Grid @ rac-one peer] $
Manage through ocssd Process
How can I move the voting disk file to another asm disk group?
Eg:
[Grid @ rac-two ~] $ Sqlplus/as sysasm
 
SQL * Plus: Release 11.2.0.4.0 Production on Tue Mar 25 23:31:24 2014
 
Copyright (c) 1982,201 3, Oracle. All rights reserved.
 

Connected:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production
With the Real Application Clusters and Automatic Storage Management options
 
SQL> col name for a20
SQL> col path for a40
SQL> set linesize 200
SQL> select a. name, B. name, B. path, B. voting_file from v $ asm_disk B, v $ asm_diskgroup a where a. group_number = B. group_number;
 
NAME PATH V
---------------------------------------------------------------------------------
DATADG DATADG_0000/dev/asm-diskg N
TESTDG TESTDG_0004/dev/asm-diskh N
TESTDG TESTDG_0000/dev/asm-diski N
TESTDG TESTDG_0001/dev/asm-diskj N
TESTDG TESTDG_0003/dev/asm-diskf N
GIDG GIDG_0001/dev/asm-diskc Y
TESTDG TESTDG_0002/dev/asm-diskk N
GIDG GIDG_0000/dev/asm-diskd Y
GIDG GIDG_0002/dev/asm-diske Y
DATADG DATADG_0001/dev/asm-diskb N
 
10 rows selected.
 
SQL> exit
You can also use crsctl query css votedisk to obtain information.
[Grid @ rac-two ~] $ Crsctl query css votedisk
# STATE File Universal Id File Name Disk group
------------------------------------------
1. ONLINE 3da4160ba0334f66bf4b2e6e9b38cceb (/dev/asm-diskd) [GIDG]
2. ONLINE 2797b9ed25e84f34bf8fa5948c8fedb6 (/dev/asm-diske) [GIDG]
3. ONLINE 69ade332aa214f3abfd8b77a410019b0 (/dev/asm-diskc) [GIDG]
Located 3 voting disk (s ).
When votedisk belongs to the asm group and thus moves votedisk, The crsctl add css votedisk command cannot be used; otherwise, an error is reported. However, if the original votedisk is a cluster file system file, you can use this command to replace
Complete the operation.
[Grid @ rac-two ~] $ Crsctl add css votedisk + testdg
CRS-4671: This command is not supported for ASM diskgroups.
CRS-4000: Command Add failed, or completed with errors.
Move votedisk from the disk group GIDG to TESTDG
[Grid @ rac-two ~] $ Crsctl replace votedisk + TESTDG
Successful addition of voting disk 98f00004772c74fc0bf8c5ddc699775f1.
Successful addition of voting disk aa123f79eef94f9ebf12ed0953a3caa6.
Successful addition of voting disk 42e16333baa44f78bf00840265bff13d.
Successful deletion of voting disk 3da4160ba0334f66bf4b2e6e9b38cceb.
Successful deletion of voting disk 2797b9ed25e84f34bf8fa5948c8fedb6.
Successful deletion of voting disk 69ade332aa214f3abfd8b77a410019b0.
Successfully replaced voting disk group with + TESTDG.
CRS-4266: Voting file (s) successfully replaced
[Grid @ rac-two ~] $ Crsctl query css votedisk
# STATE File Universal Id File Name Disk group
------------------------------------------
1. ONLINE 98f00004772c74fc0bf8c5ddc699775f1 (/dev/asm-diski) [TESTDG]
2. ONLINE aa123f79eef94f9ebf12ed0953a3caa6 (/dev/asm-diskk) [TESTDG]
3. ONLINE 42e16333baa44f78bf00840265bff13d (/dev/asm-diskf) [TESTDG]
Located 3 voting disk (s ).
[Grid @ rac-two ~] $
Back up the voting disk file.
I just introduced that backup is not required.
If the disk file is damaged, how can this problem be solved?
First, enable crs resources in exclusive mode.
Crsctl start crs-excl
If it is in asm, use crsctl replace votedisk + diskgroup
Complete repair
If the cluster file system exists, you need to view the votedisk information, crsctl query css votedisk, delete the original invalid votedisk, and then add the votedisk
Command: crsctl add css votedisk 'path ',
Then use root to stop crs and crsctl stop crs.
Then start crs with root, crsctl start crs

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.