RAC的OCR和VOTING DISK备份方法
2011-12-11 19:55
225 查看
我们知道在对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.
备份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.
相关文章推荐
- 11g RAC OCR,VOTING DISK存储全部损坏,利用自动备份,恢复OCR,VOTING DISK到新存储。
- 11g RAC OCR,VOTING DISK存储全部损坏,利用自动备份,恢复OCR,VOTING DISK到新存储。
- RAC关键信息(OCR/VOTE DISK/ASM DISK HEADER)备份
- RAC上ocr和voting disk维护操作和需求1
- Placement of Voting disk and OCR Files in Oracle RAC 10g and 11gR1 [ID 293819.1]
- Placement of Voting disk and OCR Files in Oracle RAC 10g and 11gR1 [ID 293819.1]
- Oracle技术之RAC Voting disk和OCR的管理
- Placement of Voting disk and OCR Files in Oracle RAC 10g and 11gR1 [ID 293819.1]
- RAC重建OCR/Voting disk遇到的一些故障
- RAC重建OCR/Voting disk总结
- Placement of Voting disk and OCR Files in Oracle RAC 10g and 11gR1 [ID 293819.1]
- Placement of Voting disk and OCR Files in Oracle RAC 10g and 11gR1 [ID 293819.1]
- Placement of Voting disk and OCR Files in Oracle RAC 10g and 11gR1 [ID 293819.1]
- RAC在OCR磁盘故障且无备份时快速恢复的方法
- Placement of Voting disk and OCR Files in Oracle RAC 10g and 11gR1 [ID 293819.1]
- Placement of Voting disk and OCR Files in Oracle RAC 10g and 11gR1 [ID 293819.1]
- RAC在OCR磁盘故障且无备份时快速恢复的方法
- ASM diskmetadata及ASM diskgroup metadata的备份及恢复 Voting Disk及OCR的备份及恢复
- RAC关键信息(OCR/VOTE DISK/ASM DISK HEADER)备份
- 11g r2 模拟OCR和voting disk不可用,完整恢复过程,以及一些注意事项