ocr和votedisk是什么?
votedisk磁盘存储集中地各个节点并用来进行心跳监测
ocr和votedisk的维护是否需要保持脱机状态?
orc的维护在大多数情况下,是需要联机操作的,因为在各个节点具有ocr.loc文件,联机操作可以保证各个节点的ocr.loc文件及时得到更新。但是部分操作,如repaire和重建等操作需要在脱机状态下进行(后面会详细描述)
votedisk磁盘的维护往往需要在脱机状态下进行
ocr维护的命令有哪些?
维护ocr常用的命令有:
ocrcheck
[root@node1 bin]# ./ocrcheck -h
Name:
ocrcheck - Displays health of Oracle Cluster Registry.
Synopsis:
ocrcheck
Description:
prompt> ocrcheck
Displays current usage, location and health of the cluster registry
Notes:
A log file will be created in
$ORACLE_HOME/log/
you have file creation privileges in the above directory before
running this tool.
ocrdump(dump出来的内容可以用来查看ocr中的内容,但是不可以用来进行恢复)
[root@node1 bin]# ./ocrdump -h
Name:
ocrdump - Dump contents of Oracle Cluster Registry to a file.
Synopsis:
ocrdump [
Description:
Default filename is OCRDUMPFILE. Examples are:
prompt> ocrdump
writes cluster registry contents to OCRDUMPFILE in the current directory
prompt> ocrdump MYFILE
writes cluster registry contents to MYFILE in the current directory
prompt> ocrdump -stdout -keyname SYSTEM
writes the subtree of SYSTEM in the cluster registry to stdout
prompt> ocrdump -stdout -xml
writes cluster registry contents to stdout in xml format
Notes:
The header information will be retrieved based on best effort basis.
A log file will be created in
$ORACLE_HOME/log/
you have file creation privileges in the above directory before
running this tool.
ocrconfig
[root@node1 bin]# ./ocrconfig -h
Name:
ocrconfig - Configuration tool for Oracle Cluster Registry.
Synopsis:
ocrconfig [option]
option:
-export
- Export cluster register contents to a file
-import
-upgrade [
- Upgrade cluster registry from previous version
-downgrade [-version
- Downgrade cluster registry to the specified version
-backuploc
-showbackup - Show backup information
-restore
-replace ocr|ocrmirror [
-overwrite - Overwrite OCR configuration on disk
-repair ocr|ocrmirror
-help - Print out this help information
Note:
A log file will be created in
$ORACLE_HOME/log/
you have file creation privileges in the above directory before
running this tool.
Table D-1 The ocrconfig Command Options
ocr损坏后怎么恢复?
ocr损坏后通常有两种方式进行修正:恢复和重建。恢复的时候,我们可以从之前export导出的文件恢复,也可以从之前有masternode备份的文件进行恢复。
[root@node1 bin]# ./crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
httpd_vip application 0/1 0/0 ONLINE ONLINE node2
httpd_web application 0/1 0/4 ONLINE ONLINE node2
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE node1
ora....E1.lsnr application 0/5 0/0 ONLINE ONLINE node1
ora.node1.gsd application 0/5 0/0 ONLINE ONLINE node1
ora.node1.ons application 0/3 0/0 ONLINE ONLINE node1
ora.node1.vip application 0/0 0/0 ONLINE ONLINE node1
ora....SM2.asm ap