更改ocr(ocrconfig)和voting disk(crsctl replace votedisk)到其他的磁盘组—11.2 RAC

联系:QQ(5163721)

标题:更改ocr(ocrconfig)和voting disk(crsctl replace votedisk)到其他的磁盘组—11.2 RAC

作者:Lunar©版权所有[文章允许转载,但必须以链接方式注明源地址,否则追究法律责任.]

RAC上ocr和voting disk从10.1到11.2维护操作和需求的差异

检查当前的ocr所在磁盘:

[oracle@dm01db01 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
	 Version                  :          3
	 Total space (kbytes)     :     262120
	 Used space (kbytes)      :       2612
	 Available space (kbytes) :     259508
	 ID                       : 1194723922
	 Device/File Name         :   +DATA_DG
                                    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 bypassed due to non-privileged user

添加+DBFS_DG作为新的存放ocr的磁盘组:

[oracle@dm01db01 ~]$ ocrconfig -add +DBFS_DG
PROT-20: Insufficient permission to proceed. Require privileged user
[oracle@dm01db01 ~]$ su 
Password: 
[root@dm01db01 oracle]# ocrconfig -add +DBFS_DG
[root@dm01db01 oracle]# exit
exit
[oracle@dm01db01 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
	 Version                  :          3
	 Total space (kbytes)     :     262120
	 Used space (kbytes)      :       2612
	 Available space (kbytes) :     259508
	 ID                       : 1194723922
	 Device/File Name         :   +DATA_DG
                                    Device/File integrity check succeeded
	 Device/File Name         :   +DBFS_DG
                                    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 bypassed due to non-privileged user

[oracle@dm01db01 ~]$ su 
Password: 
[root@dm01db01 oracle]# ocrcheck
Status of Oracle Cluster Registry is as follows :
	 Version                  :          3
	 Total space (kbytes)     :     262120
	 Used space (kbytes)      :       2612
	 Available space (kbytes) :     259508
	 ID                       : 1194723922
	 Device/File Name         :   +DATA_DG
                                    Device/File integrity check succeeded
	 Device/File Name         :   +DBFS_DG
                                    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

删除+DATA_DG上的ocr:

[root@dm01db01 oracle]# ocrconfig -delete +DATA_DG
[root@dm01db01 oracle]# ocrcheck
Status of Oracle Cluster Registry is as follows :
	 Version                  :          3
	 Total space (kbytes)     :     262120
	 Used space (kbytes)      :       2612
	 Available space (kbytes) :     259508
	 ID                       : 1194723922
	 Device/File Name         :   +DBFS_DG
                                    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@dm01db01 oracle]# 

查看voting disk当前存放在哪个磁盘组(N中方法,这里直接在ASM里面看的):
[oracle@dm01db01 ~]$ . ./env/grid.env
[oracle@dm01db01 ~]$ asmcmd
ASMCMD>
ASMCMD> lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED NORMAL N 512 4096 4194304 16625664 16624360 1511424 7556468 0 Y DATA_DG/
MOUNTED NORMAL N 512 4096 4194304 894720 893568 81338 406115 0 N DBFS_DG/
MOUNTED NORMAL N 512 4096 4194304 2863872 2863224 260352 1301436 0 N RECO_DM01/
ASMCMD>
[/shell]
还可以使用crsctl query css votedisk来查看:

[oracle@dm01db01 ~]$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   678abf64d3c34f9dbf923ab1420f40c0 (o/192.168.11.13/DATA_DM01_CD_00_dm01cel01) [DATA_DG]
 2. ONLINE   80581891d0414fb6bf397f8c0d14ff3d (o/192.168.11.14/DATA_DM01_CD_00_dm01cel02) [DATA_DG]
 3. ONLINE   663a4ca137f04fd2bf8719795542df30 (o/192.168.11.15/DATA_DM01_CD_00_dm01cel03) [DATA_DG]
Located 3 voting disk(s).
[oracle@dm01db01 ~]$ 

将voting disk替换到+DBFS_DG磁盘组:

[oracle@dm01db01 ~]$ crsctl replace votedisk +DBFS_DG
Successful addition of voting disk af022878bf3f4f2dbfa2c3f630ee15b9.
Successful addition of voting disk 83dd62df08da4f32bf71abefc6d8ee52.
Successful addition of voting disk 6712a4d602404f8ebfa4ed635659c42e.
Successful deletion of voting disk 678abf64d3c34f9dbf923ab1420f40c0.
Successful deletion of voting disk 80581891d0414fb6bf397f8c0d14ff3d.
Successful deletion of voting disk 663a4ca137f04fd2bf8719795542df30.
Successfully replaced voting disk group with +DBFS_DG.
CRS-4266: Voting file(s) successfully replaced
[oracle@dm01db01 ~]$ 
[oracle@dm01db01 ~]$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   af022878bf3f4f2dbfa2c3f630ee15b9 (o/192.168.11.15/DBFS_DG_CD_02_dm01cel03) [DBFS_DG]
 2. ONLINE   83dd62df08da4f32bf71abefc6d8ee52 (o/192.168.11.13/DBFS_DG_CD_02_dm01cel01) [DBFS_DG]
 3. ONLINE   6712a4d602404f8ebfa4ed635659c42e (o/192.168.11.14/DBFS_DG_CD_02_dm01cel02) [DBFS_DG]
Located 3 voting disk(s).
[oracle@dm01db01 ~]$ 
[oracle@dm01db01 ~]$ asmcmd -p lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB   Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  NORMAL  N         512   4096  4194304  16625664  16624456          1511424         7556516              0             N  DATA_DG/
MOUNTED  NORMAL  N         512   4096  4194304    894720    893472            81338          406067              0             Y  DBFS_DG/
MOUNTED  NORMAL  N         512   4096  4194304   2863872   2863224           260352         1301436              0             N  RECO_DM01/
[oracle@dm01db01 ~]$ 
此条目发表在 RAC 分类目录,贴了 , 标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>