Migrating OCR, Voting Disk and MGMTDB to another ASM DiskGroup in 12c RAC

Sometime DBA need to move or migrate below mentioned files or DB to different ASM DiskGroup for difference reason. I will show how to move or migrate below mentioned files or DB from one ASM DiskGroup to Another:

  • How to move or migrate OCR and Voting Disk from one ASM Diskgroup to another.
  • How to move or migrate SPFILE and PWDFILE from one ASM Diskgroup to another.
  • How to move or migrate MGMTDB from one ASM Diskgroup to another.

How to move or migrate OCR and Voting Disk from one ASM Diskgroup (+OCR) to another (+OCR_VOTE):

Create New ASM DiskGroup:

SQL> CREATE DISKGROUP OCR_VOTE NORMAL REDUNDANCY
FAILGROUP controller01 DISK 'ORCL:VOTINGDISK01'
FAILGROUP controller02 DISK 'ORCL:VOTINGDISK02'
FAILGROUP controller03 DISK 'ORCL:VOTINGDISK03'
ATTRIBUTE
'au_size'='1M',
'compatible.asm' = '12.1';  

Diskgroup created.
[grid@ocmnode2 ~]$ srvctl status diskgroup -g OCR_VOTE
Disk Group OCR_VOTE is running on ocmnode2

OCR Setting Details:

[grid@ocmnode2 ~]$ olsnodes -s
ocmnode1        Active
ocmnode2        Active
[grid@ocmnode2 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          4
         Total space (kbytes)     :     409568
         Used space (kbytes)      :       1516
         Available space (kbytes) :     408052
         ID                       :  573959794
         Device/File Name         :       +OCR
                                    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 bypassed due to non-privileged user

[grid@ocmnode2 ~]$ cat /etc/oracle/ocr.loc
ocrconfig_loc=+OCR/ocmnode-cluster/OCRFILE/registry.255.1047853917
local_only=FALSE

Voting Disk Setting Details:

[grid@ocmnode2 ~]$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   cbbbfa3f83074fe9bf67da431a51cb6e (ORCL:OCRDISK1) [OCR]
 2. ONLINE   bc0fd34d64d44f26bf44ceb14758e21c (ORCL:OCRDISK2) [OCR]
 3. ONLINE   4af143af9e234f13bf4cb9b8ef999d88 (ORCL:OCRDISK3) [OCR]
Located 3 voting disk(s).
[root@ocmnode2 ~]# export GRID_HOME=/u01/app/12.1.0/grid/
[root@ocmnode2 ~]# $GRID_HOME/bin/ocrconfig -manualbackup

ocmnode2     2020/08/09 00:53:45     /u01/app/12.1.0/grid/cdata/ocmnode-cluster/backup_20200809_005345.ocr     0
[root@ocmnode2 ~]#  $GRID_HOME/bin/ocrconfig -showbackup

ocmnode2     2020/08/08 21:37:05     /u01/app/12.1.0/grid/cdata/ocmnode-cluster/backup00.ocr     0

ocmnode2     2020/08/08 21:37:05     /u01/app/12.1.0/grid/cdata/ocmnode-cluster/day.ocr     0

ocmnode2     2020/08/08 21:37:05     /u01/app/12.1.0/grid/cdata/ocmnode-cluster/week.ocr     0

ocmnode2     2020/08/09 00:53:45     /u01/app/12.1.0/grid/cdata/ocmnode-cluster/backup_20200809_005345.ocr     0

Moving Voting Disk:

[grid@ocmnode2 grid]$ crsctl replace votedisk +OCR_VOTE
Successful addition of voting disk 939d9806d81c4fd2bf9ca2404b33b175.
Successful addition of voting disk dd90310d36424ff5bf2c8d7e30d101d0.
Successful addition of voting disk 34254b0222db4f0dbfaedd77129bc8ac.
Successful deletion of voting disk cbbbfa3f83074fe9bf67da431a51cb6e.
Successful deletion of voting disk bc0fd34d64d44f26bf44ceb14758e21c.
Successful deletion of voting disk 4af143af9e234f13bf4cb9b8ef999d88.
Successfully replaced voting disk group with +OCR_VOTE.
CRS-4266: Voting file(s) successfully replaced
[grid@ocmnode2 grid]$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   939d9806d81c4fd2bf9ca2404b33b175 (ORCL:VOTINGDISK01) [OCR_VOTE]
 2. ONLINE   dd90310d36424ff5bf2c8d7e30d101d0 (ORCL:VOTINGDISK02) [OCR_VOTE]
 3. ONLINE   34254b0222db4f0dbfaedd77129bc8ac (ORCL:VOTINGDISK03) [OCR_VOTE]
Located 3 voting disk(s).

Moving OCR File:

[grid@ocmnode2 grid]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          4
         Total space (kbytes)     :     409568
         Used space (kbytes)      :       1548
         Available space (kbytes) :     408020
         ID                       :  573959794
         Device/File Name         :       +OCR
                                    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 bypassed due to non-privileged user

[grid@ocmnode2 grid]$ $GRID_HOME/bin/ocrconfig -add +OCR_VOTE
PROT-20: Insufficient permission to proceed. Require privileged user

[root@ocmnode2 ~]# export GRID_HOME=/u01/app/12.1.0/grid/
[root@ocmnode2 ~]# echo $GRID_HOME
/u01/app/12.1.0/grid/

[root@ocmnode2 ~]# $GRID_HOME/bin/ocrconfig -add +OCR_VOTE

OCR file will show two locations – on existing ASM DiskGrooup (+OCR) and New ASM DiskGroup (+OCR_VOTE)

[root@ocmnode2 ~]# $GRID_HOME/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          4
         Total space (kbytes)     :     409568
         Used space (kbytes)      :       1548
         Available space (kbytes) :     408020
         ID                       :  573959794
         Device/File Name         :       +OCR
                                    Device/File integrity check succeeded
         Device/File Name         :  +OCR_VOTE
                                    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

Delete the OCR from existing OCR DiskGroup.

[root@ocmnode2 ~]# $GRID_HOME/bin/ocrconfig -delete +OCR
[root@ocmnode2 ~]# $GRID_HOME/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          4
         Total space (kbytes)     :     409568
         Used space (kbytes)      :       1548
         Available space (kbytes) :     408020
         ID                       :  573959794
         Device/File Name         :  +OCR_VOTE
                                    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

Final validation of OCR with Cluster Verify Utility:

[grid@ocmnode2 ~]$ cluvfy comp ocr

Verifying OCR integrity

Checking OCR integrity...

Checking the absence of a non-clustered configuration...
All nodes free of non-clustered, local-only configurations


Checking daemon liveness...
Liveness check passed for "CRS daemon"

Checking OCR config file "/etc/oracle/ocr.loc"...

OCR config file "/etc/oracle/ocr.loc" check successful


Disk group for ocr location "+OCR_VOTE/ocmnode-cluster/OCRFILE/registry.255.1047949319" is available on all the nodes


Checking OCR backup location "/u01/app/12.1.0/grid/cdata/ocmnode-cluster"

OCR backup location "/u01/app/12.1.0/grid/cdata/ocmnode-cluster" check passed

NOTE:
This check does not verify the integrity of the OCR contents. Execute 'ocrcheck' as a privileged user to verify the contents of OCR.

OCR integrity check passed

Verification of OCR integrity was successful.

How to move or migrate SPFILE and PWDFILE from one ASM Diskgroup (+OCR) to another (+OCR_VOTE):

ASM SPFile and Password File Deails:

[grid@ocmnode2 ~]$ olsnodes -c
ocmnode-cluster
[grid@ocmnode2 ~]$ sqlplus / as sysasm

SQL*Plus: Release 12.1.0.2.0 Production on Sun Aug 9 00:42:24 2020

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

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> select concat('+'||gname, sys_connect_by_path(aname, '/')) FILES_OF_CLUSTER
    from ( select b.name gname, a.parent_index pindex, a.name aname,a.reference_index rindex , a.system_created, a.alias_directory,c.type file_type
    from v$asm_alias a, v$asm_diskgroup b, v$asm_file c
    where a.group_number = b.group_number and a.group_number = c.group_number(+) and a.file_number = c.file_number(+) and a.file_incarnation = c.incarnation(+)
    ) WHERE file_type in ( 'ASMPARAMETERFILE','PASSWORD')
    start with (mod(pindex, power(2, 24))) = 0
    and rindex in ( select a.reference_index from v$asm_alias a, v$asm_diskgroup b
    where a.group_number = b.group_number and (mod(a.parent_index, power(2, 24))) = 0 and a.name = LOWER('ocmnode-cluster')) 
    connect by prior rindex = pindex;

FILES_OF_CLUSTER
--------------------------------------------------------------------------------
+OCR/ocmnode-cluster/ASMPARAMETERFILE/REGISTRY.253.1047853915

Get existing password and parameter files location:

[grid@ocmnode2 ~]$ srvctl config asm
ASM home: <CRS home>
Password file: +OCR/orapwASM
ASM listener: LISTENER
[grid@ocmnode2 ~]$ asmcmd pwget --asm
+OCR/orapwASM

[grid@ocmnode2 ~]$ asmcmd spget
+OCR/ocmnode-cluster/ASMPARAMETERFILE/registry.253.1047853915
[grid@ocmnode2 ~]$ asmcmd
ASMCMD> cd +OCR_VOTE
ASMCMD> ls
ocmnode-cluster/
ASMCMD> cd ocmnode-cluster/
ASMCMD> ls
OCRFILE/
ASMCMD> mkdir ASMPARAMETERFILE
ASMCMD> pwd
+OCR_VOTE/ocmnode-cluster

Moving ASM SPFile: Ignore the error it shows.

[grid@ocmnode2 ~]$ asmcmd spmove '+OCR/ocmnode-cluster/ASMPARAMETERFILE/registry.253.1047853915' '+OCR_VOTE/ocmnode-cluster/ASMPARAMETERFILE/spfileASM.ora'                    ORA-15032: not all alterations performed
ORA-15028: ASM file '+OCR/ocmnode-cluster/ASMPARAMETERFILE/registry.253.1047853915' not dropped; currently being accessed (DBD ERROR: OCIStmtExecute)
[grid@ocmnode2 ~]$ asmcmd spget
+OCR_VOTE/ocmnode-cluster/ASMPARAMETERFILE/spfileASM.ora

Moving ASM Password File:

[grid@ocmnode2 ~]$ asmcmd pwmove --asm +OCR/orapwASM +OCR_VOTE/ocmnode-cluster/orapwASM
moving +OCR/orapwASM -> +OCR_VOTE/ocmnode-cluster/orapwASM
[grid@ocmnode2 ~]$ asmcmd pwget --asm
+OCR_VOTE/ocmnode-cluster/orapwASM

How to move or migrate MGMTDB from one ASM Diskgroup (+OCR) to another (+OCR_VOTE):

Current Configuration of MGMTDB database:

[root@ocmnode2 ~]# srvctl config mgmtdb
Database unique name: _mgmtdb
Database name:
Oracle home: <CRS home>
Oracle user: grid
Spfile: +OCR/_MGMTDB/PARAMETERFILE/spfile.268.1047855469
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Type: Management
PDB name: ocmnode_cluster
PDB service: ocmnode_cluster
Cluster name: ocmnode-cluster
Database instance: -MGMTDB

Status of MGMTDB:

[grid@ocmnode2 ~]$ srvctl status mgmtdb
Database is enabled
Instance -MGMTDB is running on node ocmnode2

Stop database and listener service for MGMTDB

[grid@ocmnode2 ~]$ srvctl stop mgmtdb
[grid@ocmnode2 ~]$ srvctl stop mgmtlsnr
[grid@ocmnode2 ~]$ srvctl status mgmtdb
Database is enabled
Database is not running.

Take cold backup of MGMTDB database.

[grid@ocmnode2 ~]$ mkdir -p /u01/software/mgmt_db_backup
[grid@ocmnode2 ~]$ export ORACLE_SID=-MGMTDB
[grid@ocmnode2 ~]$ rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Sun Aug 9 16:57:10 2020

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database (not started)

RMAN> startup mount

Oracle instance started
database mounted

Total System Global Area     788529152 bytes

Fixed Size                     2929352 bytes
Variable Size                314576184 bytes
Database Buffers             465567744 bytes
Redo Buffers                   5455872 bytes

RMAN> backup database format '/u01/software/mgmtdb_%U' tag='mgmt_db_bk';

Starting backup at 09-AUG-20
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=29 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00011 name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysmgmtdata.269.1047855577
input datafile file number=00007 name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/system.270.1047855579
input datafile file number=00008 name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysaux.271.104785559
input datafile file number=00010 name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysgridhomedata.272.1                                           047855579
input datafile file number=00012 name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysmgmtdatadb.273.1047855579
input datafile file number=00009 name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/users.274.1047855579
channel ORA_DISK_1: starting piece 1 at 09-AUG-20
channel ORA_DISK_1: finished piece 1 at 09-AUG-20
piece handle=/u01/software/mgmtdb_01v7ek40_1_1 tag=MGMT_DB_BK comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+OCR/_MGMTDB/DATAFILE/system.258.1047855351
input datafile file number=00003 name=+OCR/_MGMTDB/DATAFILE/sysaux.257.1047855339
input datafile file number=00004 name=+OCR/_MGMTDB/DATAFILE/undotbs1.259.1047855367
channel ORA_DISK_1: starting piece 1 at 09-AUG-20
channel ORA_DISK_1: finished piece 1 at 09-AUG-20
piece handle=/u01/software/mgmtdb_02v7ek47_1_1 tag=MGMT_DB_BK comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00005 name=+OCR/_MGMTDB/FD9AC0F7C36E4438E043B6A9E80A24D5/DATAFILE/system.265.1047855409
input datafile file number=00006 name=+OCR/_MGMTDB/FD9AC0F7C36E4438E043B6A9E80A24D5/DATAFILE/sysaux.266.1047855409
channel ORA_DISK_1: starting piece 1 at 09-AUG-20
channel ORA_DISK_1: finished piece 1 at 09-AUG-20
piece handle=/u01/software/mgmtdb_03v7ek4e_1_1 tag=MGMT_DB_BK comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 09-AUG-20

Starting Control File and SPFILE Autobackup at 09-AUG-20
piece handle=/u01/app/12.1.0/grid/dbs/c-1252129450-20200809-00 comment=NONE
Finished Control File and SPFILE Autobackup at 09-AUG-20

Moving / Migrating SPFILE to Diskgroup +OCR_VOTE. RMAN will restore SPFILE and update OCR to a new SPFILE Location.

RMAN> restore spfile to "+OCR_VOTE";

Starting restore at 09-AUG-20
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=24 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: restoring SPFILE
output file name=+OCR_VOTE
channel ORA_DISK_1: reading from backup piece /u01/app/12.1.0/grid/dbs/c-1252129450-20200809-00
channel ORA_DISK_1: piece handle=/u01/app/12.1.0/grid/dbs/c-1252129450-20200809-00 tag=TAG20200809T170002
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 09-AUG-20

[grid@ocmnode2 ~]$ srvctl config mgmtdb |grep Spfile
Spfile: +OCR_VOTE/_MGMTDB/PARAMETERFILE/spfile.257.1048007101

Till spfile location is showing the OLD location. Database Needs to reboot to be impacted.

SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +OCR/_MGMTDB/PARAMETERFILE/spfile.268.1047855469
[grid@ocmnode2 ~]$ srvctl stop mgmtdb
[grid@ocmnode2 ~]$ export ORACLE_SID=-MGMTDB
SQL> startup mount;
ORACLE instance started.

Total System Global Area  788529152 bytes
Fixed Size                  2929352 bytes
Variable Size             314576184 bytes
Database Buffers          465567744 bytes
Redo Buffers                5455872 bytes
Database mounted.

SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +OCR_VOTE/_MGMTDB/PARAMETERFILE/spfile.257.1048007101

Restore Control File:

[grid@ocmnode2 ~]$ srvctl stop mgmtdb
[grid@ocmnode2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Sun Aug 9 17:20:31 2020

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

Connected to an idle instance.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area  788529152 bytes
Fixed Size                  2929352 bytes
Variable Size             314576184 bytes
Database Buffers          465567744 bytes
Redo Buffers                5455872 bytes

SQL> show parameter control_file

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7
control_files                        string      +OCR/_MGMTDB/CONTROLFILE/current.260.1047855403   

SQL> alter system set control_files='+OCR_VOTE' scope=spfile ;

System altered.

SQL> shutdown immediate;
ORA-01507: database not mounted

ORACLE instance shut down.
[grid@ocmnode2 ~]$ rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Sun Aug 9 17:35:49 2020

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database (not started)

RMAN> startup nomount

Oracle instance started

Total System Global Area     788529152 bytes

Fixed Size                     2929352 bytes
Variable Size                314576184 bytes
Database Buffers             465567744 bytes
Redo Buffers                   5455872 bytes

RMAN> RESTORE CONTROLFILE FROM '+OCR/_MGMTDB/CONTROLFILE/current.260.1047855403';

Starting restore at 09-AUG-20
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1 device type=DISK

channel ORA_DISK_1: copied control file copy
output file name=+OCR_VOTE/_MGMTDB/CONTROLFILE/current.258.1048008977
Finished restore at 09-AUG-20

Restore Datafile from backup for MGMTDB:

RMAN> startup mount

database is already started
database mounted
released channel: ORA_DISK_1

RMAN> BACKUP AS COPY DEVICE TYPE DISK DATABASE FORMAT '+OCR_VOTE';

Starting backup at 09-AUG-20
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00011 name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysmgmtdata.269.1047855577
output file name=+OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/sysmgmtdata.259.1048009071 tag=TAG20200809T173751 RECID=9 STAMP=1048009088
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+OCR/_MGMTDB/DATAFILE/system.258.1047855351
output file name=+OCR_VOTE/_MGMTDB/DATAFILE/system.260.1048009097 tag=TAG20200809T173751 RECID=10 STAMP=1048009100
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=+OCR/_MGMTDB/DATAFILE/sysaux.257.1047855339
output file name=+OCR_VOTE/_MGMTDB/DATAFILE/sysaux.261.1048009103 tag=TAG20200809T173751 RECID=11 STAMP=1048009106
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=+OCR/_MGMTDB/FD9AC0F7C36E4438E043B6A9E80A24D5/DATAFILE/system.265.1047855409
output file name=+OCR_VOTE/_MGMTDB/AC55DFF48C5B4820E0530A38A8C05BF3/DATAFILE/system.262.1048009111 tag=TAG20200809T173751 RECID=12 STAMP=1048009111
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile file number=00007 name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/system.270.1047855579
output file name=+OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/system.263.1048009113 tag=TAG20200809T173751 RECID=13 STAMP=1048009115
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=+OCR/_MGMTDB/FD9AC0F7C36E4438E043B6A9E80A24D5/DATAFILE/sysaux.266.1047855409
output file name=+OCR_VOTE/_MGMTDB/AC55DFF48C5B4820E0530A38A8C05BF3/DATAFILE/sysaux.264.1048009117 tag=TAG20200809T173751 RECID=14 STAMP=1048009118
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile file number=00008 name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysaux.271.1047855579
output file name=+OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/sysaux.265.1048009119 tag=TAG20200809T173751 RECID=15 STAMP=1048009121
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile file number=00010 name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysgridhomedata.272.1047855579
output file name=+OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/sysgridhomedata.266.1048009123 tag=TAG20200809T173751 RECID=16 STAMP=1048009123
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile copy
input datafile file number=00012 name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysmgmtdatadb.273.1047855579
output file name=+OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/sysmgmtdatadb.267.1048009125 tag=TAG20200809T173751 RECID=17 STAMP=1048009124
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=+OCR/_MGMTDB/DATAFILE/undotbs1.259.1047855367
output file name=+OCR_VOTE/_MGMTDB/DATAFILE/undotbs1.268.1048009125 tag=TAG20200809T173751 RECID=18 STAMP=1048009125
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile copy
input datafile file number=00009 name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/users.274.1047855579
output file name=+OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/users.269.1048009127 tag=TAG20200809T173751 RECID=19 STAMP=1048009126
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 09-AUG-20

Starting Control File and SPFILE Autobackup at 09-AUG-20
piece handle=/u01/app/12.1.0/grid/dbs/c-1252129450-20200809-01 comment=NONE
Finished Control File and SPFILE Autobackup at 09-AUG-20

RMAN> SWITCH DATABASE TO COPY;

datafile 1 switched to datafile copy "+OCR_VOTE/_MGMTDB/DATAFILE/system.260.1048009097"
datafile 3 switched to datafile copy "+OCR_VOTE/_MGMTDB/DATAFILE/sysaux.261.1048009103"
datafile 4 switched to datafile copy "+OCR_VOTE/_MGMTDB/DATAFILE/undotbs1.268.1048009125"
datafile 5 switched to datafile copy "+OCR_VOTE/_MGMTDB/AC55DFF48C5B4820E0530A38A8C05BF3/DATAFILE/system.262.1048009111"
datafile 6 switched to datafile copy "+OCR_VOTE/_MGMTDB/AC55DFF48C5B4820E0530A38A8C05BF3/DATAFILE/sysaux.264.1048009117"
datafile 7 switched to datafile copy "+OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/system.263.1048009113"
datafile 8 switched to datafile copy "+OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/sysaux.265.1048009119"
datafile 9 switched to datafile copy "+OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/users.269.1048009127"
datafile 10 switched to datafile copy "+OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/sysgridhomedata.266.1048009123"
datafile 11 switched to datafile copy "+OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/sysmgmtdata.259.1048009071"
datafile 12 switched to datafile copy "+OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/sysmgmtdatadb.267.1048009125"

Verify DataFile Location:

RMAN> report schema;

Report of database schema for database with db_unique_name _MGMTDB

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    500      SYSTEM               ***     +OCR_VOTE/_MGMTDB/DATAFILE/system.260.1048009097
3    400      SYSAUX               ***     +OCR_VOTE/_MGMTDB/DATAFILE/sysaux.261.1048009103
4    80       UNDOTBS1             ***     +OCR_VOTE/_MGMTDB/DATAFILE/undotbs1.268.1048009125
5    160      PDB$SEED:SYSTEM      ***     +OCR_VOTE/_MGMTDB/AC55DFF48C5B4820E0530A38A8C05BF3/DATAFILE/system.262.1048009111
6    150      PDB$SEED:SYSAUX      ***     +OCR_VOTE/_MGMTDB/AC55DFF48C5B4820E0530A38A8C05BF3/DATAFILE/sysaux.264.1048009117
7    160      OCMNODE_CLUSTER:SYSTEM ***     +OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/system.263.1048009113
8    150      OCMNODE_CLUSTER:SYSAUX ***     +OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/sysaux.265.1048009119
9    5        OCMNODE_CLUSTER:USERS ***     +OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/users.269.1048009127
10   100      OCMNODE_CLUSTER:SYSGRIDHOMEDATA ***     +OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/sysgridhomedata.266.1048009123
11   2048     OCMNODE_CLUSTER:SYSMGMTDATA ***     +OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/sysmgmtdata.259.1048009071
12   100      OCMNODE_CLUSTER:SYSMGMTDATADB ***     +OCR_VOTE/_MGMTDB/AC55EB2134D24F67E0530A38A8C09987/DATAFILE/sysmgmtdatadb.267.1048009125

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    40       TEMP                 32767       +OCR/_MGMTDB/TEMPFILE/temp.264.1047855405
2    40       PDB$SEED:TEMP        32767       +OCR/_MGMTDB/FD9AC0F7C36E4438E043B6A9E80A24D5/DATAFILE/pdbseed_temp012020-08-07_10-56-58-pm.dbf
3    40       OCMNODE_CLUSTER:TEMP 32767       +OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/ocmnode_cluster_temp012020-08-07_11-00-05-pm.dbf

Moving temporary file to +OCR_VOTE DiskGroup.

RMAN> run {
SET NEWNAME FOR TEMPFILE 1 TO '+OCR_VOTE';
SWITCH TEMPFILE ALL;
}

executing command: SET NEWNAME

renamed tempfile 1 to +OCR_VOTE in control file

RMAN> run {
SET NEWNAME FOR TEMPFILE 2 TO '+OCR_VOTE';
SWITCH TEMPFILE ALL;
}

executing command: SET NEWNAME

renamed tempfile 2 to +OCR_VOTE in control file

RMAN> run {
SET NEWNAME FOR TEMPFILE 3 TO '+OCR_VOTE';
SWITCH TEMPFILE ALL;
}

executing command: SET NEWNAME

renamed tempfile 3 to +OCR_VOTE in control file

Delete old datafiles from existing DiskGroup (+OCR):

RMAN> delete copy ;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1 device type=DISK
specification does not match any control file copy in the repository
specification does not match any archived log in the repository
List of Datafile Copies
=======================

Key     File S Completion Time Ckp SCN    Ckp Time
------- ---- - --------------- ---------- ---------------
20      1    A 09-AUG-20       2307447    09-AUG-20
        Name: +OCR/_MGMTDB/DATAFILE/system.258.1047855351

21      3    A 09-AUG-20       2307447    09-AUG-20
        Name: +OCR/_MGMTDB/DATAFILE/sysaux.257.1047855339

22      4    A 09-AUG-20       2307447    09-AUG-20
        Name: +OCR/_MGMTDB/DATAFILE/undotbs1.259.1047855367

23      5    A 09-AUG-20       791579     07-AUG-20
        Name: +OCR/_MGMTDB/FD9AC0F7C36E4438E043B6A9E80A24D5/DATAFILE/system.265.1047855409
        Container ID: 2, PDB Name: PDB$SEED

24      6    A 09-AUG-20       791579     07-AUG-20
        Name: +OCR/_MGMTDB/FD9AC0F7C36E4438E043B6A9E80A24D5/DATAFILE/sysaux.266.1047855409
        Container ID: 2, PDB Name: PDB$SEED

25      7    A 09-AUG-20       2307438    09-AUG-20
        Name: +OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/system.270.1047855579
        Container ID: 3, PDB Name: OCMNODE_CLUSTER

26      8    A 09-AUG-20       2307438    09-AUG-20
        Name: +OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysaux.271.1047855579
        Container ID: 3, PDB Name: OCMNODE_CLUSTER

27      9    A 09-AUG-20       2307438    09-AUG-20
        Name: +OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/users.274.1047855579
        Container ID: 3, PDB Name: OCMNODE_CLUSTER

28      10   A 09-AUG-20       2307438    09-AUG-20
        Name: +OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysgridhomedata.272.1047855579
        Container ID: 3, PDB Name: OCMNODE_CLUSTER

29      11   A 09-AUG-20       2307438    09-AUG-20
        Name: +OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysmgmtdata.269.1047855577
        Container ID: 3, PDB Name: OCMNODE_CLUSTER

30      12   A 09-AUG-20       2307438    09-AUG-20
        Name: +OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysmgmtdatadb.273.1047855579
        Container ID: 3, PDB Name: OCMNODE_CLUSTER


Do you really want to delete the above objects (enter YES or NO)? YES
deleted datafile copy
datafile copy file name=+OCR/_MGMTDB/DATAFILE/system.258.1047855351 RECID=20 STAMP=1048009214
deleted datafile copy
datafile copy file name=+OCR/_MGMTDB/DATAFILE/sysaux.257.1047855339 RECID=21 STAMP=1048009214
deleted datafile copy
datafile copy file name=+OCR/_MGMTDB/DATAFILE/undotbs1.259.1047855367 RECID=22 STAMP=1048009214
deleted datafile copy
datafile copy file name=+OCR/_MGMTDB/FD9AC0F7C36E4438E043B6A9E80A24D5/DATAFILE/system.265.1047855409 RECID=23 STAMP=1048009214
deleted datafile copy
datafile copy file name=+OCR/_MGMTDB/FD9AC0F7C36E4438E043B6A9E80A24D5/DATAFILE/sysaux.266.1047855409 RECID=24 STAMP=1048009214
deleted datafile copy
datafile copy file name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/system.270.1047855579 RECID=25 STAMP=1048009214
deleted datafile copy
datafile copy file name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysaux.271.1047855579 RECID=26 STAMP=1048009214
deleted datafile copy
datafile copy file name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/users.274.1047855579 RECID=27 STAMP=1048009214
deleted datafile copy
datafile copy file name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysgridhomedata.272.1047855579 RECID=28 STAMP=1048009214
deleted datafile copy
datafile copy file name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysmgmtdata.269.1047855577 RECID=29 STAMP=1048009214
deleted datafile copy
datafile copy file name=+OCR/_MGMTDB/FD9B43BF6A646F8CE043B6A9E80A2815/DATAFILE/sysmgmtdatadb.273.1047855579 RECID=30 STAMP=1048009214
Deleted 11 objects

Moving / Migrating Online Redo Log files:

Create New sets of Redo Log Group with new asm Diskgroup and remove existing Group (make sure you are dropping inactive states Group.

[grid@ocmnode1 ~]$ export ORACLE_SID=-MGMTDB
[grid@ocmnode1 ~]$ sqlplus / as sysdba

SQL> col MEMBER for A50
SQL> select lf.group#,lf.member, lg.bytes/1024/1024 size_mb, lg.status from v$logfile lf, v$log lg where  lf.GROUP#=lg.GROUP#  order by 1;

    GROUP# MEMBER                                                SIZE_MB STATUS
---------- -------------------------------------------------- ---------- ----------------
         1 +OCR/_MGMTDB/ONLINELOG/group_1.261.1047855403              50 ACTIVE
         2 +OCR/_MGMTDB/ONLINELOG/group_2.262.1047855403              50 CURRENT
         3 +OCR/_MGMTDB/ONLINELOG/group_3.263.1047855403              50 INACTIVE
SQL> ALTER DATABASE ADD LOGFILE MEMBER '+OCR_VOTE' TO GROUP 1;

Database altered.

SQL> ALTER DATABASE ADD LOGFILE MEMBER '+OCR_VOTE' TO GROUP 2;

Database altered.

SQL> ALTER DATABASE ADD LOGFILE MEMBER '+OCR_VOTE' TO GROUP 3;

Database altered.

SQL> select lf.group#,lf.member, lg.bytes/1024/1024 size_mb, lg.status from v$logfile lf, v$log lg where  lf.GROUP#=lg.GROUP#  order by 1;

    GROUP# MEMBER                                                SIZE_MB STATUS
---------- -------------------------------------------------- ---------- ----------------
         1 +OCR/_MGMTDB/ONLINELOG/group_1.261.1047855403              50 INACTIVE
         1 +OCR_VOTE/_MGMTDB/ONLINELOG/group_1.271.1048273795         50 INACTIVE
         2 +OCR_VOTE/_MGMTDB/ONLINELOG/group_2.272.1048273805         50 CURRENT
         2 +OCR/_MGMTDB/ONLINELOG/group_2.262.1047855403              50 CURRENT
         3 +OCR_VOTE/_MGMTDB/ONLINELOG/group_3.273.1048273813         50 INACTIVE
         3 +OCR/_MGMTDB/ONLINELOG/group_3.263.1047855403              50 INACTIVE
SQL> select lf.group#,lf.member, lg.bytes/1024/1024 size_mb, lg.status from v$logfile lf, v$log lg where  lf.GROUP#=lg                                  .GROUP#  order by 1;

    GROUP# MEMBER                                                SIZE_MB STATUS
---------- -------------------------------------------------- ---------- ----------------
         1 +OCR/_MGMTDB/ONLINELOG/group_1.261.1047855403              50 INACTIVE
         1 +OCR_VOTE/_MGMTDB/ONLINELOG/group_1.271.1048273795         50 INACTIVE
         2 +OCR_VOTE/_MGMTDB/ONLINELOG/group_2.272.1048273805         50 CURRENT
         2 +OCR/_MGMTDB/ONLINELOG/group_2.262.1047855403              50 CURRENT
         3 +OCR_VOTE/_MGMTDB/ONLINELOG/group_3.273.1048273813         50 INACTIVE
         3 +OCR/_MGMTDB/ONLINELOG/group_3.263.1047855403              50 INACTIVE

6 rows selected.

SQL> ALTER DATABASE DROP LOGFILE MEMBER '+OCR/_MGMTDB/ONLINELOG/group_3.263.1047855403';

Database altered.

SQL> ALTER DATABASE DROP LOGFILE MEMBER '+OCR/_MGMTDB/ONLINELOG/group_1.261.1047855403';

Database altered.

SQL> alter system switch logfile;

System altered.

SQL> select lf.group#,lf.member, lg.bytes/1024/1024 size_mb, lg.status from v$logfile lf, v$log lg where  lf.GROUP#=lg.GROUP#  order by 1;

    GROUP# MEMBER                                                SIZE_MB STATUS
---------- -------------------------------------------------- ---------- ----------------
         1 +OCR_VOTE/_MGMTDB/ONLINELOG/group_1.271.1048273795         50 INACTIVE
         2 +OCR_VOTE/_MGMTDB/ONLINELOG/group_2.272.1048273805         50 ACTIVE
         2 +OCR/_MGMTDB/ONLINELOG/group_2.262.1047855403              50 ACTIVE
         3 +OCR_VOTE/_MGMTDB/ONLINELOG/group_3.273.1048273813         50 CURRENT

SQL> alter system switch logfile;

System altered.

SQL>  ALTER DATABASE DROP LOGFILE MEMBER '+OCR/_MGMTDB/ONLINELOG/group_2.262.1047855403';

Database altered.
SQL> select lf.group#,lf.member, lg.bytes/1024/1024 size_mb, lg.status from v$logfile lf, v$log lg where  lf.GROUP#=lg.GROUP#  order by 1;

    GROUP# MEMBER                                                SIZE_MB STATUS
---------- -------------------------------------------------- ---------- ----------------
         1 +OCR_VOTE/_MGMTDB/ONLINELOG/group_1.271.1048273795         50 CURRENT
         2 +OCR_VOTE/_MGMTDB/ONLINELOG/group_2.272.1048273805         50 ACTIVE
         3 +OCR_VOTE/_MGMTDB/ONLINELOG/group_3.273.1048273813         50 ACTIVE