Use VBox to simulate storage migration environments, os:rhel5.9,db:oracle 10.2.0.4 RAC ASM 2Nodes.
ASM uses extern redundancy, which does not use ASM's rebalance functionality, and OCR and Votedisk are stored in raw.
Migration includes Controlfile,datafile,tempfile,spfile,ocr,votedisk.
Path before migration
OCR/DEV/SDF1/DEV/RAW/RAW1,/DEV/SDF2/DEV/RAW/RAW2
VOTEDISK/DEV/SDG1/DEV/RAW/RAW3,/DEV/SDG2/DEV/RAW/RAW4,/dev/sdg3/dev/raw/raw5
ASM +data/dev/sdb
ASM +FRA/DEV/SDC
Post-Migration path
OCR/DEV/SDH1/DEV/RAW/RAW6,/dev/sdh2/dev/raw/raw7
Votedisk/dev/sdi1/dev/raw/raw8,/dev/sdi2/dev/raw/raw9,/DEV/SDI3/DEV/RAW/RAW10
ASM +DATAFG/DEV/SDD
ASM +FRADG/DEV/SDE
Migrating Votedisk and OCR
[ORACLE@RACDB1 ~]$ Ocrcheck
Status of Oracle Cluster Registry is as follows:
Version:2
Total Space (Kbytes): 497744
Used Space (Kbytes): 4360
Available Space (Kbytes): 493384
id:803449477
Device/file Name:/DEV/RAW/RAW1
Device/file Integrity Check Succeeded
Device/file Name:/DEV/RAW/RAW2
Device/file Integrity Check Succeeded
Cluster Registry Integrity Check succeeded
[ORACLE@RACDB1 ~]$
[ORACLE@RACDB1 ~]$ crsctl Query css Votedisk
0.0/dev/raw/raw3
1.0/dev/raw/raw4
2.0/dev/raw/raw5
Located 3 Votedisk (s).
Turning off CRS for a RAC environment
[ROOT@RACDB1 ~]#/etc/init.d/init.crs Stop
Shutting down Oracle Cluster Ready Services (CRS):
Nov 24 16:06:49.700 | INF | Daemon shutting down
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.
[Root@racdb2 ~]#/etc/init.d/init.crs Stop
Shutting down Oracle Cluster Ready Services (CRS):
Nov 24 16:07:11.360 | INF | Daemon shutting down
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.
Backup Votedisk
[ROOT@RACDB1 ~]# DD if=/dev/raw/raw3 Of=/u01/votedisk.bak
Add Votedisk
[ROOT@RACDB1 ~]#/u01/app/oracle/product/10.2.0/db_1/bin/crsctl Add CSS Votedisk/dev/raw/raw8-force
Now formatting voting disk:/dev/raw/raw8
Successful addition of VOTEDISK/DEV/RAW/RAW8.
[ROOT@RACDB1 ~]#/u01/app/oracle/product/10.2.0/db_1/bin/crsctl Add CSS Votedisk/dev/raw/raw9-force
Now formatting voting disk:/dev/raw/raw9
Successful addition of VOTEDISK/DEV/RAW/RAW9.
[ROOT@RACDB1 ~]#/u01/app/oracle/product/10.2.0/db_1/bin/crsctl Add CSS Votedisk/dev/raw/raw10-force
Now formatting voting disk:/DEV/RAW/RAW10
Successful addition of VOTEDISK/DEV/RAW/RAW10.
Delete the old Votedisk
[root@racdb1 ~]#/u01/app/oracle/product/10.2.0/db_1/bin/crsctl Delete css Votedisk/dev/raw/raw3-force
Successful deletion of VOTEDISK/DEV/RAW/RAW3.
[root@racdb1 ~]#/u01/app/oracle/product/10.2.0/db_1/bin/crsctl Delete css Votedisk/dev/raw/raw4-force
Successful deletion of VOTEDISK/DEV/RAW/RAW4.
[root@racdb1 ~]#/u01/app/oracle/product/10.2.0/db_1/bin/crsctl Delete css Votedisk/dev/raw/raw5-force
Successful deletion of VOTEDISK/DEV/RAW/RAW5.
Start CRS
[ROOT@RACDB1 ~]#/u01/app/oracle/product/10.2.0/db_1/bin/crsctl start CRS
Attempting to start CRS stack
The CRS stack would be started shortly
[ROOT@RACDB2 ~]#/u01/app/oracle/product/10.2.0/db_1/bin/crsctl start CRS
Attempting to start CRS stack
The CRS stack would be started shortly
Check CRS status, Votedisk path
[ORACLE@RACDB1 ~]$ crsctl Check CRS
CSS appears healthy
CRS appears healthy
EVM appears healthy
[ORACLE@RACDB1 ~]$ Crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora ..... Sm1.asm Application Online Online racdb1
Ora ..... B1.lsnr Application Online Online racdb1
ORA.RACDB1.GSD Application Online Online racdb1
Ora.racdb1.ons Application Online Online racdb1
ORA.RACDB1.VIP Application Online Online racdb1
Ora ..... Sm2.asm Application Online Online racdb2
Ora ..... B2.lsnr Application Online Online racdb2
ORA.RACDB2.GSD Application Online Online racdb2
Ora.racdb2.ons Application Online Online racdb2
ORA.RACDB2.VIP Application Online Online racdb2
Ora.zhongwc.db Application Online Online racdb2
Ora....c1.inst Application Online Online racdb1
Ora....c2.inst Application Online Online racdb2
Ora.....zwc.cs Application Online Online racdb1
ORA....WC1.SRV Application Online Online racdb1
[ORACLE@RACDB1 ~]$
[ORACLE@RACDB1 ~]$ crsctl Query css Votedisk
0.0/dev/raw/raw8
1.0/dev/raw/raw9
2.0/dev/raw/raw10
Located 3 Votedisk (s).
Backup OCR
[ROOT@RACDB1 bin]#/u01/app/oracle/product/10.2.0/crs/bin/ocrcheck
Status of Oracle Cluster Registry is as follows:
Version:2
Total Space (Kbytes): 497744
Used Space (Kbytes): 4360
Available Space (Kbytes): 493384
id:803449477
Device/file Name:/DEV/RAW/RAW1
Device/file Integrity Check Succeeded
Device/file Name:/DEV/RAW/RAW2
Device/file Integrity Check Succeeded
Cluster Registry Integrity Check succeeded
[ROOT@RACDB1 bin]#
[Root@racdb1 bin]#/u01/app/oracle/product/10.2.0/crs/bin/ocrconfig-export/u01/ocr_bak-s Online
Migrating OCR
[ROOT@RACDB1 bin]#/u01/app/oracle/product/10.2.0/crs/bin/ocrconfig-replace ocr/dev/raw/raw6
[ROOT@RACDB1 bin]#/u01/app/oracle/product/10.2.0/crs/bin/ocrconfig-replace ocrmirror/dev/raw/raw7
Check OCR
[Oracle@racdb2 ~]$ Ocrcheck
Status of Oracle Cluster Registry is as follows:
Version:2
Total Space (Kbytes): 497744
Used Space (Kbytes): 4360
Available Space (Kbytes): 493384
id:803449477
Device/file Name:/dev/raw/raw6
Device/file Integrity Check Succeeded
Device/file Name:/dev/raw/raw7
Device/file Integrity Check Succeeded
Cluster Registry Integrity Check succeeded
Migration Datafile,controlfile,logfile,spfile
Create ASM DiskGroup
Asm_diskgroups= ' DATA ', ' FRA ', ' DATADG ', ' FRADG '
[ORACLE@RACDB1 ~]$ Export ORACLE_SID=+ASM1
[ORACLE@RACDB1 ~]$ Sqlplus/as SYSDBA
Sql*plus:release 10.2.0.4.0-production on Sun Nov 24 16:40:05 2013
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition release 10.2.0.4.0-64bit Production
With the partitioning, real application clusters, OLAP, Data Mining
and real Application testing options
Sql> Col name for A8
Sql> Col path for A15
Sql> Select a.path,b.name,b.state from V$asm_disk a,v$asm_diskgroup b where a.group_number=b.group_number (+) Order BY 1;
PATH NAME State
--------------- -------- ----------------------
/DEV/ASM-DISKB DATA Mounted
/DEV/ASM-DISKC FRA Mounted
/dev/asm-diskd
/dev/asm-diske
sql> Create DiskGroup DATADG external redundancy disk '/DEV/ASM-DISKD ';
DiskGroup created.
sql> Create DiskGroup FRADG external redundancy disk '/dev/asm-diske ';
DiskGroup created.
Sql> Select a.path,b.name,b.state from V$asm_disk a,v$asm_diskgroup b where a.group_number=b.group_number (+) Order BY 1;
PATH NAME State
--------------- -------- ----------------------