Monday, 24 August 2015

MOVING OF VOTING DISK FROM ONE DISKGROUP TO ANOTHER.

MOVING OF VOTING DISK FROM ONE DISKGROUP TO ANOTHER.
SOURCE DISKGROUP- OCR_VOT
TARGETDISKGROUP-NEW_VOT

1.  Create a diskgroup with name new_vot with Normal redundancy should have 3 failover group (for voting disk we should keep 3 failover group).
SQL> !hostname
node01.example.com
SQL>  CREATE DISKGROUP NEW_VOT NORMAL REDUNDANCY
  2  FAILGROUP failure_group_1 DISK 'ORCL:ASM07'
  3  FAILGROUP failure_group_2 DISK 'ORCL:ASM08'
  4  FAILGROUP failure_group_3 DISK 'ORCL:ASM09';
Diskgroup created.
SQL> exit

 2. Check location of current  voting disk
[root@node01 ohasd]# . oraenv
ORACLE_SID = [root] ? +ASM1
The Oracle base has been set to /u01/app/grid
[root@node01 ohasd]# crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   3a9a3b0988e84f2bbf707453275ed5d3 (ORCL:ASM01) [OCR_VOT]
 2. ONLINE   4b79f160a2be4fe4bf09bb68711fa1df (ORCL:ASM02) [OCR_VOT]
 3. ONLINE   794face7ee9c4f01bfa223324f8ddf95 (ORCL:ASM03) [OCR_VOT]
Located 3 voting disk(s).

3. Run command to move voting disk into  NEW_VOT diskgroup from OCR_VOT diskgroup.
[root@node01 ohasd]# crsctl replace votedisk '+NEW_VOT';
Failed to create voting files on disk group NEW_VOT.
Change to configuration failed, but was successfully rolled back.
CRS-4000: Command Replace failed, or completed with errors.

4. To find root cause of this error follow the below step.
 [grid@node01 ~]$ . oraenv
ORACLE_SID = [+ASM] ? +ASM1
The Oracle base has been set to /u01/app/grid
[grid@node01 ~]$ sqlplus

SQL*Plus: Release 11.2.0.3.0 Production on Tue Aug 25 01:02:01 2015

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter user-name: /as sysdba

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Real Application Clusters and Automatic Storage Management options

SQL> show parameter background
exi
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
background_core_dump                 string      partial
background_dump_dest                 string      /u01/app/grid/diag/asm/+asm/+A
                                                 SM1/trace
SQL>exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Real Application Clusters and Automatic Storage Management options
[grid@node01 ~]$ cd /u01/app/grid/diag/asm/+asm/+ASM1/trace
[grid@node01 trace]$ ls -lrth aler*
-rw-r----- 1 grid oinstall 1.7M Aug 25 00:59 alert_+ASM1.log
[grid@node01 trace]$ tail -100 alert_+ASM1.log
ERROR: Voting file allocation failed for group NEW_VOT
Errors in file /u01/app/grid/diag/asm/+asm/+ASM1/trace/+ASM1_ora_21344.trc:
ORA-15221: ASM operation requires compatible.asm of 11.2.0.0.0 or higher
NOTE: Attempting voting file refresh on diskgroup NEW_VOT

5. Recify the  compatible.asm verison

[grid@node01 trace]$ . oraenv
ORACLE_SID = [+ASM1] ?
The Oracle base remains unchanged with value /u01/app/grid
[grid@node01 trace]$ sqlplus

SQL*Plus: Release 11.2.0.3.0 Production on Tue Aug 25 01:03:14 2015

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter user-name: /as sysdba

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Real Application Clusters and Automatic Storage Management options

SQL> select NAME,USABLE_FILE_MB,COMPATIBILITY,DATABASE_COMPATIBILITY,VOTING_FILES  from v$asm_diskgroup;

NAME                 USABLE_FILE_MB COMPATIBILITY        DATABASE_COMPATIBILI V
-------------------- -------------- -------------------- -------------------- -
DATA                           4302 11.2.0.0.0           11.2.0.0.0           N
FRA                            4973 11.2.0.0.0           11.2.0.0.0           N
OCR_VOT                        5333 11.2.0.0.0           10.1.0.0.0           Y
NEW_VOT                        5782 10.1.0.0.0           10.1.0.0.0           N


SQL> conn /as sysasm
Connected.

SQL> alter diskgroup NEW_VOT set attribute 'compatible.asm'='11.2';

Diskgroup altered.

SQL> select NAME,USABLE_FILE_MB,COMPATIBILITY,DATABASE_COMPATIBILITY,VOTING_FILES  from v$asm_diskgroup;


NAME                 USABLE_FILE_MB COMPATIBILITY        DATABASE_COMPATIBILI V
-------------------- -------------- -------------------- -------------------- -
DATA                           4302 11.2.0.0.0           11.2.0.0.0           N
FRA                            4973 11.2.0.0.0           11.2.0.0.0           N
OCR_VOT                        5333 11.2.0.0.0           10.1.0.0.0           Y
NEW_VOT                        5779 11.2.0.0.0           10.1.0.0.0           N

6. Check the current location voting and change it with new location

 [grid@node01 trace]$ . oraenv
ORACLE_SID = [+ASM1] ?
The Oracle base remains unchanged with value /u01/app/grid
[grid@node01 trace]$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   3a9a3b0988e84f2bbf707453275ed5d3 (ORCL:ASM01) [OCR_VOT]
 2. ONLINE   4b79f160a2be4fe4bf09bb68711fa1df (ORCL:ASM02) [OCR_VOT]
 3. ONLINE   794face7ee9c4f01bfa223324f8ddf95 (ORCL:ASM03) [OCR_VOT]
Located 3 voting disk(s).
[grid@node01 trace]$ crsctl replace votedisk '+NEW_VOT';
Successful addition of voting disk 9ce235c871bc4f65bffd15bbacda7a71.
Successful addition of voting disk 05889d3d9be84f1dbfa79d90f64bd430.
Successful addition of voting disk 074d8e6551684fb9bfeedc01bbda648e.
Successful deletion of voting disk 3a9a3b0988e84f2bbf707453275ed5d3.
Successful deletion of voting disk 4b79f160a2be4fe4bf09bb68711fa1df.
Successful deletion of voting disk 794face7ee9c4f01bfa223324f8ddf95.
Successfully replaced voting disk group with +NEW_VOT.
CRS-4266: Voting file(s) successfully replaced
[grid@node01 trace]$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   9ce235c871bc4f65bffd15bbacda7a71 (ORCL:ASM07) [NEW_VOT]
 2. ONLINE   05889d3d9be84f1dbfa79d90f64bd430 (ORCL:ASM08) [NEW_VOT]
 3. ONLINE   074d8e6551684fb9bfeedc01bbda648e (ORCL:ASM09) [NEW_VOT]
Located 3 voting disk(s).

[grid@node01 trace]$

No comments:

Post a Comment