oracle 10g 如何对ocr盘增加镜像和删除镜像
oracle 10g 如何对ocr盘增加镜像和删除镜像
在oracle 10g ac cluster安装初始阶段,会有窗口提示你对ocr盘选择镜像或不做镜像,如果在安装时我们只规划了一个ocr盘,如何在安装完后增加镜像和删除镜像,以下为具体步骤:
第一.增加/dev/rocr2_lv镜像:
crs集群状态已经启动,并且数据库也已经启动
1.查看ocr盘状态
[root@p650:/crs/app/oracle/product/crs_1]#cd bin
[root@p650:/crs/app/oracle/product/crs_1/bin]#pwd
/crs/app/oracle/product/crs_1/bin
[root@p650:/crs/app/oracle/product/crs_1/bin]#./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 130852
Used space (kbytes) : 3280
Available space (kbytes) : 127572
ID : 614588822
Device/File Name : /dev/rocrlv
Device/File integrity check succeeded
Device/File not configured
Cluster registry integrity check succeeded
从上面可以看出,只有一个ocr盘
2.从操作系统上增加ocr盘,必须是两边节点都可以看到的共享盘
smitty mklv lv名字为/dev/rocr2_lv
chown root:ointall /dev/rocr2_lv
chmod 640 /dev/rocr2_lv
3.crs集群中增加ocr盘,用ocrconfig命令
[root@p650:/crs/app/oracle/product/crs_1/bin]#./ocrconfig -replace ocrmirror /dev/rocr2_lv
4.检查结果
[root@p650:/crs/app/oracle/product/crs_1/bin]#./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 130852
Used space (kbytes) : 3280
Available space (kbytes) : 127572
ID : 614588822
Device/File Name : /dev/rocrlv
Device/File integrity check succeeded
Device/File Name : /dev/rocr2_lv
Device/File integrity check succeeded
Cluster registry integrity check succeeded
[root@p650:/etc]#cd oracle
[root@p650:/etc/oracle]#ls
ocr.loc oprocd scls_scr
[root@p650:/etc/oracle]#more ocr.locl
ocr.locl: A file or directory in the path name does not exist.
[root@p650:/etc/oracle]#more ocr.loc
#Device/file getting replaced by device /dev/rocr2_lv
ocrconfig_loc=/dev/rocrlv
ocrmirrorconfig_loc=/dev/rocr2_lv
local_only=false
[root@p650:/etc/oracle]#
ocr.loc文件记录ocr盘路径
第二.删除/dev/rocr2_lv镜像:
1.crs集群中删除ocr镜像盘,用ocrconfig命令
[root@p650:/crs/app/oracle/product/crs_1/bin]#./ocrconfig -replace ocrmirror
2.检查结果
[root@p650:/crs/app/oracle/product/crs_1/bin]#./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 130852
Used space (kbytes) : 3280
Available space (kbytes) : 127572
ID : 614588822
Device/File Name : /dev/rocrlv
Device/File integrity check succeeded
Device/File not configured
Cluster registry integrity check succeeded
root@p650:/etc/oracle]#more ocr.loc
ocrconfig_loc=/dev/rocrlv
local_only=false
[root@p650:/etc/oracle]#
删除/dev/rocr2_lv成功