OCR迁移

一、环境

操作系统:Centos57.6

数据库版本:12.2.0.1

场景:将OCR信息从+DATA磁盘组迁移到+OCR磁盘组

二、操作步骤

1.查看可用空盘

复制代码
set lin 200
set pagesize 200
col DGNAME format a15
col DISKNAME format a15
col PATH format a20
col NAME format a20
select NAME,MOUNT_STATUS,STATE,DISK_NUMBER "DNO",PATH,TOTAL_MB,FREE_MB,GROUP_NUMBER "GNO" from  /* 如果name为空,那么是没有加入磁盘组 */v$ASM_DISK 
order by NAME;
NAME                 MOUNT_S STATE           DNO PATH                   TOTAL_MB    FREE_MB        GNO
-------------------- ------- -------- ---------- -------------------- ---------- ---------- ----------
ARC_0000             CACHED  NORMAL            0 /dev/asm-arc               2048        921          1
DATA_0000            CACHED  NORMAL            0 /dev/asm-data             10240       7185          2
REDO_0000            CACHED  NORMAL            0 /dev/asm-redo              5120       5025          4
                     CLOSED  NORMAL            0 /dev/asm-ocr                  0          0          0

2.创建磁盘组

复制代码
create diskgroup OCR external redundancy disk
'/dev/asm-ocr' attribute 'au_size'='1M','compatible.asm'='11.2','compatible.rdbms'='10.1';

3.ocr加入新建磁盘组

复制代码
[root@rac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3124
         Available space (kbytes) :     258996
         ID                       :  161991732
         Device/File Name         :      +data
                                    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
   [root@rac1 bin]# ./ocrconfig  -add +OCR
[root@rac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3128
         Available space (kbytes) :     258992
         ID                       :  161991732
         Device/File Name         :      +data
                                    Device/File integrity check succeeded
         Device/File Name         :       +OCR
                                    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

4.OCR删除老磁盘组

复制代码
[root@rac1 bin]# ./ocrconfig -delete +DATA
[root@rac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3128
         Available space (kbytes) :     258992
         ID                       :  161991732
         Device/File Name         :       +OCR
                                    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

5.替换仲裁盘

复制代码
[root@rac1 bin]# ./crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   aa1f2ffde3624f59bf3b76a5f14c3142 (/dev/asm-data) [DATA]
Located 1 voting disk(s).
[root@rac1 bin]# ./crsctl replace votedisk +OCR
Successful addition of voting disk 9e3d3f3ba1ba4f6ebf67db7ec6fa6fff.
Successful deletion of voting disk aa1f2ffde3624f59bf3b76a5f14c3142.
Successfully replaced voting disk group with +OCR.
CRS-4266: Voting file(s) successfully replaced
[root@rac1 bin]# ./crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   9e3d3f3ba1ba4f6ebf67db7ec6fa6fff (/dev/asm-ocr) [OCR]
Located 1 voting disk(s).

6.重建spfile到新磁盘组

复制代码
ASMCMD> spget
+DATA/rac-cluster/asmparameterfile/registry.253.1188043365
SQL> create pfile='/home/grid/pfile.ora' from spfile;
File created.
SQL> create spfile='+OCR' from pfile='/home/grid/pfile.ora';
File created.
exit

ASMCMD> spget
+OCR/rac-cluster/asmparameterfile/registry.253.1197525347

7.move密码文件(11G版本忽略此步骤)

复制代码
[:grid]:/home/grid>asmcmd
ASMCMD>  pwcopy --asm +DATA/orapwASM  /home/grid/orapwASM_backup -f
copying +DG_OCR/orapwASM ->  /home/grid/orapwASM_backup
ASMCMD>  pwmove --asm +DATA/orapwASM  +OCR/orapwASM -f
moving +DATA/orapwASM -> ++OCR/orapwASM
ASMCMD> exit
[:grid]:/home/grid>srvctl config asm
ASM home: <CRS home>
Password file: +OCR/orapwASM
Backup of Password file: 
ASM listener: LISTENER
ASM instance count: 3
Cluster ASM listener: ASMNET1LSNR_ASM
相关推荐
瞻邈1 小时前
文字识别 (OCR) 工具
ocr
Panesle19 小时前
开源的7B参数OCR视觉大模型:RolmOCR
人工智能·开源·大模型·ocr
姚家湾1 天前
qwen-vl 实现OCR的测试
ocr
一个人的博客@你2 天前
OCR之行驶证识别
ocr·文字识别·行驶证识别·提取文字·百度ocr·离线识别行驶证
wu~9702 天前
图片文本识别OCR+DeepSeekapi实现提取图片关键信息
ocr·腾讯云·文字识别·deepseek
wu~9702 天前
腾讯OCR文字识别实践--简历文本识别
ocr·腾讯云
arron88993 天前
高性能OCR推荐
ocr
_Hannibal_3 天前
通过百度OCR在线API识别带水印扫描图片文字
pdf·ocr
Psycho_MrZhang6 天前
目前主流OCR/语义理解/ASR
ocr