[grid@rac2 ~]$ cd $GRID_HOME/dbs
[grid@rac2 dbs]$ ps -ef | grep pmon
grid 5850 1 0 10:46 ? 00:00:00 asm_pmon_+ASM1
oracle 6216 1 0 10:46 ? 00:00:00 ora_pmon_luyan1
grid 6990 5516 0 10:55 pts/0 00:00:00 grep pmon
[grid@rac2 dbs]$ cat > init+ASM1.ora <<EOF
> spfile='+OCR_VOTE/rac-cluster/spfilecss.ora'
> EOF
[grid@rac2 dbs]$ cat init+ASM1.ora
spfile='+OCR_VOTE/rac-cluster/spfilecss.ora' <<<<<<<<<<<<<<<<<pfile内容指定了spfile为我们手工创建的路径
重启ASM...
SQL> show parameter spfile;
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
spfile string
/home/grid/REGISTRY.253.866325101
SQL> shutdown abort;
ASM instance shutdown
SQL> startup pfile='?/dbs/init+ASM1.ora'; <<<<<<<<<以pfile启动
ASM instance started
Total System Global Area 1135747072 bytes
Fixed Size 2260728 bytes
Variable Size 1108320520 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
ASM diskgroups volume enabled
SQL> show parameter spfile;
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
spfile string
+OCR_VOTE/rac-cluster/spfilecss.ora
[grid@rac2 dbs]$ asmcmd spget
+OCR_VOTE/rac-cluster/spfilecss.ora
[grid@rac2 dbs]$ asmcmd ls -l +OCR_VOTE/rac-cluster/spfilecss.ora
Type Redund Striped Time Sys Name
N spfilecss.ora => +OCR_VOTE/rac-cluster/ASMPARAMETERFILE/REGISTRY.253.866371967
[grid@rac2 dbs]$ asmcmd shutdown --abort
ASM instance shutdown
[grid@rac2 dbs]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Mon Dec 15 11:21:09 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ASM instance started
Total System Global Area 1135747072 bytes
Fixed Size 2260728 bytes
Variable Size 1108320520 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
ASM diskgroups volume enabled
SQL> show parameter spfile;
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
spfile string
+OCR_VOTE/rac-cluster/spfilecs
s.ora
节点一启动也能正常启动:
[grid@rac1 ~]$ ps -ef | grep pmon
grid 5793 5674 0 10:50 pts/0 00:00:00 grep pmon
[grid@rac1 ~]$
[grid@rac1 ~]$
[grid@rac1 ~]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Mon Dec 15 11:21:56 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ASM instance started
Total System Global Area 1135747072 bytes
Fixed Size 2260728 bytes
Variable Size 1108320520 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
ASM diskgroups volume enabled
SQL> show parameter spfile;
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
spfile string
+OCR_VOTE/rac-cluster/spfilecss.ora <<<<<<<<<<<<<<<<以正确的SPFILE路径启动实例
+++5) 替换手工创建的spfile至链接路径(可选)
[grid@rac2 dbs]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.LISTENER.lsnr
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.OCR_VOTE.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.asm
ONLINE ONLINE rac1 Started
ONLINE ONLINE rac2 Started
ora.gsd
OFFLINE OFFLINE rac1
OFFLINE OFFLINE rac2
ora.net1.network
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.ons
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.registry.acfs
ONLINE ONLINE rac1
ONLINE ONLINE rac2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac1
ora.cvu
1 ONLINE ONLINE rac2
ora.luyan.db
1 ONLINE ONLINE rac2 Open
2 ONLINE ONLINE rac1 Open
ora.oc4j
1 ONLINE ONLINE rac2
ora.rac1.vip
1 ONLINE ONLINE rac1
ora.rac2.vip
1 ONLINE ONLINE rac2
ora.scan1.vip
1 ONLINE ONLINE rac1
[grid@rac2 dbs]$ asmcmd spget
+OCR_VOTE/rac-cluster/spfilecss.ora
[grid@rac2 dbs]$ asmcmd ls -l +OCR_VOTE/rac-cluster/spfilecss.ora
Type Redund Striped Time Sys Name
N spfilecss.ora => +OCR_VOTE/rac-cluster/ASMPARAMETERFILE/REGISTRY.253.866371967
[grid@rac2 dbs]$ asmcmd spset +OCR_VOTE/rac-cluster/ASMPARAMETERFILE/REGISTRY.253.866371967
[grid@rac2 dbs]$ asmcmd shutdown --abort
ASM instance shutdown
[grid@rac2 dbs]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Mon Dec 15 11:43:26 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ASM instance started