There are some scenarios when GRID disk group files need to be moved to a new disk group. This article explains how to do it for files that are there in the default FlashGrid Cluster deployment: ASM password file, ASM Spfile, OCR, Voting files, OCR backups.
Move ASM password file
Get the current password file location:
[grid@rac1 ~]$ asmcmd pwget --asm
+GRID/orapwASM
Move the ASM password file:
[grid@rac1 ~]$ asmcmd pwmove --asm -f <source_path> <destination_path>
For example:
[grid@rac1 ~]$ asmcmd pwmove --asm -f +GRID/orapwASM +GRID2/orapwASM
moving +GRID/orapwASM -> +GRID2/orapwASM
Verify that the location has been updated:
[grid@rac1 ~]$ asmcmd pwget --asm
+GRID2/orapwASM
Move ASM Spfile
Get the current spfile location:
[grid@rac1 ~]$ asmcmd spget
+GRID/myrac/ASMPARAMETERFILE/registry.253.1089909205
Move the ASM spfile:
[grid@rac1 ~]$ asmcmd spmove <source> <destination>
For example:
[grid@rac1 ~]$ asmcmd spmove +GRID/myrac/ASMPARAMETERFILE/registry.253.1089909205 +GRID2/spfile
ORA-15032: not all alterations performed
ORA-15028: ASM file '+GRID/myrac/ASMPARAMETERFILE/registry.253.1089909205' not dropped; currently being accessed (DBD ERROR: OCIStmtExecute)
The errors can be ignored as long as the spfile location has been updated:
[grid@rac1 ~]$ asmcmd spget
+GRID2/spfile
Move OCR
Get the current OCR location:
[grid@rac1 ~]$ ocrcheck -config
Oracle Cluster Registry configuration is :
Device/File Name : +GRID
Move the OCR:
[root@rac1 ~]# ocrconfig -add <new_diskgroup> [root@rac1 ~]# ocrconfig -delete <old_diskgroup>
For example:
[root@rac1 ~]# ocrconfig -add +GRID2 [root@rac1 ~]# ocrconfig -delete +GRID
Verify that the location has been updated:
[grid@rac1 ~]$ ocrcheck -config
Oracle Cluster Registry configuration is :
Device/File Name : +GRID2
Move voting files
Get the current voting files location:
[grid@rac1 ~]$ crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 068d671b9d484f70bf78e6826229da9d (/dev/flashgrid/rac2.xvdba) [GRID]
2. ONLINE f25740aa0f004fe8bfc50831e7faeaf4 (/dev/flashgrid/rac1.xvdba) [GRID]
3. ONLINE 4deea66b372c4f31bfd6260ea66c6267 (/dev/flashgrid/racq.xvdba) [GRID]
Located 3 voting disk(s).
Move the voting files:
[grid@rac1 ~]$ crsctl replace votedisk <+new_diskgroup>
For example:
[grid@rac1 ~]$ crsctl replace votedisk +GRID2
Successful addition of voting disk 2115c100302f4fc9bf351c7cabda0e65.
Successful addition of voting disk e8d8cbd5b7bc4f5fbf963e6693901bc6.
Successful addition of voting disk 222ea19c72b14f68bf18bccb0a590baf.
Successful deletion of voting disk 068d671b9d484f70bf78e6826229da9d.
Successful deletion of voting disk f25740aa0f004fe8bfc50831e7faeaf4.
Successful deletion of voting disk 4deea66b372c4f31bfd6260ea66c6267.
Successfully replaced voting disk group with +GRID2.
CRS-4266: Voting file(s) successfully replaced
Verify that the voting files have been moved to the new disk group:
[grid@rac1 ~]$ crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 2115c100302f4fc9bf351c7cabda0e65 (/dev/flashgrid/rac1.xvdbb) [GRID2]
2. ONLINE e8d8cbd5b7bc4f5fbf963e6693901bc6 (/dev/flashgrid/rac2.xvdbb) [GRID2]
3. ONLINE 222ea19c72b14f68bf18bccb0a590baf (/dev/flashgrid/racq.xvdbb) [GRID2]
Located 3 voting disk(s).
Reconfigure OCR backups
If OCR backups are placed on the old disk group, please reconfigure them: Mirror and Backup OCR.