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
相关推荐
中科逸视OCR2 天前
当OCR遇见NLP:解析深度学习发票识别中的语义理解与关系抽取模块
nlp·ocr·发票识别
EkihzniY3 天前
OCR 识别技术:各行业信息化转型的 “加速器”
ocr
虚行3 天前
一个海康相机OCR的程序
ocr
kevin 14 天前
智能文档处理业务,应该选择大模型还是OCR专用小模型?
ocr
空影星4 天前
Pot Translator,跨平台划词翻译与OCR工具
python·ocr·电脑
私人珍藏库5 天前
[Windows] 天若OCR开源版 6.0.0
ocr
ONLYOFFICE5 天前
如何在ONLYOFFICE中使用OCR工具:轻松识别图片和PDF中的文字
编辑器·ocr·office
晨欣5 天前
Umi-OCR:Windows7和Linux上可免费离线使用的OCR应用!
linux·运维·ocr
doris6107 天前
资产 OCR 识别:批量导入效率提升指南
ocr·资产管理·固定资产管理系统
TextIn智能文档云平台7 天前
复杂PDF文档结构化提取全攻略——从OCR到大模型知识库构建
pdf·ocr