RAC的OCR和VOTING DISK备份方法

我们知道在对RAC节点做一些配置均需要做好备份工作,以便于能够恢复到配置前的状态,这也是一个DBA的基本素质要求,如下是比较常用的方法:
备份voting disk磁盘
[root@RAC2 bin]# ./crsctl query css votedisk
0.     0    /dev/raw/raw2

located 1 votedisk(s).
[root@RAC2 bin]# dd if=/dev/raw/raw2 of=/home/oracle/votedisk.bak
208896+0 records in
208896+0 records out
106954752 bytes (107 MB) copied, 68.1215 seconds, 1.6 MB/s
备份OCR磁盘:
[root@RAC2 bin]# export LANG=C
[root@RAC2 bin]# ./crsctl stop crs
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
[root@RAC2 bin]# ./ocrconfig -export /home/oracle/ocr.exp
[root@RAC2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version                  :          2
Total space (kbytes)     :     104216
Used space (kbytes)      :       3856
Available space (kbytes) :     100360
ID                       : 1338542740
Device/File Name         : /dev/raw/raw1
Device/File integrity check succeeded

Device/File not configured

Cluster registry integrity check succeeded

crsctl用法可以参见如下:
[root@RAC2 bin]# ./crsctl
Usage: crsctl check  crs          – checks the viability of the CRS stack
crsctl check  cssd         – checks the viability of CSS
crsctl check  crsd         – checks the viability of CRS
crsctl check  evmd         – checks the viability of EVM
crsctl set    css <parameter> <value> – sets a parameter override
crsctl get    css <parameter> – gets the value of a CSS parameter
crsctl unset  css <parameter> – sets CSS parameter to its default
crsctl query  css votedisk    – lists the voting disks used by CSS
crsctl add    css votedisk <path> – adds a new voting disk
crsctl delete css votedisk <path> – removes a voting disk
crsctl enable  crs    – enables startup for all CRS daemons
crsctl disable crs    – disables startup for all CRS daemons
crsctl start crs  – starts all CRS daemons.
crsctl stop  crs  – stops all CRS daemons. Stops CRS resources in case of cluster.
crsctl start resources  – starts CRS resources.
crsctl stop resources  – stops  CRS resources.
crsctl debug statedump evm  – dumps state info for evm objects
crsctl debug statedump crs  – dumps state info for crs objects
crsctl debug statedump css  – dumps state info for css objects
crsctl debug log css [module:level]{,module:level} …
- Turns on debugging for CSS
crsctl debug trace css – dumps CSS in-memory tracing cache
crsctl debug log crs [module:level]{,module:level} …
- Turns on debugging for CRS
crsctl debug trace crs – dumps CRS in-memory tracing cache
crsctl debug log evm [module:level]{,module:level} …
- Turns on debugging for EVM
crsctl debug trace evm – dumps EVM in-memory tracing cache
crsctl debug log res <resname:level> turns on debugging for resources
crsctl query crs softwareversion [<nodename>] – lists the version of CRS software installed
crsctl query crs activeversion – lists the CRS software operating version
crsctl lsmodules css – lists the CSS modules that can be used for debugging
crsctl lsmodules crs – lists the CRS modules that can be used for debugging
crsctl lsmodules evm – lists the EVM modules that can be used for debugging

If necesary any of these commands can be run with additional tracing by
adding a “trace” argument at the very front.
Example: crsctl trace check css
ocrconfig的用法参见如下:
[root@RAC2 bin]# ./ocrconfig
Name:
ocrconfig – Configuration tool for Oracle Cluster Registry.

Synopsis:
ocrconfig [option]
option:
-export <filename> [-s online]
- Export cluster register contents to a file
-import <filename>                  – Import cluster registry contents from a file
-upgrade [<user> [<group>]]
- Upgrade cluster registry from previous version
-downgrade [-version <version string>]
- Downgrade cluster registry to the specified version
-backuploc <dirname>                – Configure periodic backup location
-showbackup                         – Show backup information
-restore <filename>                 – Restore from physical backup
-replace ocr|ocrmirror [<filename>] – Add/replace/remove a OCR device/file
-overwrite                          – Overwrite OCR configuration on disk
-repair ocr|ocrmirror <filename>    – Repair local OCR configuration
-help                               – Print out this help information

Note:
A log file will be created in
$ORACLE_HOME/log/<hostname>/client/ocrconfig_<pid>.log. Please ensure
you have file creation privileges in the above directory before
running this tool.


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值