tanggang1740 发表于 2018-9-15 07:50:24

Oracle技术之RAC Voting disk和OCR的管理

  一、OCR
  检查ocrcheck
  # ocrcheck
  Status of Oracle Cluster Registry is as follows :
  Version                  :          3
  Total space (kbytes)   :   262120
  Used space (kbytes)      :       2424
  Available space (kbytes) :   259696

  >  Device/File Name         :       +CRS
  Device/File integrity check succeeded
  Device/File not configured
  Device/File not configured
  Device/File not configured
  Device/File not configured
  Cluster registry integrity check succeeded
  Logical corruption check succeeded
  # ocrcheck
  Status of Oracle Cluster Registry is as follows :
  Version                  :          3
  Total space (kbytes)   :   262120
  Used space (kbytes)      :       2424
  Available space (kbytes) :   259696

  >  Device/File Name         :       +CRS
  Device/File integrity check succeeded
  Device/File not configured
  Device/File not configured
  Device/File not configured
  Device/File not configured
  Cluster registry integrity check succeeded
  Logical corruption check succeeded
  # ocrconfig -h
  Name:
  ocrconfig - Configuration tool for Oracle Cluster/Local Registry.
  Synopsis:
  ocrconfig
  option:
  [-local] -export
  - Export OCR/OLR contents to a file
  [-local] -import          - Import OCR/OLR contents from a file
  [-local] -upgrade [ []]
  - Upgrade OCR from previous version
  -downgrade [-version ]
  - Downgrade OCR to the specified version
  [-local] -backuploc      - Configure OCR/OLR backup location
  [-local] -showbackup - Show OCR/OLR backup information
  [-local] -manualbackup            - Perform. OCR/OLR backup
  [-local] -restore         - Restore OCR/OLR from physical backup
  -replace-replacement
  - Replace a OCR device/filewith
  -add                      - Add a new OCR device/file
  -delete                   - Remove a OCR device/file
  -overwrite                        - Overwrite OCR configuration on disk
  -repair -add| -delete| -replace-replacement
  - Repair OCR configuration on the local node
  -help                               - Print out this help information
  Note:
  * A log file will be created in
  $ORACLE_HOME/log//client/ocrconfig_.log. Please ensure
  you have file creation privileges in the above directory before
  running this tool.
  * Only -local -showbackup is supported.
  * Use option '-local' to indicate that the operation is to be performed on the Oracle Local Registry.
  添加删除磁盘镜象:
  # ocrconfig -add '+CRSBAK'
  检查修改后的配置
  # ocrcheck
  Status of Oracle Cluster Registry is as follows :
  Version                  :          3
  Total space (kbytes)   :   262120
  Used space (kbytes)      :       2424
  Available space (kbytes) :   259696

  >  Device/File Name         :       +CRS
  Device/File integrity check succeeded
  Device/File Name         :    +CRSBAK
  Device/File integrity check succeeded
  Device/File not configured
  Device/File not configured
  Device/File not configured
  Cluster registry integrity check succeeded
  Logical corruption check succeeded
  # ocrconfig -delete '+CRSBAK'
  # ocrcheck
  Status of Oracle Cluster Registry is as follows :
  Version                  :          3
  Total space (kbytes)   :   262120
  Used space (kbytes)      :       2416
  Available space (kbytes) :   259704

  >  Device/File Name         :       +CRS
  Device/File integrity check succeeded
  Device/File not configured
  Device/File not configured
  Device/File not configured
  Device/File not configured
  Cluster registry integrity check succeeded
  Logical corruption check succeeded
  建议asm磁盘组放在不同的raid组上
  逻辑备份/恢复
  备份命令:
  ocrconfig –export [ path ]
  还原命令
  ocrconfig –import [ path ]
  还原OCR 的时候,需要停掉各节点crs 服务。还原完成后,重新启动CRS。(如果有必要,注意在每
  个节点分别修改ocr.loc的对应使用设备)
  OCR手动导出:ocrconfig -export /tmp/ocr_bak
  OCR手动导入:ocrconfig -import /tmp/ocr_bak
  # ocrconfig -export /oracle/backup/ocr_bak_20100810
  # ls -ls /oracle/backup/ocr_bak_20100810
  84 -rw-r--r-- 1 root root 80883 Aug6 20:06 /oracle/backup/ocr_bak_20100810
  oracle视频教程请关注:http://u.youku.com/user_video/id_UMzAzMjkxMjE2.html

fifi 发表于 2018-9-19 11:19:03


感谢楼主分享,谢谢!
页: [1]
查看完整版本: Oracle技术之RAC Voting disk和OCR的管理