RAC的OCR和VOTING DISK备份方法
我们知道在对RAC节点做一些配置均需要做好备份工作,以便于能够恢复到配置前的状态,这也是一个DBA的基本素质要求,如下是比较常用的方法: 备份voting disk磁盘
[root@RAC2 bin]# ./crsctl query cssvotedisk 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
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 statedumpevm – dumps state info for evm objects crsctl debug statedumpcrs – dumps state info for crs objects crsctl debug statedumpcss – 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
crsctl query crsactiveversion – lists the CRS software operating version crsctllsmodulescss – lists the CSS modules that can be used for debugging crsctllsmodulescrs – lists the CRS modules that can be used for debugging crsctllsmodulesevm – 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
- 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
-overwrite – Overwrite OCR configuration on disk
-repair ocr|ocrmirror
A log file will be created in
$ORACLE_HOME/log/