Move OCR , Vote File , ASM SPILE to new Diskgroup (Doc ID 1638177.1)
Basic steps to move to the new diskgroup :
1) Create New diskgroup(CRS) with suitable redundancy for OCR and Voting files.
2) Ensure that the new diskgroup is mounted on all cluster nodes.
3) Move OCR and Vote file from <Current diskgroup> to <CRS>.
4) Change ASM SPFILE location from <current diskgroup> to <CRS> Diskgroup.
5) Mount new <CRS> diskgroup in all nodes and restart CRS in all Nodes to Startup CRS using New SPFILE from <CRS> Diskgroup.
6) Verify mount of disks and diskgroups.
7) Ensure ALL Cluster Resources are started successfully .
8) Modify OCR backup location
=============
EXAMPLES: Detailed steps with commands to rename the diskgroup :
1) Create New CRS diskgroup
Login as SYSASM using SQLPLUS into ASM instance on one node and run below command:
Sample Command:
SQL> create diskgroup CRS normal redundancy disk 'ORCL:DISK4' ,'ORCL:DISK5' ,'ORCL:DISK6'
attribute 'compatible.rdbms'='11.2.0.0', 'compatible.asm'='11.2.0.0';
Diskgroup created.
Make sure the diskgroup is mounted on all the nodes.
NOTE:
If the diskgroup you are moving the OCR to is not online on all nodes, then the ocr.loc file on those nodes where the Diskgroup is not online will not be updated.
This will prevent CRS from restarting on those nodes that the diskgroup is not online. And the ocr.loc file may need manual intervention.
2)Ensure that the new diskgroup is mounted on all cluster nodes:
SQL> alter diskgroup CRS mount;
SQL> select name, state, type from v$asm_diskgroup;
3) Move OCR and Vote file from <Current diskgroup> to <CRS>
$ORACLE_HOME/bin/bin/ocrconfig -add +CRS
$ORACLE_HOME/bin/bin/ocrconfig -delete +DATA
$ORACLE_HOME/bin/crsctl replace votedisk +CRS
Sample Command Output:
[root@test ~]# $ORACLE_HOME/bin/ocrconfig -add +CRS
[root@test ~]# $ORACLE_HOME/bin/ocrconfig -delete +DATA
[grid@test ~]# $ORACLE_HOME/bin/crsctl replace votedisk +CRS
Successful addition of voting disk 9d351cfdbef64facbfe2d1519880ef33.
Successful addition of voting disk 302c23b19e864f92bfa68eda9045e5cc.
Successful addition of voting disk 6eeca4920acb4f8fbf6ec5a4e2b8ea7b.
Successful deletion of voting disk 32f7d65cf17d4fa3bf2932998251635f.
Successful deletion of voting disk 10c31fb0891d4f5abfb38ef34cd49f4d.
Successful deletion of voting disk 7d6f7d6480554f01bfc2621a3adb8f5f.
Successfully replaced voting disk group with +CRS.
CRS-4266: Voting file(s) successfully replaced
[root@test ~]# $ORACLE_HOME/bin/crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 9d351cfdbef64facbfe2d1519880ef33 (ORCL:DISK4) [CRS]
2. ONLINE 302c23b19e864f92bfa68eda9045e5cc (ORCL:DISK5) [CRS]
3. ONLINE 6eeca4920acb4f8fbf6ec5a4e2b8ea7b (ORCL:DISK6) [CRS]
Located 3 voting disk(s).
[root@test ~]# $ORACLE_HOME/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2804
Available space (kbytes) : 259316
ID : 1778064925
Device/File Name : +CRS
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
4) Change ASM SPFILE location from <Current diskgroup> to <CRS> Diskgroup.
Login as SYSASM using SQLPLUS into ASM instance on one node and run below commands:
SQL> create pfile='/tmp/init/init' from spfile;
SQL> create spfile='+CRS' from pfile='/tmp/init/init';
Now GPNPTOOL will get updated with new ASM SPFILE location.
That can be verified by below command : (As grid user or root)
$ORACLE_HOME/bin/gpnptool get
5)Mount diskgroup in all RAC nodes:
SQL> alter diskgroup CRS mount;
Restart CRS in all nodes to startup CRS using new SPFILE from <CRS> diskgroup :
$> crsctl stop crs
$> crsctl start crs
6) Verify the mount of the diskgroup and its disks:
SQL> set line 1000
SQL> set pages 599
SQL> col path format a30
SQL> select name,path,group_number,header_status,total_mb,free_mb from v$asm_disk;
NAME PATH GROUP_NUMBER HEADER_STATU TOTAL_MB FREE_MB
------------------------------ ------------------------------ ------------ ------------ ---------- ----------
DATA1 ORCL:DATA1 2 MEMBER 15109 9982
DATA2 ORCL:DATA2 2 MEMBER 15109 9982
DATA3 ORCL:DATA3 1 MEMBER 15109 9982
DATA4 ORCL:DATA4 3 MEMBER 15109 9982
DISK4 ORCL:DISK4 3 MEMBER 860 576
DISK5 ORCL:DISK5 3 MEMBER 668 376
DISK6 ORCL:DISK6 3 MEMBER 668 372
SQL> select name,state,usable_file_mb,total_mb,free_mb,required_mirror_free_mb from v$asm_diskgroup;
NAME STATE USABLE_FILE_MB TOTAL_MB FREE_MB REQUIRED_MIRROR_FREE_MB
------------------------------ ----------- -------------- ---------- ---------- -----------------------
DATA MOUNTED 9982 15109 9982 0
CRS MOUNTED 552 2448 1400 296
7) Ensure ALL Cluster resources are started successfully using below sample commands :
$ORACLE_HOME/bin/crsctl stat res -init -t
$ORACLE_HOME/bin/crsctl check cluster -all
$ORACLE_HOME/bin/crsctl stat res -t
8) Modify the backup location for the OCR
ocrconfig -backuploc <new location>
https://dbaclass.com/article/how-to-move-voting-disk-to-another-asm-disk/
No comments:
Post a Comment