Relocating the OCR file.
My existing OCR file is in DATA diskgroup, which I want to move in some another diskgroup.for that first I'll add new OCR file into some other disk group then will drop the old one.
[root@node2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3012
Available space (kbytes) : 259108
ID : 867552287
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
[oracle@node2 ~]$ 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 EXTERN N 512 4096 1048576 14988 3227 0 3227 0 Y DATA/
Lets create the new diskgroup using ASMCMD "MKDG" command.
[oracle@node2 ~]$ vim ocr_dg.xml
<dg name="ocr_disk" redundancy="normal">
<fg name="fg1">
<dsk string="ORCL:DISK1"/>
</fg>
<fg name="fg2">
<dsk string="ORCL:DISK2"/>
</fg>
<a name="compatible.asm" value="11.2"/>
<a name="compatible.rdbms" value="11.2"/>
</dg>
Save the file.
[oracle@node2 ~]$ asmcmd mkdg ocr_dg.xml
Disk group "OCR_DISK" is now created . Lets crosscheck the same.
[oracle@node2 ~]$ 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 EXTERN N 512 4096 1048576 14988 3227 0 3227 0 Y DATA/
MOUNTED NORMAL N 512 4096 1048576 988 882 0 441 0 N OCR_DISK/
[root@node2 bin]# ./ocrconfig -add +OCR_DISK
[root@node2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3012
Available space (kbytes) : 259108
ID : 867552287
Device/File Name : +DATA
Device/File integrity check succeeded
Device/File Name : +OCR_DISK
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
[root@node2 bin]# more /etc/oracle/ocr.loc
#Device/file getting replaced by device +OCR_DISK
ocrconfig_loc=+DATA
ocrmirrorconfig_loc=+OCR_DISK
local_only=false
[root@node2 bin]# ./ocrconfig -delete +DATA
[root@node2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3012
Available space (kbytes) : 259108
ID : 867552287
Device/File Name : +OCR_DISK
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@node2 bin]# more /etc/oracle/ocr.loc
#Device/file +DATA getting replaced by device +OCR_DISK
ocrconfig_loc=+OCR_DISK
local_only=false
Relocate the Votedisk file.
Right now my existing Votedisk file is in DATA disk group. In ASM we need to replace the voting disk file to the new disk group.
[root@node1 bin]# ./crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 721c994bc6c94fe2bf6a124f0f7fc53d (ORCL:DISK5) [DATA]
Located 1 voting disk(s).
[root@node1 bin]# ./crsctl replace votedisk +VDISK_DG
Failed to create voting files on disk group VDISK_DG.
Change to configuration failed, but was successfully rolled back.
CRS-4000: Command Replace failed, or completed with errors.
Excerpt for the alert log.
NOTE: diskgroup resource ora.VDISK_DG.dg is online
ERROR: failed to update diskgroup resource ora.VDISK_DG.dg
Thu Oct 17 21:38:30 2013
NOTE: [ocrcheck.bin@node1.oracle.com (TNS V1-V3) 9282] opening OCR file
Thu Oct 17 23:10:54 2013
NOTE: [crsctl.bin@node1.oracle.com (TNS V1-V3) 13455] opening OCR file
Thu Oct 17 23:10:55 2013
NOTE: updated gpnp profile ASM diskstring:
Thu Oct 17 23:10:55 2013
NOTE: Creating voting files in diskgroup VDISK_DG
Thu Oct 17 23:10:55 2013
NOTE: Voting File refresh pending for group 4/0xcbd88b0e (VDISK_DG)
NOTE: Attempting voting file creation in diskgroup VDISK_DG
ERROR: Voting file allocation failed for group VDISK_DG
Errors in file /u01/app/oracle/diag/asm/+asm/+ASM1/trace/+ASM1_ora_13467.trc:
ORA-15221: ASM operation requires compatible.asm of 11.2.0.0.0 or higher
NOTE: Attempting voting file refresh on diskgroup VDISK_DG
Thu Oct 17 23:12:02 2013
NOTE: [crsctl.bin@node1.oracle.com (TNS V1-V3) 13519] opening OCR file
Thu Oct 17 23:12:03 2013
NOTE: updated gpnp profile ASM diskstring:
Thu Oct 17 23:12:03 2013
NOTE: Creating voting files in diskgroup VDISK_DG
Thu Oct 17 23:12:03 2013
NOTE: Voting File refresh pending for group 4/0xcbd88b0e (VDISK_DG)
NOTE: Attempting voting file creation in diskgroup VDISK_DG
ERROR: Voting file allocation failed for group VDISK_DG
Errors in file /u01/app/oracle/diag/asm/+asm/+ASM1/trace/+ASM1_ora_13527.trc:
ORA-15221: ASM operation requires compatible.asm of 11.2.0.0.0 or higher
The issue was with the compability of the ASM disk.
SQL> SELECT NAME,COMPATIBILITY,DATABASE_COMPATIBILITY from v$asm_diskgroup;
NAME
------------------------------
COMPATIBILITY
VDISK_DG
10.1.0.0.0
NAME
------------------------------
COMPATIBILITY
------------------------------------------------------------
DATABASE_COMPATIBILITY
------------------------------------------------------------
10.1.0.0.0
SQL> alter diskgroup VDISK_DG set attribute 'compatible.asm'='11.2';
Diskgroup altered.
SQL> alter diskgroup VDISK_DG set attribute 'compatible.rdbms'='11.2';
Diskgroup altered.
SQL> SELECT NAME,COMPATIBILITY,DATABASE_COMPATIBILITY from v$asm_diskgroup;
NAME
------------------------------
COMPATIBILITY
------------------------------------------------------------
DATABASE_COMPATIBILITY
------------------------------------------------------------
VDISK_DG
11.2.0.0.0
NAME
------------------------------
COMPATIBILITY
------------------------------------------------------------
DATABASE_COMPATIBILITY
------------------------------------------------------------
11.2.0.0.0
[root@node1 bin]# ./crsctl replace votedisk +VDISK_DG
Successful addition of voting disk 386d6d6a352a4f17bf4f5edadef71096.
Successful deletion of voting disk 721c994bc6c94fe2bf6a124f0f7fc53d.
Successfully replaced voting disk group with +VDISK_DG.
CRS-4266: Voting file(s) successfully replaced
[root@node1 bin]# ./crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 386d6d6a352a4f17bf4f5edadef71096 (ORCL:DISK8) [VDISK_DG]
Located 1 voting disk(s).
Very useful... Thanks buddy
ReplyDeleteYou're welcome over my blog.
Delete