Which three statements are true about displaying the location of voting files, OCR files, or OLR files in Oracle Clusterware 12c on a UNIX system?
A.
Use cat /etc/oracle/ocr.loc to view the location of the OCR if stored in ASM.
B.
Use ocrcheck command to view the location of the OCR only if stored in a file system.
C.
Use crsctl querry votedisk to view the location of voting files if stored in ASM.
D.
Use the ls command in the asmcmd utility to view the location of voting files if stored in ASM.
E.
Use crsctl query votedisk to view the location of voting files if stored in a file system.
F.
Use cat /etc/oracle/olr.loc to view the location of the OCR and OLR if stored on a file system.
Explanation:
B: The OCRCHECK utility displays the version of the OCR’s block format, total space available and used space, OCRID, and the OCR locations that you have
configured
Use the ocrconfig -add command to add an OCR location to a shared file system or Oracle Automatic Storage Management (Oracle ASM) disk group.
Note: The example shows using the ocrcheck -config -details command to obtain the location of OCR in an Oracle ASM disk group.
Using OCRCHECK to Obtain OCR Information:
$ ocrcheck -config -details
Oracle Cluster Registry configuration is :
Device/File Name : +ocrvd11/mjk_1/OCRFILE/registry.255.842574113
Device/File Name : +ocrdv2/mjk_1/OCRFILE/registry.255.842574125
E: To determine the current voting disk by issuing the following command:
crsctl query votedisk css
F: The olr.loc file consists of the OLR config file location and the crs_home location.
$ cat olr.loc
olrconfig_loc=/u01/app/oracle/grid/11.2.0/cdata/<hostname>.olr
crs_home=/u01/app/oracle/grid/11.2.0
So, by default the location is olrconfig_loc =<GRID_HOME>/cdata/<hostname>.olr.
References:
https://docs.oracle.com/database/121/CWADD/ocrsyntax.htm#CWADD92028
https://gjilevski.com/2009/09/23/what-is-a-voting-disk/
To determine the location of the OCR:
$ ocrcheck config
To determine the location of the voting disk:
# crsctl query css votedisk
The location of the OCR file can be determined by using the cat /etc/oracle/ocr.loc command. Because these files are always located on shared storage, the command can be executed from any node.
The OCR can also be located by using the ocrcheck utility, provided that the path to the utility is known or the path has been added to the PATH environment variable.
# ocrcheck
———————-
#crsctl query css votedisk
-Oracle Cluster Registry configuration is :
Device/File Name : +DATA
## STATE File Universal Id File Name Disk group
— —– —————– ——— ———
1. ONLINE 620281e2ca184ffbbf549a3ea0326ecf (/dev/asmdisk1p1) [DATA]
2. ONLINE 4222108c7a504f0abf464cb75bb555e6 (/dev/asmdisk1p10) [DATA]
3. ONLINE ff5d5ccd2fa04f70bffba241b89de6be (/dev/asmdisk1p11) [DATA]
——————————
By default, OLR is located at Grid_home/cdata/hostname.olr. You can manage the
OLR by using the ocrcheck, ocrdump, and ocrconfig utilities with the -local option. To see the location of the OLR, use the ocrcheck utility:
# ocrcheck -config -local
You can check the status of the OLR as follows:
# ocrcheck -local
I think the correct answers A,B,C
I don’t think B is a correct answer, since ocrcheck can be used to view the location of the OCR either if it is stored in a file system or in ASM.
I think the better answers are A, C & E, assuming that the command in C & E is crsctl query css votedisk
I think that:
“F” – is for OLR only, not for OCR, so this is wrong;
“D” – i will use this only if i already know the location of the file;
I think that the best choice is “A”, “C” and “E”, but doesn’t have anything about OLR that is corret here.
In fact, “F” is for OCR only, not OLR.
[grid@ ~]$ cat /etc/oracle/ocr.loc
ocrconfig_loc=+DG_DATA/cc-cluster/OCRFILE/registry.255.938883023
ocrmirrorconfig_loc=+DG_OCR/cc-cluster/OCRFILE/registry.255.938884689
local_only=false