ORACLE 12C RAC Modification ocr/votedisk/asm spfile disk group name

Source: Internet
Author: User
Tags reserved oracle database sqlplus

Look at me today this single node 12C RAC, suddenly feel that the disk group of OCR is called +dg_sys a little uncomfortable, want to change to +SYS_DG. The approach is to migrate the Ocr/votedisk/asm SPFile to an existing ASM, and then modify the disk group name and finally migrate to the new name Disk group (this process +DG_SYS->+DATA->+SYS_DG)


Current operating conditions


[Grid@xifenfei ~]$ crsctl status res-t


--------------------------------------------------------------------------------


Name Target State Server Details


--------------------------------------------------------------------------------


Local Resources


--------------------------------------------------------------------------------


Ora. Asmnet1lsnr_asm.lsnr


Online Online www.111cn.net Stable


Ora. Data.dg


Online Online Xifenfei Stable


Ora. Listener.lsnr


Online Online Xifenfei Stable


Ora.net1.network


Online Online Xifenfei Stable


Ora.ons


Online Online Xifenfei Stable


Ora.proxy_advm


ONLINE OFFLINE Xifenfei Stable


--------------------------------------------------------------------------------


Cluster Resources


--------------------------------------------------------------------------------


Ora. Listener_scan1.lsnr


1 Online Online Xifenfei stable


Ora. Mgmtlsnr


1 Online online Xifenfei 169.254.196.108 10.1


0.30.22,stable


Ora.asm


1 Online Online Xifenfei started,stable


2 OFFLINE OFFLINE Stable


3 OFFLINE OFFLINE Stable


Ora.cdb.db


1 Online Online Xifenfei open,stable


Ora.cvu


1 Online Online Xifenfei stable


Ora.oc4j


1 Online Online Xifenfei stable


Ora.scan1.vip


1 Online Online Xifenfei stable


Ora.xifenfei.vip


1 Online Online Xifenfei stable


--------------------------------------------------------------------------------





Sql> select * from V$version;





BANNER con_id


-------------------------------------------------------------------------------- ----------


Oracle Database 12c Enterprise Edition release 12.1.0.1.0-64bit Production 0


Pl/sql Release 12.1.0.1.0-production 0


CORE 12.1.0.1.0 Production 0


TNS for linux:version 12.1.0.1.0-production 0


Nlsrtl Version 12.1.0.1.0-production 0





Sql> select Name,state from V$asm_diskgroup;





NAME State


------------------------------ -----------


Dg_sys Mounted


DATA Mounted





[Grid@xifenfei ~]$ crsctl Query css Votedisk


# # state File Universal Id file Name Disk Group


--  -----    -----------------                --------- ---------


1. ONLINE 60a037da30714f6bbfe5d90206ff27a7 (/DEV/SDC2) [Dg_sys]


Located 1 voting disk (s).





[Grid@xifenfei ~]$ Ocrcheck


Status of Oracle Cluster Registry is as follows:


Version:4


Total Space (Kbytes): 409568


Used Space (Kbytes): 1380


Available Space (Kbytes): 408188


id:2132096904


Device/file Name: +dg_sys


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





Sql> Show parameter SPFile;





NAME TYPE VALUE


------------------------------------ ----------- ------------------------------


SPFile string +dg_sys/xff-cluster/asmparamet


erfile/registry.253.825640465


[/shel]


<strong> Modify OCR Path </strong>


Ocrconfig-add and Ocrconfig-delete complete the OCR replacement disk group, which can be processed online


1


[Root@xifenfei ~]# Ocrconfig-add +data


--alert Log


2013-09-09 22:32:40.799:


[CRSD (5064)] Crs-1007:the OCR/OCR Mirror location is replaced by +data.





[Root@xifenfei ~]# Ocrcheck


Status of Oracle Cluster Registry is as follows:


Version:4


Total Space (Kbytes): 409568


Used Space (Kbytes): 1380


Available Space (Kbytes): 408188


id:2132096904


Device/file Name: +dg_sys


Device/file Integrity Check Succeeded


Device/file Name: +data


Device/file Integrity Check Succeeded





Device/file Not Configured





Device/file Not Configured





Device/file Not Configured





Cluster Registry Integrity Check succeeded





[Root@xifenfei ~]# Ocrconfig-delete +dg_sys





--alert Log


2013-09-09 22:35:53.585:


[CRSD (5064)] Crs-1010:the OCR Mirror location +dg_sys was removed.





[Root@xifenfei ~]# Ocrcheck


Status of Oracle Cluster Registry is as follows:


Version:4


Total Space (Kbytes): 409568


Used Space (Kbytes): 1380


Available Space (Kbytes): 408188


id:2132096904


Device/file Name: +data


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

Modify Votedisk Path


Modified by Crsctl replace Votedisk command


[Root@xifenfei ~]# crsctl replace Votedisk +data


Successful addition of voting disk 161ddea0a5fe4f28bfb67536e6105122.


Successful deletion of voting disk 60A037DA30714F6BBFE5D90206FF27A7.


Successfully replaced voting disk group with +data.


crs-4266:voting file (s) successfully replaced





-alert Log


2013-09-09 22:38:15.259:


[CSSD (4685)] CRS-1605:CSSD voting file is online:/dev/sdb; Details In/u01/app/12.1/grid/product/log/xifenfei/cssd/ocssd.log.


2013-09-09 22:38:15.259:


[CSSD (4685)] CRS-1626:A Configuration Change Request completed successfully


2013-09-09 22:38:15.285:


[CSSD (4685)] CRS-1601:CSSD reconfiguration complete. Active nodes are Xifenfei.





[Root@xifenfei ~]# crsctl Query css Votedisk


# # state File Universal Id file Name Disk Group


--  -----    -----------------                --------- ---------


1. ONLINE 161ddea0a5fe4f28bfb67536e6105122 (/DEV/SDB) [DATA]


Located 1 voting disk (s).

Modify the ASM SPFile location


[Grid@xifenfei ~]$ Gpnptool get-o-





Success.


............


<orcl:asm-profile id= "ASM" discoverystring= "/dev/sd*" spfile= "+dg_sys/xff-cluster/asmparameterfile/" registry.253.825640465 "mode=" Legacy "/>


............





[Grid@xifenfei ~]$ Sqlplus/as sysasm





Sql*plus:release 12.1.0.1.0 Production on Mon Sep 9 22:42:05 2013





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








Connected to:


Oracle Database 12c Enterprise Edition release 12.1.0.1.0-64bit Production


With the real application clusters and Automatic Storage Management options





sql> create pfile= '/tmp/pfile.asm ' from SPFile;





File created.





sql> create spfile= ' +data ' from pfile= '/tmp/pfile.asm ';





File created.





[Grid@xifenfei ~]$ Gpnptool get-o-





Success.


............


<orcl:asm-profile id= "ASM" discoverystring= "/dev/sd*" spfile= "+data/xff-cluster/asmparameterfile/" registry.253.825720159 "mode=" Legacy "/>


............

This shows that the Create ASM SPFile automatically modifies the configuration of the SPFile in the Gpnptool profile, without human intervention.

Restart CRS Www.111cn.net
To enable ASM to use the SPFile files in the new disk group
[Root@xifenfei ~]# Crsctl Stop CRS
[Root@xifenfei ~]# crsctl start CRS

Verify that the +dg_sys disk group is not in use


[Grid@xifenfei ~]$ Sqlplus/as sysasm





Sql*plus:release 12.1.0.1.0 Production on Mon Sep 9 22:59:49 2013





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








Connected to:


Oracle Database 12c Enterprise Edition release 12.1.0.1.0-64bit Production


With the real application clusters and Automatic Storage Management options





Sql> Show parameter SPFile;





NAME TYPE VALUE


------------------------------------ ----------- ------------------------------


SPFile string +data/xff-cluster/asmparameter


file/registry.253.825720159





Asmcmd> lsof


Db_name instance_name Path


+asm +ASM1 +data.255.819326577


CDB CDB1 +data/cdb/controlfile/current.274.819356503


CDB CDB1 +data/cdb/datafile/sysaux.278.819355829


CDB CDB1 +data/cdb/datafile/system.269.819356101


CDB CDB1 +data/cdb/datafile/undotbs1.276.819356317


CDB CDB1 +data/cdb/datafile/users.279.819356309


CDB CDB1 +DATA/CDB/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/PDBSEED_TEMP01.DBF


CDB CDB1 +data/cdb/dd7c48aa5a4404a2e04325aae80a403c/datafile/sysaux.272.819356709


CDB CDB1 +data/cdb/dd7c48aa5a4404a2e04325aae80a403c/datafile/system.271.819356709


CDB CDB1 +data/cdb/onlinelog/group_1.277.822736453


CDB CDB1 +data/cdb/onlinelog/group_2.280.822736461


CDB CDB1 +data/cdb/onlinelog/group_3.275.822736397


CDB CDB1 +data/cdb/tempfile/temp.273.819356649

Dismount +dg_sys Disk Group


Asmcmd> LSDG


State Type Rebal Sector block AU total_mb free_mb req_mir_free_mb usable_file_mb offline_disks voting_ Files Name


Mounted EXTERN N 512 4096 1048576 20480 3369 0 3369 0 Y data/


Mounted EXTERN N 512 4096 1048576 5451 5231 0 5231 0 N dg_sys/


Asmcmd> Umount Dg_sys


Asmcmd> LSDG


State Type Rebal Sector block AU total_mb free_mb req_mir_free_mb usable_file_mb offline_disks voting_ Files Name


Mounted EXTERN N 512 4096 1048576 20480 3369 0 3369 0 Y data/

Modify ASM DG Name


Modify Disk group +dg_sys to +SYS_DG


[Grid@xifenfei ~]$ renamedg phase=both dgname=dg_sys NEWDGNAME=SYS_DG





Parsing parameters.





Parameters in effect:





Old DG Name:dg_sys


New DG NAME:SYS_DG


Phases:


Phase 1


Phase 2


Discovery str: (NULL)


Clean:true


Raw Only:true


RENAMEDG Operation:phase=both Dgname=dg_sys NEWDGNAME=SYS_DG verbose=true


Executing Phase 1


Discovering the Group


Performing Discovery with string:


Identified disk UFS:/DEV/SDC2 with disk number:0 and timestamp (32990496 1727895552)


Checking for Hearbeat ...


Re-discovering the Group


Performing Discovery with string:


Identified disk UFS:/DEV/SDC2 with disk number:0 and timestamp (32990496 1727895552)


Checking if the diskgroup is mounted or used by CSS


Checking Disk number:0


Generating configuration file.


Completed Phase 1


Executing Phase 2


Looking FOR/DEV/SDC2


Modifying the header


Completed Phase 2


Terminating KGFD Context 0x7fceeb02a0a0

Mount +SYS_DG


Sql> select Name,state from V$asm_diskgroup;





NAME State


------------------------------ -----------


DATA Mounted


SYS_DG dismounted





Sql> alter DiskGroup SYS_DG Mount;





DiskGroup altered.





Sql> select Name,state from V$asm_diskgroup;





NAME State


------------------------------ -----------


DATA Mounted


SYS_DG Mounted

ASM Spfile/ocr/votedisk Migration from +data to +SYS_DG
sql> create spfile= ' +SYS_DG ' from pfile= '/tmp/pfile.asm ';

File created.

[Root@xifenfei ~]# Ocrconfig-add +SYS_DG
[Root@xifenfei ~]# Ocrconfig-delete +data
[Root@xifenfei ~]# crsctl replace Votedisk +SYS_DG
Successful addition of voting disk 9694a31053ea4ff4bfb57891461a1296.
Successful deletion of voting disk 161ddea0a5fe4f28bfb67536e6105122.
Successfully replaced voting disk group with +SYS_DG.
crs-4266:voting file (s) successfully replaced
[Root@xifenfei ~]# Crsctl Stop CRS
[Root@xifenfei ~]# crsctl start CRS

Remove Old disk Group (+dg_sys) information from OCR


[Root@xifenfei ~]# crsctl status res-t


--------------------------------------------------------------------------------


Name Target State Server Details


--------------------------------------------------------------------------------


Local Resources


--------------------------------------------------------------------------------


Ora. Asmnet1lsnr_asm.lsnr


Online Online Xifenfei Stable


Ora. Data.dg


Online Online Xifenfei Stable


Ora. Dg_sys.dg


ONLINE OFFLINE Xifenfei Stable


Ora. Listener.lsnr


Online Online Xifenfei Stable


Ora. Sys_dg.dg


Online Online Xifenfei Stable


Ora.net1.network


Online Online Xifenfei Stable


Ora.ons


Online Online Xifenfei Stable


Ora.proxy_advm


ONLINE OFFLINE Xifenfei Stable


--------------------------------------------------------------------------------


Cluster Resources


--------------------------------------------------------------------------------


Ora. Listener_scan1.lsnr


1 Online Online Xifenfei stable


Ora. Mgmtlsnr


1 Online online Xifenfei 169.254.196.108 10.1


0.30.22,stable


Ora.asm


1 Online Online Xifenfei started,stable


2 OFFLINE OFFLINE Stable


3 OFFLINE OFFLINE Stable


Ora.cdb.db


1 Online Online Xifenfei open,stable


Ora.cvu


1 Online Online Xifenfei stable


Ora.oc4j


1 Online Online Xifenfei stable


Ora.scan1.vip


1 Online Online Xifenfei stable


Ora.xifenfei.vip


1 Online Online Xifenfei stable


--------------------------------------------------------------------------------





[Root@xifenfei ~]# srvctl Remove Diskgroup-diskgroup Dg_sys


[Root@xifenfei ~]# crsctl status res-t


--------------------------------------------------------------------------------


Name Target statewww.111cn.net Server State Details


--------------------------------------------------------------------------------


Local Resources


--------------------------------------------------------------------------------


Ora. Asmnet1lsnr_asm.lsnr


Online Online Xifenfei Stable


Ora. Data.dg


Online Online Xifenfei Stable


Ora. Listener.lsnr


Online Online Xifenfei Stable


Ora. Sys_dg.dg


Online Online Xifenfei Stable


Ora.net1.network


Online Online Xifenfei Stable


Ora.ons


Online Online Xifenfei Stable


Ora.proxy_advm


ONLINE OFFLINE Xifenfei Stable


--------------------------------------------------------------------------------


Cluster Resources


--------------------------------------------------------------------------------


Ora. Listener_scan1.lsnr


1 Online Online Xifenfei stable


Ora. Mgmtlsnr


1 Online online Xifenfei 169.254.196.108 10.1


0.30.22,stable


Ora.asm


1 Online Online Xifenfei started,stable


2 OFFLINE OFFLINE Stable


3 OFFLINE OFFLINE Stable


Ora.cdb.db


1 Online Online Xifenfei open,stable


Ora.cvu


1 Online Online Xifenfei stable


Ora.oc4j


1 Online Online Xifenfei stable


Ora.scan1.vip


1 Online Online Xifenfei stable


Ora.xifenfei.vip


1 Online Online Xifenfei stable


--------------------------------------------------------------------------------

The disk group where the ocr/votedisk/asm SPFile is modified is complete because the library is a single node RAC, and if the RAC of two or more nodes can be implemented without stopping (restart the node). The process is exactly the same as the 11.2 RAC, There's been no change.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.