- 迁移11g Rac中OCR和VOTEDISK
-
环境:OEL+oracle rac 11.2.0.3迁移描述:将ocr和votedisk从+DATA上迁移到+OCR_VOTE上;操作如下:12345678910111213
[root@ora2 ~]$ /u01/app/11.2.0/grid/bin/ocrcheck
Status
of
Oracle Cluster Registry
is
as
follows :
Version
: 3 Total
space
(kbytes)
: 1469612 Used
space
(kbytes)
: 3784 Available
space
(kbytes) :
1465828 ID
: 1820175369 Device/File
Name
:
+DATA Device/File integrity
check
succeeded
Device/File
not
configured
Device/File
not
configured
Cluster registry integrity
check
succeeded
Logical corruption
check
bypassed due
to
non-privileged
user
这里我们看到ocr放在+DATA中了然后Add a new OCR device/file:1234567891011121314[root @ora2 ~]/u01/app/11.2.0/grid/bin/ocrconfig -
add
+OCR_VOTE
[root @ora2 ~]$ /u01/app/11.2.0/grid/bin/ocrcheck
Status
of
Oracle Cluster Registry
is
as
follows :
Version
: 3 Total
space
(kbytes)
: 1469612 Used
space
(kbytes)
: 3784 Available
space
(kbytes) :
1465828 ID
: 1820175369 Device/File integrity
check
succeeded
+OCR_VOTE
Device/File integrity
check
succeeded
Device/File
not
configured
Cluster registry integrity
check
succeeded
Logical corruption
check
bypassed due
to
non-privileged
user
(这时候ocr并不存在于+OCR_VOTE中)123456789101112迁移 ocr:
[root @ora2 ~]$/u01/app/11.2.0/grid/bin/ocrconfig -
replace
+DATA -replacement +OCR_VOTE
然后迁移votedisk:
[root @ora2 ~]$su - grid
[grid @ora2 ~]$crsctl
replace
votedisk +OCR_VOTE
查询一下votedisk的存放目录:
[grid @ora2 ~]$crsctl query css votedisk;
查询一下资源状态:
[grid @ora2 ~]$crsctl status resource -t
然后登录asm查看asmdisk的信息:1234[sql]
sqlplus /
as
sysasm
SQL>
select
group_number,
name
,state,type
from
V$asm_diskgroup;
SQL>
select
group_number,
name
,path
from
v$asm_disk;
使用show parameter spfile查看路径,如果存放在+DATA中,可以重建spfile:如下操作:123[sql]
SQL>
create
pfile=
'/u01/11.2.0/grid/dbs/asmpfile.ora'
from
spfile;
SQL>
create
spfile=
'+OCR_VOTE'
from
pfile=
'/u01/11.2.0/grid/dbs/asmpfile.ora'
;
然后使用root用户重启crs即可12[root @ora2 ~]$/u01/app/11.2.0/grid/bin/crsctl stop crs
[root @ora2 ~]$/u01/app/11.2.0/grid/bin/crsctl start crs
然后再使用grid用户123[sql]
su - grid
SQL>
alter
diskgroup OCR_VOTE mount;
切换root用户1/u01/app/11.2.0/grid/bin/ocrconfig -
delete
+DATA
删除磁盘组+DATA:123[sql]
SQL>
alter
diskgroup DATA dismount;
SQL>
drop
diskgroup DATA including contents