Oracle 11.2 RAC Series-Installing new hosts, identifying old storage-A-ID ASM disk

Source: Internet
Author: User
Tags oracle database

In some scenarios, if there are problems with the host in the RAC environment, such as hardware failure, we need to store the startup database as soon as possible, and restore the business, then we need to migrate the previous RAC environment to the new host environment, I tested 11.2 and 12.1 of RAC, the recovery process is very fast, basically is the process of installing software, if the real scenario to restore business, there are two ways:
1, follow my method to reinstall the host, restore the RAC and the database
2, if a backup of the operating system was previously available (for example, Nbu back up the OS), use NBU Restore directly
.
What I'm testing here is Method 1, reinstall 11204 of GI (Grid infrastructure) and Oracle RDBMS software, and then identify old storage.
Test environment: Single node RAC, operating system is OEL Linux 6.6, database version is 11.2.0.4

First, because the store is using 11204 ASM, the test process installs only 11204 of the GI (Grid infrastructure) software, without oui configuring GI.


[Root@lunar5 ~]#/u01/app/orainventory/orainstroot.sh


changing permissions of/u01/app/orainventory.


Adding Read,write permissions for group.


Removing Read,write,execute permissions for the world.





Changing groupname of/u01/app/orainventory to Oinstall.


The execution of the script is complete.


[Root@lunar5 ~]#


Executive root.sh:


[Root@lunar5 ~]#/u01/app/11.2.0.4/grid/root.sh


Performing root user operation for Oracle 11g





The following environment variables are set as:


oracle_owner= Grid


Oracle_home=/u01/app/11.2.0.4/grid





Enter the full pathname to the local bin directory: [/usr/local/bin]:


The contents of "Dbhome" have not changed. No need to overwrite.


The contents of "oraenv" have not changed. No need to overwrite.


The contents of "coraenv" have not changed. No need to overwrite.








Creating/etc/oratab file ...


Entries'll be added to The/etc/oratab file as needed by


Database Configuration Assistant When a database is created


Finished running generic part of root script.


Now product-specific root actions would be performed.





Using configuration parameter file:/u01/app/11.2.0.4/grid/crs/install/crsconfig_params


Creating Trace Directory


User ignored prerequisites during installation


Installing Trace File Analyzer


OLR initialization-successful


Root Wallet


Root Wallet Cert


Root cert Export


Peer Wallet


Profile Reader Wallet


PA Wallet


Peer wallet Keys


PA Wallet Keys


Peer Cert request


PA cert Request


Peer cert


PA cert


Peer Root cert TP


Profile Reader Root cert TP


PA Root Cert TP


Peer PA cert TP


PA Peer Cert TP


Profile Reader PA cert TP


Profile Reader Peer cert TP


Peer User Cert


PA User Cert


Adding Clusterware entries to upstart


Crs-2672:attempting to start ' ora.mdnsd ' in ' LUNAR5 '


Crs-2676:start of ' ora.mdnsd ' on ' LUNAR5 ' succeeded


Crs-2672:attempting to start ' ora.gpnpd ' in ' LUNAR5 '


Crs-2676:start of ' ora.gpnpd ' on ' LUNAR5 ' succeeded


Crs-2672:attempting to start ' ora.cssdmonitor ' in ' LUNAR5 '


Crs-2672:attempting to start ' ora.gipcd ' in ' LUNAR5 '


Crs-2676:start of ' ora.cssdmonitor ' on ' LUNAR5 ' succeeded


Crs-2676:start of ' ora.gipcd ' on ' LUNAR5 ' succeeded


Crs-2672:attempting to start ' ora.cssd ' in ' LUNAR5 '


Crs-2672:attempting to start ' Ora.diskmon ' in ' LUNAR5 '


Crs-2676:start of ' Ora.diskmon ' on ' LUNAR5 ' succeeded


Crs-2676:start of ' ora.cssd ' on ' LUNAR5 ' succeeded





ASM created and started successfully.





Disk Group TEMPDG created successfully.





CLSCFG:-install Mode specified


Successfully accumulated necessary OCR keys.


Creating OCR keys for user ' root ', privgrp ' root '.


Operation successful.


Crs-4256:updating the profile


Successful addition of voting disk 381226346C054F62BF5F219EE16D7E25.


Successfully replaced voting disk group with +TEMPDG.


Crs-4256:updating the profile


crs-4266:voting file (s) successfully replaced


# # state File Universal Id file Name Disk Group


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


1. ONLINE 381226346c054f62bf5f219ee16d7e25 (/dev/asm-diski) [TEMPDG]


Located 1 voting disk (s).


Crs-2672:attempting to start ' ora.asm ' in ' LUNAR5 '


Crs-2676:start of ' ora.asm ' on ' LUNAR5 ' succeeded


crs-2672:attempting to start ' Ora. Tempdg.dg ' on ' LUNAR5 '


Crs-2676:start of ' Ora. Tempdg.dg ' on ' LUNAR5 ' succeeded


Configure Oracle Grid Infrastructure for a Cluster ... succeeded


[Root@lunar5 ~]#


The corresponding checkpoint file content:


[Root@lunar5 ~]# Ll/u01/app/grid/clusterware/ckptgridha_lunar5.xml


-rw-r--r--1 grid oinstall 4176 Feb 19:31/u01/app/grid/clusterware/ckptgridha_lunar5.xml


[Root@lunar5 ~]#


[Root@lunar5 ~]# Tail/u01/app/grid/clusterware/ckptgridha_lunar5.xml


<checkpoint level= "MAJOR" name= "Rootcrs_osdsetup" desc= "Rootcrs_osdsetup" state= "SUCCESS"/>


<checkpoint level= "MAJOR" name= "Rootcrs_onetime" desc= "Rootcrs_onetime" state= "SUCCESS"/>


<checkpoint level= "MAJOR" name= "ROOTCRS_OLR" desc= "ROOTCRS_OLR" state= "SUCCESS"/>


<checkpoint level= "MAJOR" name= "Rootcrs_gpnpsetup" desc= "Rootcrs_gpnpsetup" state= "SUCCESS"/>


<checkpoint level= "MAJOR" name= "ROOTCRS_OHASD" desc= "ROOTCRS_OHASD" state= "SUCCESS"/>


<checkpoint level= "MAJOR" name= "Rootcrs_initres" desc= "Rootcrs_initres" state= "SUCCESS"/>


<checkpoint level= "MAJOR" name= "Rootcrs_acfsinst" desc= "Rootcrs_acfsinst" state= "SUCCESS"/>


<checkpoint level= "MAJOR" name= "rootcrs_bootcfg" desc= "rootcrs_bootcfg" state= "SUCCESS"/>


<checkpoint level= "MAJOR" name= "Rootcrs_nodeconfig" desc= "Rootcrs_nodeconfig" state= "SUCCESS"/>


</CHECKPOINTS>


[Root@lunar5 ~]#


See here "desc=" Rootcrs_nodeconfig "state=" SUCCESS "means GI has been configured to complete.


Graphical interface Click OK, continue to perform the remaining configuration, after the configuration is complete, check the checkpoint file again:


[Root@lunar5 ~]# Ll/u01/app/grid/clusterware/ckptgridha_lunar5.xml


-rw-r--r--1 grid oinstall 4176 Feb 19:31/u01/app/grid/clusterware/ckptgridha_lunar5.xml


[Root@lunar5 ~]# cd/u01/app/grid/clusterware/


[Root@lunar5 clusterware]# LL


Total 8


-rw-r--r--1 grid oinstall 4176 Feb 19:31


[Root@lunar5 clusterware]#


See here, the date of the checkpoint file has not changed, explain checkpoint file is the implementation of root.sh when only useful, that is, this process is 11.2 in order to facilitate the customer, increased root.sh after the failure to continue to configure the second design, very thoughtful function. In 12.2, this feature is more convenient, he will just tell you the current configuration of the checkpoint, if some of the steps fail, Oracle will automatically clean up the old configuration, so that you can fail to install after the installation does not need to reinstall, but to correct the error after continuing configuration, similar to the meaning of "breakpoint continuation."


.


For example, the following is the process of performing root.sh when RAC is installed on 12.2beta:


[Root@lunar1 ~]#/stage/root.sh


Performing root user operation.





The following environment variables are set as:


oracle_owner= Grid


Oracle_home=/stage





Enter the full pathname to the local bin directory: [/usr/local/bin]:


The contents of "Dbhome" have not changed. No need to overwrite.


The contents of "oraenv" have not changed. No need to overwrite.


The contents of "coraenv" have not changed. No need to overwrite.





Entries'll be added to The/etc/oratab file as needed by


Database Configuration Assistant When a database is created


Finished running generic part of root script.


Now product-specific root actions would be performed.


Relinking Oracle with RAC_ON option





Using configuration parameter file:/stage/crs/install/crsconfig_params


The log of current session can is found at:


/u01/app/grid/crsdata/lunar1/crsconfig/rootcrs_lunar1_2016-01-24_12-44-34am.log


2016/01/24 12:44:34 clsrsc-46:error: '/stage/crs/install/parentdirperm_lunar1.txt ' does not exist





2016/01/24 12:44:34 clsrsc-46:error: '/stage/crs/install/parentdirperm_lunar1.txt ' does not exist





2016/01/24 12:44:35 clsrsc-594:executing Installation Step 1: ' SETUPTFA '.





2016/01/24 12:44:35 clsrsc-4001:installing Oracle Trace File Analyzer (TFA) Collector.





2016/01/24 12:44:35 clsrsc-4002:successfully installed Oracle Trace File Analyzer (TFA) Collector.





2016/01/24 12:44:35 clsrsc-594:executing Installation Step 2: ' validateenv '.





2016/01/24 12:44:37 Clsrsc-363:user ignored prerequisites during





2016/01/24 12:44:37 clsrsc-594:executing Installation Step 3: ' Checkfirstnode '.





2016/01/24 12:44:38 clsrsc-594:executing Installation step 4: ' Gensiteguids '.





2016/01/24 12:44:39 clsrsc-594:executing Installation Step 5: ' Saveparamfile '.





2016/01/24 12:44:40 clsrsc-594:executing Installation Step 6: ' Setuposd '.





2016/01/24 12:44:41 clsrsc-594:executing Installation Step 7: ' Checkcrsconfig '.





2016/01/24 12:44:41 clsrsc-594:executing Installation Step 8: ' Setuplocalgpnp '.





2016/01/24 12:44:42 clsrsc-594:executing Installation Step 9: ' CONFIGOLR '.





2016/01/24 12:44:43 clsrsc-594:executing installation step: ' Configchmos '.





2016/01/24 12:45:30 clsrsc-594:executing installation step: ' CREATEOHASD '.





2016/01/24 12:45:31 clsrsc-594:executing installation step: ' CONFIGOHASD '.





2016/01/24 12:45:46 clsrsc-330:adding clusterware entries to file ' Oracle-ohasd.service '





2016/01/24 12:46:08 clsrsc-594:executing installation step: ' INSTALLAFD '.





2016/01/24 12:46:11 clsrsc-594:executing installation step: ' Installacfs '.





2016/01/24 12:46:11 clsrsc-594:executing installation step: ' Installka '.





2016/01/24 12:46:14 clsrsc-594:executing installation step: ' Initconfig '.





crs-2791:starting shutdown of Oracle high availability services-managed the ' lunar1 '


Crs-2673:attempting to stop ' ora.mdnsd ' on ' lunar1 '


Crs-2673:attempting to stop ' ora.gpnpd ' on ' lunar1 '


Crs-2677:stop of ' ora.mdnsd ' on ' lunar1 ' succeeded


Crs-2677:stop of ' ora.gpnpd ' on ' lunar1 ' succeeded


Crs-2673:attempting to stop ' ora.evmd ' on ' lunar1 '


Crs-2677:stop of ' ora.evmd ' on ' lunar1 ' succeeded


Crs-2673:attempting to stop ' ora.gipcd ' on ' lunar1 '


Crs-2677:stop of ' ora.gipcd ' on ' lunar1 ' succeeded


Crs-2793:shutdown of Oracle High availability services-managed resources on ' lunar1 ' has completed


Crs-4133:oracle High Availability Services has been stopped.


2016/01/24 12:46:23 clsrsc-594:executing installation step: ' Startcluster '.





Crs-4123:starting Oracle High Availability services-managed


Crs-2672:attempting to start ' ora.mdnsd ' in ' lunar1 '


Crs-2672:attempting to start ' ora.evmd ' in ' lunar1 '


Crs-2676:start of ' ora.mdnsd ' on ' lunar1 ' succeeded


Crs-2676:start of ' ora.evmd ' on ' lunar1 ' succeeded


Crs-2672:attempting to start ' ora.gpnpd ' in ' lunar1 '


Crs-2676:start of ' ora.gpnpd ' on ' lunar1 ' succeeded


Crs-2672:attempting to start ' ora.gipcd ' in ' lunar1 '


Crs-2676:start of ' ora.gipcd ' on ' lunar1 ' succeeded


Crs-2672:attempting to start ' ora.cssdmonitor ' in ' lunar1 '


Crs-2676:start of ' ora.cssdmonitor ' on ' lunar1 ' succeeded


Crs-2672:attempting to start ' ora.cssd ' in ' lunar1 '


Crs-2672:attempting to start ' Ora.diskmon ' in ' lunar1 '


Crs-2676:start of ' Ora.diskmon ' on ' lunar1 ' succeeded


Crs-2676:start of ' ora.cssd ' on ' lunar1 ' succeeded


Crs-2672:attempting to start ' ora.cluster_interconnect.haip ' in ' lunar1 '


Crs-2672:attempting to start ' ora.ctssd ' in ' lunar1 '


Crs-2676:start of ' ora.ctssd ' on ' lunar1 ' succeeded


Crs-2676:start of ' ora.cluster_interconnect.haip ' on ' lunar1 ' succeeded


Crs-2672:attempting to start ' ora.asm ' in ' lunar1 '


Crs-2676:start of ' ora.asm ' on ' lunar1 ' succeeded


Crs-2672:attempting to start ' ora.storage ' in ' lunar1 '


Crs-2676:start of ' ora.storage ' on ' lunar1 ' succeeded


Crs-2672:attempting to start ' ORA.CRF ' in ' lunar1 '


Crs-2676:start of ' ORA.CRF ' on ' lunar1 ' succeeded


Crs-2672:attempting to start ' ora.crsd ' in ' lunar1 '


Crs-2676:start of ' ora.crsd ' on ' lunar1 ' succeeded


Crs-6023:starting Oracle Cluster Ready services-managed Resources


crs-6017:processing Resource Auto-start for SERVERS:LUNAR1


Crs-6016:resource Auto-start has completed for server lunar1


crs-6024:completed start of Oracle Cluster Ready services-managed Resources


Crs-4123:oracle High Availability Services has been started.


2016/01/24 12:47:34 clsrsc-343:successfully started Oracle clusterware stack





2016/01/24 12:47:34 clsrsc-594:executing installation step: ' Confignode '.





crs-2672:attempting to start ' Ora. Asmnet1lsnr_asm.lsnr ' on ' lunar1 '


Crs-2676:start of ' Ora. Asmnet1lsnr_asm.lsnr ' on ' lunar1 ' succeeded


Crs-2672:attempting to start ' ora.asm ' in ' lunar1 '


Crs-2676:start of ' ora.asm ' on ' lunar1 ' succeeded


crs-2672:attempting to start ' Ora. Crsdg.dg ' on ' lunar1 '


Crs-2676:start of ' Ora. Crsdg.dg ' on ' lunar1 ' succeeded


2016/01/24 12:48:43 clsrsc-594:executing installation step: ' Postconfig '.





2016/01/24 12:49:04 clsrsc-325:configure Oracle Grid infrastructure for a Cluster ... succeeded





[Root@lunar1 ~]#


As you can see, this process is clearer than the 12.2-prior RAC execution root.sh hints.


Okay, back to our environment, keep checking the old ASM disk Group


[Grid@lunar5 ~]$ kfod disks=all ds=true cluster=true


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


Disk Size Header Path Disk Group User Group


================================================================================


1:512 Mb member/dev/asm-diskb DATADG1 grid asmadmin


2:512 Mb MEMBER/DEV/ASM-DISKC DATADG1 grid asmadmin


3:512 Mb member/dev/asm-diskd DATADG1 grid asmadmin


4:1024 Mb Member/dev/asm-diske crsdg grid asmadmin


5:1024 Mb MEMBER/DEV/ASM-DISKF crsdg grid asmadmin


6:1024 Mb member/dev/asm-diskg crsdg grid asmadmin


7:5120 Mb member/dev/asm-diskh DATADG2 grid asmadmin


8:3072 Mb Member/dev/asm-diski tempdg grid asmadmin


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


Oracle_sid Oracle_home host_name


================================================================================


+asm1/u01/app/11.2.0.4/grid LUNAR5


[Grid@lunar5 ~]$


Add the above disk groups to the ASM Startup Disk Group list:


[GRID@LUNAR5 ~]$ SS





Sql*plus:release 11.2.0.4.0 Production on Mon Feb 15 21:31:29 2016





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








Connected to:


Oracle Database 11g Enterprise Edition release 11.2.0.4.0-64bit Production


With the real application clusters and Automatic Storage Management options





Sql> Show parameter asm





NAME TYPE VALUE


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


Asm_diskgroups string


Asm_diskstring string/dev/asm*


Asm_power_limit Integer 1


Asm_preferred_read_failure_groups string


Sql> alter system set asm_diskgroups= ' TEMPDG ', ' crsdg ', ' DATADG1 ', ' DATADG2 ' scope=both;





System altered.





Sql>


After you mount and dismount the newly added disk groups, the disk groups are automatically added to OCR:


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


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


NAME TARGET State SERVER State_details


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


Local Resources


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


Ora. Crsdg.dg


Online online LUNAR5


Ora. Datadg1.dg


Online online LUNAR5


Ora. Datadg2.dg


Online online LUNAR5


Ora. Listener.lsnr


Online online LUNAR5


Ora. Tempdg.dg


Online online LUNAR5


Ora.asm


Online online LUNAR5 started


Ora.gsd


OFFLINE OFFLINE LUNAR5


Ora.net1.network


Online online LUNAR5


Ora.ons


Online online LUNAR5


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


Cluster Resources


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


Ora. Listener_scan1.lsnr


1 Online Online LUNAR5


Ora.cvu


1 Online Online LUNAR5


Ora.lunar5.vip


1 Online Online LUNAR5


Ora.oc4j


1 Online Online LUNAR5


Ora.scan1.vip


1 Online Online LUNAR5


[Root@lunar5 ~]#


Check the contents of the ASM Disk group (for example, which databases are included) because ASM is OMF, so in most cases, the directory structure of the disk group shows you what databases and other related information were previously included in this store:


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 NORMAL N 512 4096 1048576 3072 2769 1024 872 0 N crsdg/


Mounted NORMAL N 512 4096 1048576 1536 1251 512 369 0 N datadg1/


Mounted EXTERN N 512 4096 1048576 5120 3386 0 3386 0 N datadg2/


Mounted EXTERN N 512 4096 1048576 3072 2719 0 2719 0 Y tempdg/


Asmcmd> CD +CRSDG


Asmcmd> ls


Asmcmd> CD +DATADG1


Asmcmd> ls


Asmcmd> CD +DATADG2


Asmcmd> ls


lunar/


Asmcmd>


See here, the store contains a database, CRSDG information has been deleted by me, so there is no old OCR and voting disk file


Now that you have determined that only the data is on the DATADG2, you can reorganize the disk groups to make the most of the space (I'm going to do a lot of other tests with this VM later):


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 NORMAL N 512 4096 4194304 1536 1296 512 392 0 N datadg1/


Mounted EXTERN N 512 4096 1048576 5120 3386 0 3386 0 N datadg2/


Mounted EXTERN N 512 4096 1048576 3072 3016 0 3016 0 N datadg3/


Mounted EXTERN N 512 4096 1048576 3072 2719 0 2719 0 Y tempdg/


Asmcmd>


Use Kfod to view:


[Grid@lunar5 ~]$ kfod disks=all ds=true cluster=true


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


Disk Size Header Path Disk Group User Group


================================================================================


1:512 Mb member/dev/asm-diskb DATADG1 grid asmadmin


2:512 Mb MEMBER/DEV/ASM-DISKC DATADG1 grid asmadmin


3:512 Mb member/dev/asm-diskd DATADG1 grid asmadmin


4:1024 Mb Member/dev/asm-diske DATADG3 grid asmadmin


5:1024 Mb MEMBER/DEV/ASM-DISKF DATADG3 grid asmadmin


6:1024 Mb member/dev/asm-diskg DATADG3 grid asmadmin


7:5120 Mb member/dev/asm-diskh DATADG2 grid asmadmin


8:3072 Mb Member/dev/asm-diski tempdg grid asmadmin


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


Oracle_sid Oracle_home host_name


================================================================================


+asm1/u01/app/11.2.0.4/grid LUNAR5


[Grid@lunar5 ~]$


Verify that the current CRS status is normal:


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


——————————————————————————–


NAME TARGET State SERVER State_details


——————————————————————————–


Local Resources


——————————————————————————–


Ora. Datadg1.dg


Online online LUNAR5


Ora. Datadg2.dg


Online online LUNAR5


Ora. Datadg3.dg


Online online LUNAR5


Ora. Listener.lsnr


Online online LUNAR5


Ora. Tempdg.dg


Online online LUNAR5


Ora.asm


Online online LUNAR5 started


Ora.gsd


OFFLINE OFFLINE LUNAR5


Ora.net1.network


Online online LUNAR5


Ora.ons


Online online LUNAR5


——————————————————————————–


Cluster Resources


——————————————————————————–


Ora. Listener_scan1.lsnr


1 Online Online LUNAR5


Ora.cvu


1 Online Online LUNAR5


Ora.lunar5.vip


1 Online Online LUNAR5


Ora.oc4j


1 Online Online LUNAR5


Ora.scan1.vip


1 Online Online LUNAR5


[Root@lunar5 ~]#


The ASM disk groups that are stored at this point are already recognized on the new host.

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.