The steps are as follows (since testing in 12.1 first and then in 112), so the test here records some of the problems and methods found, and 11.2 of the simulation host damage, directly using the experience here, so there is no error information:
1, install 12.1.0.2 GI software, apply the latest PSU if necessary, and view disk and disk groups:
[Grid@lunarrac ~]$ kfod disks=all ds=true cluster=true
--------------------------------------------------------------------------------
Disk Size Header Path Disk Group User Group
================================================================================
1:2047 Mb member/dev/asm-diskb crsdg grid asmadmin
2:2047 Mb MEMBER/DEV/ASM-DISKC crsdg grid asmadmin
3:2047 Mb member/dev/asm-diskd crsdg grid asmadmin
4:2048 Mb Member/dev/asm-diske DATADG grid asmadmin
5:2048 Mb MEMBER/DEV/ASM-DISKF DATADG grid asmadmin
6:2048 Mb member/dev/asm-diskg DATADG grid asmadmin
7:3072 Mb member/dev/asm-diskh DATADG2 grid asmadmin
8:10240 Mb Member/dev/asm-diski DATADG2 grid asmadmin
--------------------------------------------------------------------------------
Oracle_sid Oracle_home host_name
================================================================================
+asm1/u01/app/12.1.0.2/grid Lunarrac
[Grid@lunarrac ~]$
Create an ASM SPFile
[Grid@lunarrac ~]$ SS
Sql*plus:release 12.1.0.2.0 Production on Sun Feb 14 19:08:33 2016
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> create pfile= '/tmp/asm.pfile ' from SPFile;
File created.
Sql>
Add disk group ' CRSDG ', ' DATADG ', ' DATADG2 '
1
Sql> alter system set asm_diskgroups= ' CRSDG ', ' DATADG ', ' DATADG2 ' scope=both;
System altered.
Sql>
Find SPFile:
Sys@+asm1>select F.group_number, F.file_number, a.name name, F.type type
2 from V$asm_file F, v$asm_alias a
3 WHERE F.group_number=a.group_number and F.file_number=a.file_number
4 and f.type= ' Parameterfile '
5 ORDER by 1, 2;
Group_number File_number NAME TYPE
---------------- ---------------- ------------------------------------------------------- ------------------------ -
1 268 spfile.268.903782013 Parameterfile
2 273 spfile.273.892298577 Parameterfile
elapsed:00:00:00.16
Sys@+asm1>
Here we see two spfile, which one is what we need?
Or if there are multiple databases on this store, how can you determine which database is using which spfle?
We know that ASM internally uses OMF to manage data files, so its naming rules are:
Therefore, according to Dbuniquename, we can determine which database is using which spfile.
+group/db_unique_name/file_type/file_type_tag.file#.incarnation#
File types are datafile, controlfile, Onlinelog, etc.
Asmcmd> ls-l
Type redund striped Time Sys Name
Parameterfile Unprot Coarse DEC 10:00:00 Y spfile.273.892298577
asmcmd> pwd
+datadg2/lunar/parameterfile
Asmcmd>
We copy spifle from ASM to the file system and see if the information is correct:
asmcmd> CP spfile.273.892298577/tmp/spfile.273.892298577
Copying +datadg2/lunar/parameterfile/spfile.273.892298577->/tmp/spfile.273.892298577
Asmcmd> ls-l
Type redund striped Time Sys Name
Parameterfile Unprot Coarse FEB 20:00:00 Y spfile.273.892298577
Asmcmd>
View SPFile
[Grid@lunarrac ~]$ strings/tmp/spfile.273.892298577
Lunar1.__oracle_base= '/u01/app/oracle ' #ORACLE_BASE set from environment
Lunar2.__oracle_base= '/u01/app/oracle ' #ORACLE_BASE set from environment
*._gc_policy_time=0
*._gc_undo_affinity=false
*._index_partition_large_extents= ' FALSE '
*._optimizer_adaptive_cursor_sharing=false
*._optimizer_extended_cursor_sharing= ' NONE '
*._optimizer_extended_cursor_sharing_rel= ' NONE '
*._optimizer_null_aware_antijoin=false
*._optimizer_use_feedback=false
*._partition_large_extents= ' FALSE '
*._px_use_large_
Pool=true
*._undo_autotune=false
*.audit_file_dest= '/u01/app/oracle/admin/lunar/adump '
*.audit_trail= ' NONE '
*.cluster_database=true
*.compatible= ' 12.1.0.2.0 '
*.control_files= ' +datadg2/lunar/controlfile/current.257.892295167 ', ' +datadg2/lunar/controlfile/ current.258.892295171 '
*.db_block_size=8192
*.db_cache_size=52428800
*.db_create_file_dest= ' +DATADG2 '
*.db_domain= '
*.db_name= ' Lunar '
*.db_recovery_file_dest= ' +DATADG2 '
*.db_recovery_file_dest_size=5565m
*.db_writer_processes=2
*.defe
Rred_segment_creation=false
*.diagnostic_dest= '/u01/app/oracle '
*.dispatchers= ' (protocol=tcp) (SERVICE=LUNARXDB) '
*.event= ' 28401 Trace name context forever,level 1 ', ' 10949 trace name context Forever,level 1 '
lunar2.instance_number=2
Lunar1.instance_number=1
*.java_pool_size=52428800
*.job_queue_processes=5
*.large_pool_size=10485760
*.log_archive_format= '%t_%s_%r.dbf '
*.log_buffer=10305536
*.memory_target=0
*.open_cursors=300
*.parallel_force_local=true
*.parallel_max_servers=30
*.pa
Rallel_min_servers=30
*.parallel_servers_target=30
*.pga_aggregate_limit=629145600
*.pga_aggregate_target=360m
*.processes=150
*.remote_login_passwordfile= ' Exclusive '
*.resource_limit=true
*.resource_manager_plan= '
*.session_cached_cursors=30
*.sga_target=0
*.shared_pool_size=419430400
lunar2.thread=2
Lunar1.thread=1
Lunar2.undo_tablespace= ' UNDOTBS2 '
Lunar1.undo_tablespace= ' UNDOTBS1 '
[Grid@lunarrac ~]$
At this point, the startup is the database will error:
[Oracle@lunarrac ~]$ SS
Sql*plus:release 12.1.0.2.0 Production on Sun Feb 14 21:05:13 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to a idle instance.
Sys@lunar1>startup
ORACLE instance started.
Total System Global area 557842432 bytes
Fixed Size 2926520 bytes
Variable Size 486541384 bytes
Database buffers 54525952 bytes
Redo buffers 13848576 bytes
Ora-00205:error in identifying control file, check alert log for more info
Sys@lunar1>
The error in alert is as follows:
Oracle_base from environment =/u01/app/oracle
Sun Feb 14 21:11:42 2016
ALTER DATABASE MOUNT
Sun Feb 14 21:11:42 2016
This is instance was the Mount
Sun Feb 14 21:11:42 2016
NOTE:ASMB Mounting Group 2 (DATADG2)
Sun Feb 14 21:11:42 2016
Ora-15025:could not open Disk "/dev/asm-diskh"
Ora-27041:unable to open File
Linux-x86_64 Error:13:permission denied
Additional Information:9
Sun Feb 14 21:11:42 2016
Ora-15025:could not open Disk "/dev/asm-diski"
Ora-27041:unable to open File
Linux-x86_64 Error:13:permission denied
Additional Information:9
Note:disk 0 in Group 2 could is not opened.
warning:failed to complete Group 2
Warning:group 2 is being dismounted.
WARNING:ASMB Force dismounting Group 2 (DATADG2) due to failed mount
Success:diskgroup DATADG2 was dismounted
NOTE:ASMB Mounting Group 2 (DATADG2)
Sun Feb 14 21:11:43 2016
Ora-15025:could not open Disk "/dev/asm-diskh"
Ora-27041:unable to open File
Linux-x86_64 Error:13:permission denied
Additional Information:9
Ora-15040:diskgroup is incomplete
Ora-15040:diskgroup is incomplete
Sun Feb 14 21:11:43 2016
Ora-15025:could not open Disk "/dev/asm-diski"
Ora-27041:unable to open File
Linux-x86_64 Error:13:permission denied
Additional Information:9
Note:disk 0 in Group 2 could is not opened.
warning:failed to complete Group 2
Warning:group 2 is being dismounted.
WARNING:ASMB Force dismounting Group 2 (DATADG2) due to failed mount
Success:diskgroup DATADG2 was dismounted
Sun Feb 14 21:11:43 2016
Ora-00210:cannot Open the specified control file
Ora-00202:control file: ' +datadg2/lunar/controlfile/current.258.892295171 '
Ora-17503:ksfdopn:2 Failed to open file +datadg2/lunar/controlfile/current.258.892295171
Ora-15001:diskgroup "DATADG2" does not exist or isn't not mounted
Ora-15040:diskgroup is incomplete
Ora-00210:cannot Open the specified control file
Ora-00202:control file: ' +datadg2/lunar/controlfile/current.257.892295167 '
Ora-17503:ksfdopn:2 Failed to open file +datadg2/lunar/controlfile/current.257.892295167
Ora-15001:diskgroup "DATADG2" does not exist or isn't not mounted
Ora-15040:diskgroup is incomplete
ORA-205 signalled During:alter DATABASE MOUNT ...
Sun Feb 14 21:12:07 2016
Decreasing number of real time LMS from 1 to 0
According to the error message, Oracle permissions are required to modify because Oracle does not have access to the ASM disk group's permissions:
[Grid@lunarrac ~]$ $ORACLE _home/bin/setasmgidwrap o=/u01/app/oracle/product/12.1.0.2/dbhome_1/bin/oracle
[Grid@lunarrac ~]$ Ls-lrt/u01/app/oracle/product/12.1.0.2/dbhome_1/bin/oracle
-rwsr-s--x 1 Oracle asmadmin 323762276 Feb 18:15/u01/app/oracle/product/12.1.0.2/dbhome_1/bin/oracle
[Grid@lunarrac ~]$
Mount the database again, still error:
Sys@lunar1>alter database Mount;
ALTER DATABASE Mount
*
ERROR at line 1:
Ora-00205:error in identifying control file, check alert log for more info
elapsed:00:00:17.22
Sys@lunar1>
The error message is as follows:
ALTER DATABASE Mount
Sun Feb 14 21:18:10 2016
This is instance was the Mount
Process O000 died, and its trace file
Sun Feb 14 21:18:12 2016
NOTE:ASMB Mounting Group 2 (DATADG2)
Process O000 died, and its trace file
Sun Feb 14 21:18:16 2016
Ora-15025:could not open Disk "/dev/asm-diskh"
Ora-27041:unable to open File
Linux-x86_64 Error:13:permission denied
Additional Information:9
Ora-15040:diskgroup is incomplete
Ora-15040:diskgroup is incomplete
Sun Feb 14 21:18:19 2016
Ora-15025:could not open Disk "/dev/asm-diski"
Ora-27041:unable to open File
Linux-x86_64 Error:13:permission denied
Additional Information:9
Note:disk 0 in Group 2 could is not opened.
warning:failed to complete Group 2
Sun Feb 14 21:18:24 2016
Warning:group 2 is being dismounted.
WARNING:ASMB Force dismounting Group 2 (DATADG2) due to failed mount
Success:diskgroup DATADG2 was dismounted
NOTE:ASMB Mounting Group 2 (DATADG2)
Sun Feb 14 21:18:26 2016
Ora-15025:could not open Disk "/dev/asm-diskh"
Ora-27041:unable to open File
Linux-x86_64 Error:13:permission denied
Additional Information:9
Ora-15040:diskgroup is incomplete
Ora-15040:diskgroup is incomplete
Sun Feb 14 21:18:26 2016
Ora-15025:could not open Disk "/dev/asm-diski"
Ora-27041:unable to open File
Linux-x86_64 Error:13:permission denied
Additional Information:9
Note:disk 0 in Group 2 could is not opened.
warning:failed to complete Group 2
Warning:group 2 is being dismounted.
WARNING:ASMB Force dismounting Group 2 (DATADG2) due to failed mount
Success:diskgroup DATADG2 was dismounted
Sun Feb 14 21:18:26 2016
Ora-00210:cannot Open the specified control file
Ora-00202:control file: ' +datadg2/lunar/controlfile/current.258.892295171 '
Ora-17503:ksfdopn:2 Failed to open file +datadg2/lunar/controlfile/current.258.892295171
Ora-15001:diskgroup "DATADG2" does not exist or isn't not mounted
Ora-15040:diskgroup is incomplete
Ora-00210:cannot Open the specified control file
Ora-00202:control file: ' +datadg2/lunar/controlfile/current.257.892295167 '
Ora-17503:ksfdopn:2 Failed to open file +datadg2/lunar/controlfile/current.257.892295167
Ora-15001:diskgroup "DATADG2" does not exist or isn't not mounted
Ora-15040:diskgroup is incomplete
ORA-205 signalled During:alter database mount
...
Process m000 died, and its trace file
Process M001 died, and its trace file
Process m000 died, and its trace file
Process m000 died, and its trace file
Process M001 died, and its trace file
Process m000 died, and its trace file
The specific trace file is as follows:
Trace FILE/U01/APP/ORACLE/DIAG/RDBMS/LUNAR/LUNAR1/TRACE/LUNAR1_M000_14358.TRC
Oracle Database 12c Enterprise Edition release 12.1.0.2.0-64bit Production
With the partitioning, real application clusters, Automatic Storage Management, OLAP,
Advanced Analytics and real application testing options
Oracle_home =/u01/app/oracle/product/12.1.0.2/dbhome_1
System Name:linux
Node Name:lunarrac
Release:3.8.13-44.1.1.el6uek.x86_64
Version: #2 SMP Wed Sep 06:10:25 PDT 2014
Machine:x86_64
Instance name:lunar1
Redo thread mounted by this instance:0 <none>
Oracle Process number:0
Unix process pid:14358, Image:
2016-02-14 21:20:01.641
died during process startup with error 27140 (seq=94)
Opirip:uncaught error 27140. Error Stack:
Ora-27140:attach to post/wait facility failed
Ora-27300:os system dependent Operation:invalid_egid failed with status:1
Ora-27301:os failure Message:operation not permitted
Ora-27302:failure occurred at:skgpwinit6
ora-27303:additional Information:startup Egid = 6000 (oinstall), Current egid = 5000 (asmadmin)
~
As you can see here, you should be a database or you can't access a disk group, and the process of registering a disk group into OCR is as follows:
Sql> Alter DiskGroup DATADG Mount
Sun Feb 14 21:42:56 2016
Note:cache Registered Group DATADG 2/0x4ba26f20
Note:cache began mount (a) group DATADG 2/0x4ba26f20
Note:assigning number (2,1) to disk (/DEV/ASM-DISKF)
Note:assigning number (2,2) to disk (/DEV/ASM-DISKG)
Note:assigning number (2,0) to disk (/dev/asm-diske)
Sun Feb 14 21:43:02 2016
Note:gmon heartbeating for GRP 2 (DATADG)
Gmon querying group 2 at the for PID Osid 19564
Sun Feb 14 21:43:02 2016
Note:cache is mounting group DATADG created on 2015/10/05 07:49:39
Note:cache Opening Disk 0 of GRP 2:datadg_0000 Path:/dev/asm-diske
NOTE:02/14/16 21:43:02 DATADG. F1x0 found on Disk 0 au FCN 0.0 datfmt 1
Note:cache opening disk 1 of GRP 2:datadg_0001 PATH:/DEV/ASM-DISKF
NOTE:02/14/16 21:43:02 DATADG. F1x0 found on disk 1 au FCN 0.0 datfmt 1
Note:cache opening disk 2 of GRP 2:datadg_0002 PATH:/DEV/ASM-DISKG
NOTE:02/14/16 21:43:02 DATADG. F1x0 found on disk 2 au FCN 0.0 datfmt 1
Sun Feb 14 21:43:02 2016
Note:cache mounting (a) normal redundancy group 2/0x4ba26f20 (DATADG)
Sun Feb 14 21:43:02 2016
* Allocate domain 2, invalid = TRUE
Sun Feb 14 21:43:03 2016
note:attached to recovery domain 2
Sun Feb 14 21:43:03 2016
* Validated domain 2, flags = 0x0
Note:cache recovered group 2 to FCN 0.73
Note:redo buffer size is 256 blocks (1056768 bytes)
Sun Feb 14 21:43:03 2016
NOTE:LGWR attempting to mount thread 1 for DiskGroup 2 (DATADG)
NOTE:LGWR found thread 1 closed at ABA 11.22 Lock domain=0 inc#=0
NOTE:LGWR mounted Thread 1 for DiskGroup 2 (DATADG)
Sun Feb 14 21:43:03 2016
NOTE:LGWR opened thread 1 (DATADG) at FCN 0.73 ABA 12.23 lock domain=2 inc#=2 instnum=1 gx.incarn=1268936480 mntstmp=2016 /02/14 21:43:03.557000
Sun Feb 14 21:43:03 2016
Note:cache Mounting Group 2/0x4ba26f20 (DATADG) succeeded
Note:cache ending Mount (success) of group DATADG number=2 Incarn=0x4ba26f20
Sun Feb 14 21:43:03 2016
Note:instance updated compatible.asm to 12.1.0.0.0 for GRP 2
Sun Feb 14 21:43:03 2016
Success:diskgroup DATADG was mounted
Sun Feb 14 21:43:03 2016
Success:alter DiskGroup DATADG Mount
Sun Feb 14 21:43:04 2016
Note:diskgroup resource Ora. DATADG.DG is online
Warning:unknown State for DiskGroup resource Ora. DATADG.DG, return Value:3
See again, these disk groups are already included in OCR
[Root@lunarrac ~]# crsctl status res-t
--------------------------------------------------------------------------------
Name Target State Server Details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
Ora. Crsdg.dg
Online Online Lunarrac Stable
Ora. Datadg.dg
Online Online Lunarrac Stable
Ora. Datadg2.dg
Online Online Lunarrac Stable
Ora. Listener.lsnr
Online Online Lunarrac Stable
Ora.asm
Online online Lunarrac started,stable
Ora.net1.network
Online Online Lunarrac Stable
Ora.ons
Online Online Lunarrac Stable
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
Ora. Listener_scan1.lsnr
1 Online Online Lunarrac stable
Ora. Mgmtlsnr
1 Online online Lunarrac 169.254.52.98 192.16
8.60.56,stable
Ora.cvu
1 Online Online Lunarrac stable
Ora.lunarrac.vip
1 Online Online Lunarrac stable
Ora.mgmtdb
1 OFFLINE OFFLINE Stable
Ora.oc4j
1 Online Online Lunarrac stable
Ora.scan1.vip
1 Online Online Lunarrac stable
--------------------------------------------------------------------------------
[Root@lunarrac ~]#
To register a database in OCR:
If you follow the 11.2 metabase command in 12.1, the database can be started, but you can find that the configuration information is problematic:
For example, "Database Name:lunarrac" here shows that Lunarrac is my hostname, and that the name is lunar, so using the 112 command to register the database to OCR has other unknown problems
It is recommended that, in different versions, registration be based on different versions of the command.
[Oracle@lunarrac ~]$ srvctl add database-d lunar-n lunarrac-o $ORACLE _home-p +datadg2/lunar/parameterfile/spfile.273.8 92298577-s open-y automatic-a "crsdg,datadg,datadg2"-t IMMEDIATE
[Oracle@lunarrac ~]$ srvctl config database-d lunar
Database Unique Name:lunar
Database Name:lunarrac
Oracle Home:/u01/app/oracle/product/12.1.0.2/dbhome_1
Oracle user:oracle
Spfile: +datadg2/lunar/parameterfile/spfile.273.892298577
Password file:
Domain:
Start Options:open
Stop options:immediate
Database role:primary
Management policy:automatic
Server Pools:
Disk GROUPS:CRSDG,DATADG,DATADG2
Mount Point paths:
Services:
Type:rac
Start Concurrency:
Stop Concurrency:
OSDBA GROUP:DBA
Osoper Group:oinstall
Database instances:
Configured nodes:
Database is administrator managed
[Oracle@lunarrac ~]$
Check the CRS status and the database is registered:
[Root@lunarrac ~]# crsctl status res-t
--------------------------------------------------------------------------------
Name Target State Server Details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
Ora. Crsdg.dg
Online Online Lunarrac Stable
Ora. Datadg.dg
Online Online Lunarrac Stable
Ora. Datadg2.dg
Online Online Lunarrac Stable
Ora. Listener.lsnr
Online Online Lunarrac Stable
Ora.asm
Online online Lunarrac started,stable
Ora.net1.network
Online Online Lunarrac Stable
Ora.ons
Online Online Lunarrac Stable
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
Ora. Listener_scan1.lsnr
1 Online Online Lunarrac stable
Ora. Mgmtlsnr
1 Online online Lunarrac 169.254.52.98 192.16
8.60.56,stable
Ora.cvu
1 Online Online Lunarrac stable
Ora.lunar.db
1 OFFLINE OFFLINE Stable
Ora.lunarrac.vip
1 Online Online Lunarrac stable
Ora.mgmtdb
1 OFFLINE OFFLINE Stable
Ora.oc4j
1 Online Online Lunarrac stable
Ora.scan1.vip
1 Online Online Lunarrac stable
--------------------------------------------------------------------------------
[Root@lunarrac ~]#
To start a database:
[Oracle@lunarrac ~]$ srvctl start database-d Lunar
[Oracle@lunarrac ~]$
.
[Root@lunarrac ~]# crsctl status res-t
--------------------------------------------------------------------------------
Name Target State Server Details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
Ora. Crsdg.dg
Online Online Lunarrac Stable
Ora. Datadg.dg
Online Online Lunarrac Stable
Ora. Datadg2.dg
Online Online Lunarrac Stable
Ora. Listener.lsnr
Online Online Lunarrac Stable
Ora.asm
Online online Lunarrac started,stable
Ora.net1.network
Online Online Lunarrac Stable
Ora.ons
Online Online Lunarrac Stable
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
Ora. Listener_scan1.lsnr
1 Online Online Lunarrac stable
Ora. Mgmtlsnr
1 Online online Lunarrac 169.254.52.98 192.16
8.60.56,stable
Ora.cvu
1 Online Online Lunarrac stable
Ora.lunar.db
1 Online Online Lunarrac open,stable
Ora.lunarrac.vip
1 Online Online Lunarrac stable
Ora.mgmtdb
1 OFFLINE OFFLINE Stable
Ora.oc4j
1 Online Online Lunarrac stable
Ora.scan1.vip
1 Online Online Lunarrac stable
--------------------------------------------------------------------------------
[Root@lunarrac ~]#
After you suspend the old store, you will also need to check the password file and, if necessary, give the SYS and system a sysdba,sysoper permission to log on to the database using the operating system authentication method.