Skip to content

主要为了验证11gR2 RAC中ASM实例通过gpnp profile获得spfile信息来启动ASM实例,同时验证了gpnp profile的修改等内容;结论与实验如下:
验证结论:
1./u01/app/11.2.0/grid/gpnp/profiles/peer下的cat profile.xml内容是旧的,使用spset/spmove时均未被更新,一些文档说这个 profile.xml是全局的。
gpnp使用的是/u01/app/11.2.0/grid/gpnp/rac1/profiles/peer下的cat profile.xml内容,即$ORACLE_HOME/gpnp/[HOSTNAME]/profiles/peer/

2.修改是通过ASMCMD的spset/spmove命令来实现的修改gpnp profile,
通过gpnptool edit -p=profile.xml -asm_spf=”+DATA1/rac-cluster/asmparameterfile/registry.253.857644239″ 这种命令,显示修改成功,但是未发现profile.xml中信息变化,重新启动OS/HAS等方式均未发现使用新的修改,求告知原因。

3.gpnp profile不能手动修改,手动编辑会导致文件损坏,查看gpnpd.log可以发现校验文件出错的信息,但是可以从缓存中查找gpnp profile并启动。
[ CLWAL][3031893712]clsw_Initialize: OLR initlevel [70000]
[ clsdmt][3022580624]Listening to (ADDRESS=(PROTOCOL=ipc)(KEY=rac1DBG_GPNPD))
2016-05-07 23:39:58.106: [ clsdmt][3022580624]PID for the Process [3252], connkey 10
2016-05-07 23:39:58.106: [ clsdmt][3022580624]Creating PID [3252] file for home /u01/app/11.2.0/grid host rac1 bin gpnp to /u01/app/11.2.0/grid/gpnp/init/
2016-05-07 23:39:58.106: [ clsdmt][3022580624]Writing PID [3252] to the file [/u01/app/11.2.0/grid/gpnp/init/rac1.pid]
2016-05-07 23:39:58.153: [ GPNP][3031893712]clsgpnpd_validateProfile: [at clsgpnpd.c:2888] Result: (86) CLSGPNP_SIG_INVALID. Profile failed to verify. prf=0x99fec78
2016-05-07 23:39:58.153: [ GPNP][3031893712]clsgpnpd_openLocalProfile: [at clsgpnpd.c:3461] Result: (86) CLSGPNP_SIG_INVALID. Local best profile from file cache provider (LCP-FS) is invalid – destroyed.
2016-05-07 23:39:58.155: [ GPNP][3031893712]clsgpnpd_validateProfile: [at clsgpnpd.c:2919] GPnPD taken cluster name ‘rac-cluster’
2016-05-07 23:39:58.155: [ GPNP][3031893712]clsgpnpd_openLocalProfile: [at clsgpnpd.c:3532] Got local profile from OLR cache provider (LCP-OLR).
2016-05-07 23:39:58.168: [ GPNP][3031893712]clsgpnpd_lOpen: [at clsgpnpd.c:1734] Listening on ipc://GPNPD_rac1
2016-05-07 23:39:58.169: [ default][3031893712]GPNPD started on node rac1.

实验1:验证ASM实例启动时依赖gpnp profile中的SPFILE信息
1.修改gpnp profile中关于SPFILE的信息并验证修改成功
ASMCMD> spset +DATA1/rac-cluster/asmparameterfile/spfile.ora
ASMCMD> spget
+DATA1/rac-cluster/asmparameterfile/spfile.ora
查看/u01/app/11.2.0/grid/gpnp/profiles/peer下的cat profile.xml内容,可以发现未修改,仍是ProfileSequence=”4″ 。
查看/u01/app/11.2.0/grid/gpnp/rac1/profiles/peer下的cat profile.xml内容,发现已经修改,ProfileSequence=”8″ ,SPFile=”+DATA1/rac-cluster/asmparameterfile/spfile.ora。
此时/u01/app/11.2.0/grid/gpnp/rac1/profiles/peer下还出现了一个pending.xml文件,里面的内容是最新的信息。
此时使用 kfed read /dev/asm-diskb|grep spfile可以发现SPFILE的信息未变化。
[grid@rac1 peer]$ kfed read /dev/asm-diskb|grep spfile
kfdhdb.spfile: 58 ; 0x0f4: 0x0000003a

此时启动HAS,查看ASM的ALERT LOG中使用的ASM SPFILE信息,可以发现使用了新的GPnP-Profile中的配置,出现如下报错:
ERROR: SPFile in diskgroup DATA1 does not match the specified spfile +DATA1/rac-cluster/asmparameterfile/spfile.ora
此时使用默认的参数启动ASM实例,然后磁盘组做为资源–ora.DATA1.dg也被AGENT发出的MOUNT命令成功挂载,

这里根据实验结果来推测一种可能–>如何找到ASM SPFile:(如下步骤1、2谁先谁后应该都可以,我是根据gpnp profile中DiscoveryString在前觉得应该是先进行步骤1)
1.gpnp profile中DiscoveryString字段找到相应的磁盘,读取磁盘头获取SPFILE信息,如KFED读到的信息:[grid@rac1 peer]$ kfed read /dev/asm-diskb|grep spfile
kfdhdb.spfile: 58 ; 0x0f4: 0x0000003a
2.从磁盘头获取了SPFILE信息并去读取–?后,再与gpnp profile中SPFile=指定的文件信息做对比,如果一致,则使用。如果不一致,则去$ORACLE_HOME/dbs下查找spfile+ASM1.ora这种查找路径,如果仍找不到,再使用默认参数启动。
3.问题点在于DiscoveryString=”/dev/asm*” SPFile=”部分,在实验中可以发现,将SPFile=改为一个不存在的文件;此时通过kfed读取磁盘头可以找到正确的SPFILE信息,但是并未被使用;因此有此推断。

实验2:ASMCMD> spmove REGISTRY.253.857644239 +DATA2/spfileasm.ora
此命令会将ASM SPFILE文件移到到+DATA2/spfileasm.ora –别名;原来ASM SPFILE在+DATA1,只能移到不同的磁盘组;
spmove 移动后,会自动更新gpnp profile中信息;同时使用kfed 读取磁盘头信息,也同步进行了更新。

############################################
如下是实验过程的简要步骤与具体实验信息:
1.查看gpnp profile信息
2.查看ASM的ALERT LOG中使用的ASM SPFILE信息

实验1:
1.修改gpnp profile中关于SPFILE的信息并验证修改成功
2.启动HAS,查看ASM的ALERT LOG中使用的ASM SPFILE信息
实验2:
1.spmove 验证kfed 中读到的信息是否变化及gpnp profile中信息也被修改
实验3:设置为正确的asm spfile信息,经过crsctl stop/start has 和重启OS,查看GPNP PROFILE所在目录中还存在pending.xml
但是在实验2中,spmove后不存在pending.xml了。

############################################
############################################
############################################
1.查看gpnp profile信息
通过gpnptool get查询
查看/u01/app/11.2.0/grid/gpnp/profiles/peer下的cat profile.xml内容
查看/u01/app/11.2.0/grid/gpnp/rac1/profiles/peer下的cat profile.xml内容

[grid@rac1 peer]$ gpnptool get —>>>可以看到这里的 ProfileSequence=”7″
Warning: some command line parameters were defaulted. Resulting command line:
/u01/app/11.2.0/grid/bin/gpnptool.bin get -o-

<?xml version=”1.0″ encoding=”UTF-8″?><gpnp:GPnP-Profile Version=”1.0″ xmlns=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:gpnp=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:orcl=”http://www.oracle.com/gpnp/2005/11/gpnp-profile” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd” ProfileSequence=”7″ ClusterUId=”5de823e89503dfabbf7868bf50f95c5c” ClusterName=”rac-cluster” PALocation=””><gpnp:Network-Profile><gpnp:HostNetwork id=”gen” HostName=”*”><gpnp:Network id=”net1″ IP=”192.168.57.0″ Adapter=”eth0″ Use=”public”/><gpnp:Network id=”net2″ IP=”192.168.10.0″ Adapter=”eth1″ Use=”cluster_interconnect”/></gpnp:HostNetwork></gpnp:Network-Profile>
<orcl:CSS-Profile id=”css” DiscoveryString=”+asm” LeaseDuration=”400″/>
<orcl:ASM-Profile id=”asm” DiscoveryString=”/dev/asm*” SPFile=”+DATA1/rac-cluster/asmparameterfile/registry.253.857644239″/><ds:Signature xmlns:ds=”http://www.w3.org/2000/09/xmldsig#”><ds:SignedInfo><ds:CanonicalizationMethod Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”/><ds:SignatureMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#rsa-sha1″/><ds:Reference URI=””><ds:Transforms><ds:Transform Algorithm=”http://www.w3.org/2000/09/xmldsig#enveloped-signature”/><ds:Transform Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”> <InclusiveNamespaces xmlns=”http://www.w3.org/2001/10/xml-exc-c14n#” PrefixList=”gpnp orcl xsi”/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#sha1″/><ds:DigestValue>eL42pYpgXChFOff3YJz7lV/C/+Q=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>NBq10c8aJMSZ2QDZnOvPpyWmM0Wrp0pwLUB1mGFADeLvTRY4J+dfopJWp/hYRvRr6XgcQ4h4Qkrb2Njp0NB863E36JbweMA9vmygajUJsahonx/Ln4/VJwpsL8L3xwXlNwYlGNDDtdtmevDZNpyw7VvDNX92xZPg+mmbW049cuI=</ds:SignatureValue></ds:Signature></gpnp:GPnP-Profile>
Success.

ASM的PROFILE参数信息:
<orcl:ASM-Profile id=”asm” DiscoveryString=”/dev/asm*” SPFile=”+DATA1/rac-cluster/asmparameterfile/registry.253.857644239″/>

[grid@rac1 peer]$ pwd
/u01/app/11.2.0/grid/gpnp/profiles/peer
[grid@rac1 peer]$ ls -lrt
total 12
-rw-r–r– 1 grid oinstall 1828 Sep 7 2014 profile_orig.xml
-rw-r–r– 1 grid oinstall 1891 May 7 22:40 profile.xml
-rw-r–r– 1 grid oinstall 1891 May 8 20:50 profile.xml1
[grid@rac1 peer]$ cat profile.xml —>>>可以看到这里的ProfileSequence=”4″ ,是较老的版本。
<?xml version=”1.0″ encoding=”UTF-8″?><gpnp:GPnP-Profile Version=”1.0″ xmlns=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:gpnp=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:orcl=”http://www.oracle.com/gpnp/2005/11/gpnp-profile” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd” ProfileSequence=”4″ ClusterUId=”5de823e89503dfabbf7868bf50f95c5c” ClusterName=”rac-cluster” PALocation=””><gpnp:Network-Profile><gpnp:HostNetwork id=”gen” HostName=”*”><gpnp:Network id=”net1″ IP=”192.168.57.0″ Adapter=”eth0″ Use=”public”/><gpnp:Network id=”net2″ IP=”192.168.10.0″ Adapter=”eth1″ Use=”cluster_interconnect”/></gpnp:HostNetwork></gpnp:Network-Profile>
<orcl:CSS-Profile id=”css” DiscoveryString=”+asm” LeaseDuration=”400″/>
<orcl:ASM-Profile id=”asm” DiscoveryString=”/dev/asm*” SPFile=”+DATA1/rac-cluster/asmparameterfile/registry.253.857644239″/><ds:Signature xmlns:ds=”http://www.w3.org/2000/09/xmldsig#”><ds:SignedInfo><ds:CanonicalizationMethod Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”/><ds:SignatureMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#rsa-sha1″/><ds:Reference URI=””><ds:Transforms><ds:Transform Algorithm=”http://www.w3.org/2000/09/xmldsig#enveloped-signature”/><ds:Transform Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”> <InclusiveNamespaces xmlns=”http://www.w3.org/2001/10/xml-exc-c14n#” PrefixList=”gpnp orcl xsi”/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#sha1″/><ds:DigestValue>9J7PntAuc/TYr/90C5OnUylcuFA=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>Nn1CIKzx5/72LpetbyZT/T60s2Ehhpuw2VN97QNurNWJOS6rzGRc0uZMorJqBH+giyorhHsUP8irlcWZz4YSz+1L/HMr5f/7duVGnB9oys05mF49SvUikwnRLaOL2Hsi1z+SkCFvDfnfPF0YUr8MnNKpklViLZT9SnqGsVg4aeE=</ds:SignatureValue></ds:Signature></gpnp:GPnP-Profile>[grid@rac1 peer]$
[grid@rac1 peer]$
[grid@rac1 peer]$ cd –
/u01/app/11.2.0/grid/gpnp/rac1/profiles/peer
[grid@rac1 peer]$ ls -lrt
total 16
-rw-r–r– 1 grid oinstall 1828 Sep 7 2014 profile_orig.xml
-rw-r–r– 1 grid oinstall 1871 May 7 23:59 profile.old
-rw-r–r– 1 grid oinstall 1891 May 8 10:27 profile.xml
-rw-r–r– 1 grid oinstall 1891 May 8 20:52 profile.xml1
[grid@rac1 peer]$ cat profile.xml—>>>可以看到这里的ProfileSequence=”7″ ,是当前使用的版本。
<?xml version=”1.0″ encoding=”UTF-8″?><gpnp:GPnP-Profile Version=”1.0″ xmlns=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:gpnp=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:orcl=”http://www.oracle.com/gpnp/2005/11/gpnp-profile” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd” ProfileSequence=”7″ ClusterUId=”5de823e89503dfabbf7868bf50f95c5c” ClusterName=”rac-cluster” PALocation=””><gpnp:Network-Profile><gpnp:HostNetwork id=”gen” HostName=”*”><gpnp:Network id=”net1″ IP=”192.168.57.0″ Adapter=”eth0″ Use=”public”/><gpnp:Network id=”net2″ IP=”192.168.10.0″ Adapter=”eth1″ Use=”cluster_interconnect”/></gpnp:HostNetwork></gpnp:Network-Profile>
<orcl:CSS-Profile id=”css” DiscoveryString=”+asm” LeaseDuration=”400″/>
<orcl:ASM-Profile id=”asm” DiscoveryString=”/dev/asm*” SPFile=”+DATA1/rac-cluster/asmparameterfile/registry.253.857644239″/><ds:Signature xmlns:ds=”http://www.w3.org/2000/09/xmldsig#”><ds:SignedInfo><ds:CanonicalizationMethod Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”/><ds:SignatureMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#rsa-sha1″/><ds:Reference URI=””><ds:Transforms><ds:Transform Algorithm=”http://www.w3.org/2000/09/xmldsig#enveloped-signature”/><ds:Transform Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”> <InclusiveNamespaces xmlns=”http://www.w3.org/2001/10/xml-exc-c14n#” PrefixList=”gpnp orcl xsi”/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#sha1″/><ds:DigestValue>eL42pYpgXChFOff3YJz7lV/C/+Q=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>NBq10c8aJMSZ2QDZnOvPpyWmM0Wrp0pwLUB1mGFADeLvTRY4J+dfopJWp/hYRvRr6XgcQ4h4Qkrb2Njp0NB863E36JbweMA9vmygajUJsahonx/Ln4/VJwpsL8L3xwXlNwYlGNDDtdtmevDZNpyw7VvDNX92xZPg+mmbW049cuI=</ds:SignatureValue></ds:Signature></gpnp:GPnP-Profile>
ASM的PROFILE参数信息:
<orcl:ASM-Profile id=”asm” DiscoveryString=”/dev/asm*” SPFile=”+DATA1/rac-cluster/asmparameterfile/registry.253.857644239″/>

[grid@rac1 peer]$ date
Sun May 8 21:03:13 CST 2016
[grid@rac1 peer]$ asmcmd —>>>从GPnP profile查询的ASM SPFILE的位置
ASMCMD>
ASMCMD>
ASMCMD> spget
+DATA1/rac-cluster/asmparameterfile/registry.253.857644239
ASMCMD>

2.查看ASM的ALERT LOG中使用的ASM SPFILE信息
Sun May 08 20:53:35 2016
Instance shutdown complete
Sun May 08 20:59:26 2016
NOTE: No asm libraries found in the system
MEMORY_TARGET defaulting to 1128267776.
* instance_number obtained from CSS = 1, checking for the existence of node 0…
* node 0 does not exist. instance_number = 1
Starting ORACLE instance (normal)
WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /dev/shm file system to be mounted for at least 1140850688 bytes. /dev/shm is either not mounted or is mounted with available space less than this size. Please fix this so that MEMORY_TARGET can work as expected. Current available is 525660160 and used is 0 bytes. Ensure that the mount point is /dev/shm for this directory.
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Initial number of CPU is 1
Private Interface ‘eth1:1′ configured from GPnP for use as a private interconnect.
[name=’eth1:1’, type=1, ip=169.254.162.219, mac=08-00-27-54-4c-ad, net=169.254.0.0/16, mask=255.255.0.0, use=haip:cluster_interconnect/62]
Public Interface ‘eth0′ configured from GPnP for use as a public interface.
[name=’eth0’, type=1, ip=192.168.57.225, mac=08-00-27-35-fe-56, net=192.168.57.0/24, mask=255.255.255.0, use=public/1]
CELL communication is configured to use 0 interface(s):
CELL IP affinity details:
NUMA status: non-NUMA system
cellaffinity.ora status: N/A
CELL communication will use 1 IP group(s):
Grp 0:
Picked latch-free SCN scheme 2
Using LOG_ARCHIVE_DEST_1 parameter default value as /u01/app/11.2.0/grid/dbs/arch
Autotune of undo retention is turned on.
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – Production
With the Real Application Clusters and Automatic Storage Management options.
ORACLE_HOME = /u01/app/11.2.0/grid
System name: Linux
Node name: rac1.bys.com
Release: 2.6.32-200.13.1.el5uek
Version: #1 SMP Wed Jul 27 20:21:26 EDT 2011
Machine: i686
Using parameter settings in server-side spfile +DATA1/rac-cluster/asmparameterfile/registry.253.857644239 —这里可以看到使用的
System parameters with non-default values:
large_pool_size = 12M
instance_type = “asm”
remote_login_passwordfile= “EXCLUSIVE”
asm_diskstring = “/dev/asm*”
asm_diskgroups = “DATA2”
asm_power_limit = 1
diagnostic_dest = “/u01/app/grid”
Cluster communication is configured to use the following interface(s) for this instance
169.254.162.219
cluster interconnect IPC version:Oracle UDP/IP (generic)

#############################
#############################
#############################
实验1:验证ASM实例启动时依赖gpnp profile中的SPFILE信息
1.修改gpnp profile中关于SPFILE的信息并验证修改成功
使用ASMCMD> spset修改
ASMCMD> spset +DATA1/rac-cluster/asmparameterfile/spfile.ora

验证修改结果:–指定的spfile.ora 事实上是不存在的
ASMCMD> spget
+DATA1/rac-cluster/asmparameterfile/spfile.ora
ASMCMD> exit
查看/u01/app/11.2.0/grid/gpnp/profiles/peer下的cat profile.xml内容,可以发现未修改,仍是ProfileSequence=”4″ 。
查看/u01/app/11.2.0/grid/gpnp/rac1/profiles/peer下的cat profile.xml内容,发现已经修改,ProfileSequence=”8″ ,SPFile=”+DATA1/rac-cluster/asmparameterfile/spfile.ora。
此时/u01/app/11.2.0/grid/gpnp/rac1/profiles/peer下还出现了一个pending.xml文件,里面的内容是最新的信息。
此时使用 kfed read /dev/asm-diskb|grep spfile可以发现SPFILE的信息未变化。
[grid@rac1 peer]$ kfed read /dev/asm-diskb|grep spfile
kfdhdb.spfile: 58 ; 0x0f4: 0x0000003a
————-
[grid@rac1 peer]$ ls -lrt
total 20
-rw-r–r– 1 grid oinstall 1828 Sep 7 2014 profile_orig.xml
-rw-r–r– 1 grid oinstall 1891 May 8 10:27 profile.old
-rw-r–r– 1 grid oinstall 1891 May 8 20:52 profile.xml1
-rw-r–r– 1 grid oinstall 1879 May 8 21:04 profile.xml
-rw-r–r– 1 grid oinstall 1879 May 8 21:04 pending.xml
[grid@rac1 peer]$ date
Sun May 8 21:04:48 CST 2016
[grid@rac1 peer]$ cat pending.xml
<?xml version=”1.0″ encoding=”UTF-8″?><gpnp:GPnP-Profile Version=”1.0″ xmlns=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:gpnp=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:orcl=”http://www.oracle.com/gpnp/2005/11/gpnp-profile” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd” ProfileSequence=”8″ ClusterUId=”5de823e89503dfabbf7868bf50f95c5c” ClusterName=”rac-cluster” PALocation=””><gpnp:Network-Profile><gpnp:HostNetwork id=”gen” HostName=”*”><gpnp:Network id=”net1″ IP=”192.168.57.0″ Adapter=”eth0″ Use=”public”/><gpnp:Network id=”net2″ IP=”192.168.10.0″ Adapter=”eth1″ Use=”cluster_interconnect”/></gpnp:HostNetwork></gpnp:Network-Profile> <orcl:CSS-Profile id=”css” DiscoveryString=”+asm” LeaseDuration=”400″/><orcl:ASM-Profile id=”asm” DiscoveryString=”/dev/asm*” SPFile=”+DATA1/rac-cluster/asmparameterfile/spfile.ora”/><ds:Signature xmlns:ds=”http://www.w3.org/2000/09/xmldsig#”><ds:SignedInfo><ds:CanonicalizationMethod Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”/><ds:SignatureMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#rsa-sha1″/><ds:Reference URI=””><ds:Transforms><ds:Transform Algorithm=”http://www.w3.org/2000/09/xmldsig#enveloped-signature”/><ds:Transform Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”> <InclusiveNamespaces xmlns=”http://www.w3.org/2001/10/xml-exc-c14n#” PrefixList=”gpnp orcl xsi”/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#sha1″/><ds:DigestValue>+NyUNJl9FHhZ5pp/z3Tq7VpUQhE=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>SoJCSTWNGkKs7JVEPMGY6C1Sr35qax7qWQUSGNuAtirWp/0a0RXzt99f2nk+rCSf5opEcdD4Kjl8rAuNufyZm8uWSIcSOEnZEkRUgtDAjinF1vn+E0QSEiUZQFmC9e1srLNmZPhDWy2y3TwcPEm6Qit5ilvulxWV+AQjMOUMsC0=</ds:SignatureValue></ds:Signature></gpnp:GPnP-Profile>[grid@rac1 peer]$
[grid@rac1 peer]$
[grid@rac1 peer]$ cat profile.xml
<?xml version=”1.0″ encoding=”UTF-8″?><gpnp:GPnP-Profile Version=”1.0″ xmlns=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:gpnp=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:orcl=”http://www.oracle.com/gpnp/2005/11/gpnp-profile” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd” ProfileSequence=”8″ ClusterUId=”5de823e89503dfabbf7868bf50f95c5c” ClusterName=”rac-cluster” PALocation=””><gpnp:Network-Profile><gpnp:HostNetwork id=”gen” HostName=”*”><gpnp:Network id=”net1″ IP=”192.168.57.0″ Adapter=”eth0″ Use=”public”/><gpnp:Network id=”net2″ IP=”192.168.10.0″ Adapter=”eth1″ Use=”cluster_interconnect”/></gpnp:HostNetwork></gpnp:Network-Profile ><orcl:CSS-Profile id=”css” DiscoveryString=”+asm” LeaseDuration=”400″/><orcl:ASM-Profile id=”asm” DiscoveryString=”/dev/asm*” SPFile=”+DATA1/rac-cluster/asmparameterfile/spfile.ora”/><ds:Signature xmlns:ds=”http://www.w3.org/2000/09/xmldsig#”><ds:SignedInfo><ds:CanonicalizationMethod Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”/><ds:SignatureMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#rsa-sha1″/><ds:Reference URI=””><ds:Transforms><ds:Transform Algorithm=”http://www.w3.org/2000/09/xmldsig#enveloped-signature”/><ds:Transform Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”> <InclusiveNamespaces xmlns=”http://www.w3.org/2001/10/xml-exc-c14n#” PrefixList=”gpnp orcl xsi”/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#sha1″/><ds:DigestValue>+NyUNJl9FHhZ5pp/z3Tq7VpUQhE=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>SoJCSTWNGkKs7JVEPMGY6C1Sr35qax7qWQUSGNuAtirWp/0a0RXzt99f2nk+rCSf5opEcdD4Kjl8rAuNufyZm8uWSIcSOEnZEkRUgtDAjinF1vn+E0QSEiUZQFmC9e1srLNmZPhDWy2y3TwcPEm6Qit5ilvulxWV+AQjMOUMsC0=</ds:SignatureValue></ds:Signature></gpnp:GPnP-Profile>[grid@rac1 peer]$

[grid@rac1 peer]$ cd –
/u01/app/11.2.0/grid/gpnp/profiles/peer
[grid@rac1 peer]$ ls -lrt
total 12
-rw-r–r– 1 grid oinstall 1828 Sep 7 2014 profile_orig.xml
-rw-r–r– 1 grid oinstall 1891 May 7 22:40 profile.xml
-rw-r–r– 1 grid oinstall 1891 May 8 20:50 profile.xml1

[grid@rac1 peer]$ ls
profile_orig.xml profile.xml profile.xml1
[grid@rac1 peer]$ cat profile.xml
<?xml version=”1.0″ encoding=”UTF-8″?><gpnp:GPnP-Profile Version=”1.0″ xmlns=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:gpnp=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:orcl=”http://www.oracle.com/gpnp/2005/11/gpnp-profile” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd” ProfileSequence=”4″ ClusterUId=”5de823e89503dfabbf7868bf50f95c5c” ClusterName=”rac-cluster” PALocation=””><gpnp:Network-Profile><gpnp:HostNetwork id=”gen” HostName=”*”><gpnp:Network id=”net1″ IP=”192.168.57.0″ Adapter=”eth0″ Use=”public”/><gpnp:Network id=”net2″ IP=”192.168.10.0″ Adapter=”eth1″ Use=”cluster_interconnect”/></gpnp:HostNetwork></gpnp:Network-Profile> <orcl:CSS-Profile id=”css” DiscoveryString=”+asm” LeaseDuration=”400″/><orcl:ASM-Profile id=”asm” DiscoveryString=”/dev/asm*” SPFile=”+DATA1/rac-cluster/asmparameterfile/registry.253.857644239″/><ds:Signature xmlns:ds=”http://www.w3.org/2000/09/xmldsig#”><ds:SignedInfo><ds:CanonicalizationMethod Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”/><ds:SignatureMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#rsa-sha1″/><ds:Reference URI=””><ds:Transforms><ds:Transform Algorithm=”http://www.w3.org/2000/09/xmldsig#enveloped-signature”/><ds:Transform Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”> <InclusiveNamespaces xmlns=”http://www.w3.org/2001/10/xml-exc-c14n#” PrefixList=”gpnp orcl xsi”/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#sha1″/><ds:DigestValue>9J7PntAuc/TYr/90C5OnUylcuFA=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>Nn1CIKzx5/72LpetbyZT/T60s2Ehhpuw2VN97QNurNWJOS6rzGRc0uZMorJqBH+giyorhHsUP8irlcWZz4YSz+1L/HMr5f/7duVGnB9oys05mF49SvUikwnRLaOL2Hsi1z+SkCFvDfnfPF0YUr8MnNKpklViLZT9SnqGsVg4aeE=</ds:SignatureValue></ds:Signature></gpnp:GPnP-Profile>[grid@rac1 peer]$

2.启动HAS,查看ASM的ALERT LOG中使用的ASM SPFILE信息
此时可以发现使用了新的GPnP-Profile中的配置,出现如下报错:
ERROR: SPFile in diskgroup DATA1 does not match the specified spfile +DATA1/rac-cluster/asmparameterfile/spfile.ora
此时使用默认的参数启动ASM实例,然后磁盘组做为资源–ora.DATA1.dg也被AGENT发出的MOUNT命令成功挂载上。

Sun May 08 21:07:48 2016
SQL> ALTER DISKGROUP ALL MOUNT /* asm agent call crs *//* {0:0:2} */
NOTE: Diskgroup used for Voting files is:
DATA1
Diskgroup used for OCR is:DATA1
…………
SUCCESS: diskgroup DATA1 was mounted
SUCCESS: ALTER DISKGROUP ALL MOUNT /* asm agent call crs *//* {0:0:2} */

Sun May 08 21:08:08 2016
SQL> ALTER DISKGROUP DATA2 MOUNT /* asm agent *//* {1:23346:2} */

查看ASM实例:
[grid@rac1 ~]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Sun May 8 22:19:54 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – Production
With the Real Application Clusters and Automatic Storage Management options

SQL> show parameter large_pool_size
NAME TYPE VALUE
———————————— ———– ——————————
large_pool_size big integer 0
SQL> show parameter spfile
NAME TYPE VALUE
———————————— ———– ——————————
spfile string
————————————
Sun May 08 10:29:39 2016
Instance shutdown complete
Sun May 08 21:07:40 2016
NOTE: No asm libraries found in the system
ERROR: SPFile in diskgroup DATA1 does not match the specified spfile +DATA1/rac-cluster/asmparameterfile/spfile.ora
MEMORY_TARGET defaulting to 1128267776.
* instance_number obtained from CSS = 1, checking for the existence of node 0…
* node 0 does not exist. instance_number = 1
Starting ORACLE instance (normal)
WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /dev/shm file system to be mounted for at least 1140850688 bytes. /dev/shm is either not mounted or is mounted with available space less than this size. Please fix this so that MEMORY_TARGET can work as expected. Current available is 525660160 and used is 0 bytes. Ensure that the mount point is /dev/shm for this directory.
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Initial number of CPU is 1
Private Interface ‘eth1:1′ configured from GPnP for use as a private interconnect.
[name=’eth1:1’, type=1, ip=169.254.162.219, mac=08-00-27-54-4c-ad, net=169.254.0.0/16, mask=255.255.0.0, use=haip:cluster_interconnect/62]
Public Interface ‘eth0′ configured from GPnP for use as a public interface.
[name=’eth0′, type=1, ip=192.168.57.225, mac=08-00-27-35-fe-56, net=192.168.57.0/24, mask=255.255.255.0, use=public/1]
CELL communication is configured to use 0 interface(s):
CELL IP affinity details:
NUMA status: non-NUMA system
cellaffinity.ora status: N/A
CELL communication will use 1 IP group(s):
Grp 0:
Picked latch-free SCN scheme 2
Using LOG_ARCHIVE_DEST_1 parameter default value as /u01/app/11.2.0/grid/dbs/arch
Autotune of undo retention is turned on.
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – Production
With the Real Application Clusters and Automatic Storage Management options.
ORACLE_HOME = /u01/app/11.2.0/grid
System name: Linux
Node name: rac1.bys.com
Release: 2.6.32-200.13.1.el5uek
Version: #1 SMP Wed Jul 27 20:21:26 EDT 2011
Machine: i686
WARNING: using default parameter settings without any parameter file
Cluster communication is configured to use the following interface(s) for this instance
169.254.162.219
cluster interconnect IPC version:Oracle UDP/IP (generic)
IPC Vendor 1 proto 2
Sun May 08 21:07:43 2016
PMON started with pid=2, OS id=6577
Sun May 08 21:07:43 2016
PSP0 started with pid=3, OS id=6581
Sun May 08 21:07:44 2016
VKTM started with pid=4, OS id=6585 at elevated priority
VKTM running at (1)millisec precision with DBRM quantum (100)ms
Sun May 08 21:07:44 2016
GEN0 started with pid=5, OS id=6591
Sun May 08 21:07:44 2016
DIAG started with pid=6, OS id=6595
Sun May 08 21:07:44 2016
PING started with pid=7, OS id=6599
Sun May 08 21:07:44 2016
DIA0 started with pid=8, OS id=6603
Sun May 08 21:07:44 2016
LMON started with pid=9, OS id=6607
Sun May 08 21:07:45 2016
LMD0 started with pid=10, OS id=6611
* Load Monitor used for high load check
* New Low – High Load Threshold Range = [960 – 1280]
Sun May 08 21:07:45 2016
LMS0 started with pid=11, OS id=6615 at elevated priority
Sun May 08 21:07:45 2016
LMHB started with pid=12, OS id=6621
Sun May 08 21:07:45 2016
MMAN started with pid=13, OS id=6625
Sun May 08 21:07:45 2016
DBW0 started with pid=14, OS id=6629
Sun May 08 21:07:45 2016
LGWR started with pid=15, OS id=6633
Sun May 08 21:07:45 2016
CKPT started with pid=16, OS id=6637
Sun May 08 21:07:45 2016
SMON started with pid=17, OS id=6641
Sun May 08 21:07:45 2016
RBAL started with pid=18, OS id=6645
Sun May 08 21:07:45 2016
GMON started with pid=19, OS id=6649
Sun May 08 21:07:45 2016
MMON started with pid=20, OS id=6653
Sun May 08 21:07:45 2016
MMNL started with pid=21, OS id=6657
lmon registered with NM – instance number 1 (internal mem no 0)
Reconfiguration started (old inc 0, new inc 2)
ASM instance
List of instances:
1 (myinst: 1)
Global Resource Directory frozen
* allocate domain 0, invalid = TRUE
Communication channels reestablished
Master broadcasted resource hash value bitmaps
Non-local Process blocks cleaned out
LMS 0: 0 GCS shadows cancelled, 0 closed, 0 Xw survived
Set master node info
Submitted all remote-enqueue requests
Dwn-cvts replayed, VALBLKs dubious
All grantable enqueues granted
Post SMON to start 1st pass IR
Submitted all GCS remote-cache requests
Post SMON to start 1st pass IR
Fix write in gcs resources
Reconfiguration complete
Sun May 08 21:07:46 2016
LCK0 started with pid=22, OS id=6661
ORACLE_BASE not set in environment. It is recommended
that ORACLE_BASE be set in the environment
Sun May 08 21:07:48 2016
SQL> ALTER DISKGROUP ALL MOUNT /* asm agent call crs *//* {0:0:2} */
NOTE: Diskgroup used for Voting files is:
DATA1
Diskgroup used for OCR is:DATA1
NOTE: cache registered group DATA1 number=1 incarn=0xae0a68c1
NOTE: cache began mount (first) of group DATA1 number=1 incarn=0xae0a68c1
NOTE: Assigning number (1,0) to disk (/dev/asm-diskb)
NOTE: GMON heartbeating for grp 1
GMON querying group 1 at 3 for pid 24, osid 6665
NOTE: cache opening disk 0 of grp 1: DATA1_0000 path:/dev/asm-diskb
NOTE: F1X0 found on disk 0 au 2 fcn 0.0
NOTE: cache mounting (first) external redundancy group 1/0xAE0A68C1 (DATA1)
* allocate domain 1, invalid = TRUE
NOTE: attached to recovery domain 1
NOTE: cache recovered group 1 to fcn 0.1846
NOTE: redo buffer size is 256 blocks (1053184 bytes)
Sun May 08 21:07:55 2016
NOTE: LGWR attempting to mount thread 1 for diskgroup 1 (DATA1)
Process LGWR (pid 6633) is running at high priority QoS for Exadata I/O
NOTE: LGWR found thread 1 closed at ABA 71.485
NOTE: LGWR mounted thread 1 for diskgroup 1 (DATA1)
NOTE: LGWR opening thread 1 at fcn 0.1846 ABA 72.486
NOTE: cache mounting group 1/0xAE0A68C1 (DATA1) succeeded
NOTE: cache ending mount (success) of group DATA1 number=1 incarn=0xae0a68c1
Sun May 08 21:07:55 2016
NOTE: Instance updated compatible.asm to 11.2.0.0.0 for grp 1
SUCCESS: diskgroup DATA1 was mounted
SUCCESS: ALTER DISKGROUP ALL MOUNT /* asm agent call crs *//* {0:0:2} */
SQL> ALTER DISKGROUP ALL ENABLE VOLUME ALL /* asm agent *//* {0:0:2} */
SUCCESS: ALTER DISKGROUP ALL ENABLE VOLUME ALL /* asm agent *//* {0:0:2} */
Sun May 08 21:07:57 2016
WARNING: failed to online diskgroup resource ora.DATA1.dg (unable to communicate with CRSD/OHASD)
NOTE: Attempting voting file refresh on diskgroup DATA1
NOTE: Refresh completed on diskgroup DATA1
. Found 1 voting file(s).
NOTE: Voting file relocation is required in diskgroup DATA1
NOTE: Attempting voting file relocation on diskgroup DATA1
NOTE: Successful voting file relocation on diskgroup DATA1
Sun May 08 21:07:57 2016
NOTE: [crsd.bin@rac1.bys.com (TNS V1-V3) 6684] opening OCR file
Starting background process ASMB
Sun May 08 21:07:57 2016
ASMB started with pid=26, OS id=6705
Sun May 08 21:07:57 2016
NOTE: client +ASM1:+ASM registered, osid 6709, mbr 0x0
Sun May 08 21:08:08 2016
SQL> ALTER DISKGROUP DATA2 MOUNT /* asm agent *//* {1:23346:2} */
NOTE: cache registered group DATA2 number=2 incarn=0x29ba68c3
NOTE: cache began mount (first) of group DATA2 number=2 incarn=0x29ba68c3
NOTE: Assigning number (2,1) to disk (/dev/asm-diskd)
NOTE: Assigning number (2,0) to disk (/dev/asm-diskc)
Sun May 08 21:08:14 2016
NOTE: GMON heartbeating for grp 2
GMON querying group 2 at 7 for pid 30, osid 6876
NOTE: cache opening disk 0 of grp 2: DATA2_0000 path:/dev/asm-diskc
NOTE: F1X0 found on disk 0 au 2 fcn 0.0
NOTE: cache opening disk 1 of grp 2: DATA2_0001 path:/dev/asm-diskd
NOTE: cache mounting (first) external redundancy group 2/0x29BA68C3 (DATA2)
Sun May 08 21:08:15 2016
* allocate domain 2, invalid = TRUE
Sun May 08 21:08:15 2016
NOTE: attached to recovery domain 2
NOTE: cache recovered group 2 to fcn 0.5980
NOTE: redo buffer size is 256 blocks (1053184 bytes)
Sun May 08 21:08:15 2016
NOTE: LGWR attempting to mount thread 1 for diskgroup 2 (DATA2)
NOTE: LGWR found thread 1 closed at ABA 70.929
NOTE: LGWR mounted thread 1 for diskgroup 2 (DATA2)
NOTE: LGWR opening thread 1 at fcn 0.5980 ABA 71.930
NOTE: cache mounting group 2/0x29BA68C3 (DATA2) succeeded
NOTE: cache ending mount (success) of group DATA2 number=2 incarn=0x29ba68c3
Sun May 08 21:08:15 2016
NOTE: Instance updated compatible.asm to 11.2.0.0.0 for grp 2
SUCCESS: diskgroup DATA2 was mounted
SUCCESS: ALTER DISKGROUP DATA2 MOUNT /* asm agent *//* {1:23346:2} */
Sun May 08 21:08:15 2016
NOTE: diskgroup resource ora.DATA2.dg is updated
Sun May 08 21:09:04 2016
ALTER SYSTEM SET local_listener=’ (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.57.227)(PORT=1521))))’ SCOPE=MEMORY SID=’+ASM1′;
[grid@rac1 trace]$
[grid@rac1 trace]$ crsctl stat res -t
——————————————————————————–
NAME TARGET STATE SERVER STATE_DETAILS
——————————————————————————–
Local Resources
——————————————————————————–
ora.DATA1.dg
ONLINE ONLINE rac1
ora.DATA2.dg
ONLINE ONLINE rac1
ora.LISTENER.lsnr
ONLINE ONLINE rac1
ora.asm
ONLINE ONLINE rac1 Started
ora.gsd
OFFLINE OFFLINE rac1
ora.net1.network
ONLINE ONLINE rac1
ora.ons
ONLINE ONLINE rac1
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac1
ora.cvu
1 ONLINE ONLINE rac1
ora.oc4j
1 ONLINE ONLINE rac1
ora.rac.db
1 OFFLINE OFFLINE Instance Shutdown
2 OFFLINE OFFLINE
ora.rac.sales.svc
1 OFFLINE OFFLINE
2 OFFLINE OFFLINE
ora.rac1.vip
1 ONLINE ONLINE rac1
ora.rac2.vip
1 ONLINE INTERMEDIATE rac1 FAILED OVER
ora.scan1.vip
1 ONLINE ONLINE rac1

##############################################################################
##############################################################################
##############################################################################
实验3:
1.spmove 验证kfed 中读到的信息是否变化及gpnp profile中信息也被修改
[grid@rac1 peer]$ kfed read /dev/asm-diskb|grep spfile
kfdhdb.spfile: 58 ; 0x0f4: 0x0000003a
开始修改–只能移到其它磁盘组
ASMCMD> pwd
+DATA1/rac-cluster/asmparameterfile
ASMCMD> spmove REGISTRY.253.857644239 +DATA1/rac-cluster/spfileasm.ora
ORA-15056: additional error message
ORA-17502: ksfdcre:4 Failed to create file +DATA1/rac-cluster/spfileasm.ora
ORA-15268: internal Oracle file +DATA1.253.1 already exists.
ORA-06512: at line 7 (DBD ERROR: OCIStmtExecute)

ASMCMD> spmove REGISTRY.253.857644239 +DATA2/spfileasm.ora

验证:
ASMCMD> cd +DATA2
ASMCMD> ls
RAC/
rac-cluster/
spfileasm.ora
ASMCMD> spget
+DATA2/spfileasm.ora
ASMCMD>
ASMCMD> cd +DATA1/rac-cluster/asmparameterfile/
ASMCMD-8002: entry ‘asmparameterfile’ does not exist in directory ‘+DATA1/rac-cluster/’

set linesize 140 pagesize 1400
col “FILE NAME” format a40
set head on
select NAME “FILE NAME”,
AU_KFFXP “AU NUMBER”,
NUMBER_KFFXP “FILE NUMBER”,
DISK_KFFXP “DISK NUMBER”,
GROUP_KFFXP “GROUP NUMBER”
from x$kffxp, v$asm_alias
where GROUP_KFFXP = GROUP_NUMBER
and NUMBER_KFFXP = FILE_NUMBER
and name in (‘REGISTRY.253.857644239’)
order by DISK_KFFXP,AU_KFFXP;

FILE NAME AU NUMBER FILE NUMBER DISK NUMBER GROUP NUMBER
—————————————- ———- ———– ———– ————
spfileasm.ora 1977 253 0 2

SQL> col path for a40
SQL> select disk_number,path,GROUP_NUMBER,NAME from v$asm_disk;

DISK_NUMBER PATH GROUP_NUMBER NAME
———– —————————————- ———— ——————————
1 /dev/asm-diskd 2 DATA2_0001
0 /dev/asm-diskc 2 DATA2_0000
0 /dev/asm-diskb 1 DATA1_0000

[grid@rac1 peer]$ kfed read /dev/asm-diskb|grep spfile
kfdhdb.spfile: 0 ; 0x0f4: 0x00000000
[grid@rac1 peer]$ kfed read /dev/asm-diskc|grep spfile
kfdhdb.spfile: 1977 ; 0x0f4: 0x000007b9
[grid@rac1 peer]$ kfed read /dev/asm-diskd|grep spfile
kfdhdb.spfile: 0 ; 0x0f4: 0x00000000
[grid@rac1 peer]$

[grid@rac1 peer]$ pwd
/u01/app/11.2.0/grid/gpnp/rac1/profiles/peer
[grid@rac1 peer]$ ls -lrt
total 16
-rw-r–r– 1 grid oinstall 1828 Sep 7 2014 profile_orig.xml
-rw-r–r– 1 grid oinstall 1891 May 8 20:52 profile.xml1
-rw-r–r– 1 grid oinstall 1876 May 9 11:38 profile.old
-rw-r–r– 1 grid oinstall 1854 May 9 11:58 profile.xml
[grid@rac1 peer]$ cat profile.xml
<?xml version=”1.0″ encoding=”UTF-8″?><gpnp:GPnP-Profile Version=”1.0″ xmlns=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:gpnp=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:orcl=”http://www.oracle.com/gpnp/2005/11/gpnp-profile” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd” ProfileSequence=”11″ ClusterUId=”5de823e89503dfabbf7868bf50f95c5c” ClusterName=”rac-cluster” PALocation=””><gpnp:Network-Profile><gpnp:HostNetwork id=”gen” HostName=”*”><gpnp:Network id=”net1″ IP=”192.168.57.0″ Adapter=”eth0″ Use=”public”/><gpnp:Network id=”net2″ IP=”192.168.10.0″ Adapter=”eth1″ Use=”cluster_interconnect”/></gpnp:HostNetwork></gpnp:Network-Profile> <orcl:CSS-Profile id=”css” DiscoveryString=”+asm” LeaseDuration=”400″/><orcl:ASM-Profile id=”asm” DiscoveryString=”/dev/asm*” SPFile=”+DATA2/spfileasm.ora”/><ds:Signature xmlns:ds=”http://www.w3.org/2000/09/xmldsig#”><ds:SignedInfo><ds:CanonicalizationMethod Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”/><ds:SignatureMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#rsa-sha1″/><ds:Reference URI=””><ds:Transforms><ds:Transform Algorithm=”http://www.w3.org/2000/09/xmldsig#enveloped-signature”/><ds:Transform Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”> <InclusiveNamespaces xmlns=”http://www.w3.org/2001/10/xml-exc-c14n#” PrefixList=”gpnp orcl xsi”/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#sha1″/><ds:DigestValue>2MofRiwOg5XPTit2Qe/PE9e0Zcc=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>W8h6Ou1pqg9xJXMQ3Lvkh6CgSZasftWIQkonb5OkLJtnr/gj2pUzs5WtNx7XPrU5V0uhb9A/Lb2bZj265VV8lrzQ2mt0aaO7m5JflNFKosg2TdsCDBP8cLh1TT81snoPiE65RlRMrVagVgIUs+2MHK7CJ1mNckIFMUYvU+US38s=</ds:SignatureValue></ds:Signature></gpnp:GPnP-Profile>[grid@rac1 peer]$
[grid@rac1 peer]$
[grid@rac1 peer]$
[grid@rac1 peer]$ cat profile.old
<?xml version=”1.0″ encoding=”UTF-8″?><gpnp:GPnP-Profile Version=”1.0″ xmlns=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:gpnp=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:orcl=”http://www.oracle.com/gpnp/2005/11/gpnp-profile” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd” ProfileSequence=”10″ ClusterUId=”5de823e89503dfabbf7868bf50f95c5c” ClusterName=”rac-cluster” PALocation=””><gpnp:Network-Profile><gpnp:HostNetwork id=”gen” HostName=”*”><gpnp:Network id=”net1″ IP=”192.168.57.0″ Adapter=”eth0″ Use=”public”/><gpnp:Network id=”net2″ IP=”192.168.10.0″ Adapter=”eth1″ Use=”cluster_interconnect”/></gpnp:HostNetwork></gpnp:Network-Profile ><orcl:CSS-Profile id=”css” DiscoveryString=”+asm” LeaseDuration=”400″/><orcl:ASM-Profile id=”asm” DiscoveryString=”/dev/asm*” SPFile=”+DATA1/rac-cluster/asmparameterfile/spfile”/><ds:Signature xmlns:ds=”http://www.w3.org/2000/09/xmldsig#”><ds:SignedInfo><ds:CanonicalizationMethod Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”/><ds:SignatureMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#rsa-sha1″/><ds:Reference URI=””><ds:Transforms><ds:Transform Algorithm=”http://www.w3.org/2000/09/xmldsig#enveloped-signature”/><ds:Transform Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”> <InclusiveNamespaces xmlns=”http://www.w3.org/2001/10/xml-exc-c14n#” PrefixList=”gpnp orcl xsi”/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#sha1″/><ds:DigestValue>XvMehRofN1WxcEEtl9qyhoewSxE=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>C99Z3HlRuBRxjpNVyoyBE2kYr1oyn4wJBtdmyjbei2UrhCvdYjv7lucvefL0ZViHgtoP5GjnH3R42iTNn6jIVEE3L9ZzXEDzBVyoEaET0DG3rhlEuJ1K8+PwqMoR+sxaIGogJGmomOoRajCa5ip6tYY5TgBZX6ZDCB5ub+khdZw=</ds:SignatureValue></ds:Signature></gpnp:GPnP-Profile>[grid@rac1 peer]$
[grid@rac1 peer]$
[grid@rac1 peer]$ cd –
/home/grid
[grid@rac1 ~]$ cd /u01/app/11.2.0/grid/gpnp/profiles/peer/
[grid@rac1 peer]$ ls
profile_orig.xml profile.xml profile.xml1
[grid@rac1 peer]$ ls -lrt
total 12
-rw-r–r– 1 grid oinstall 1828 Sep 7 2014 profile_orig.xml
-rw-r–r– 1 grid oinstall 1891 May 7 22:40 profile.xml
-rw-r–r– 1 grid oinstall 1891 May 8 20:50 profile.xml1

####################################################
####################################################
实验3:设置为正确的asm spfile信息,经过crsctl stop/start has 和重启OS,查看GPNP PROFILE所在目录中还存在pending.xml
但是在实验2中,spmove后不存在pending.xml了。
[grid@rac1 peer]$ date
Mon May 9 10:18:58 CST 2016
[grid@rac1 peer]$ asmcmd
ASMCMD> spget
+DATA1/rac-cluster/asmparameterfile/spfile.ora
ASMCMD> cd +DATA1/rac-cluster/asmparameterfile/
ASMCMD> ls
REGISTRY.253.857644239
ASMCMD> spset +DATA1/rac-cluster/asmparameterfile/REGISTRY.253.857644239
ASMCMD>
ASMCMD> spget
+DATA1/rac-cluster/asmparameterfile/REGISTRY.253.857644239
ASMCMD>
[grid@rac1 peer]$ ls -lrt
total 20
-rw-r–r– 1 grid oinstall 1828 Sep 7 2014 profile_orig.xml
-rw-r–r– 1 grid oinstall 1891 May 8 20:52 profile.xml1
-rw-r–r– 1 grid oinstall 1879 May 8 21:04 profile.old
-rw-r–r– 1 grid oinstall 1891 May 9 10:19 profile.xml
-rw-r–r– 1 grid oinstall 1891 May 9 10:20 pending.xml
[grid@rac1 peer]$
[grid@rac1 peer]$
[grid@rac1 peer]$ cat pending.xml
<?xml version=”1.0″ encoding=”UTF-8″?><gpnp:GPnP-Profile Version=”1.0″ xmlns=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:gpnp=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:orcl=”http://www.oracle.com/gpnp/2005/11/gpnp-profile” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd” ProfileSequence=”9″ ClusterUId=”5de823e89503dfabbf7868bf50f95c5c” ClusterName=”rac-cluster” PALocation=””><gpnp:Network-Profile><gpnp:HostNetwork id=”gen” HostName=”*”><gpnp:Network id=”net1″ IP=”192.168.57.0″ Adapter=”eth0″ Use=”public”/><gpnp:Network id=”net2″ IP=”192.168.10.0″ Adapter=”eth1″ Use=”cluster_interconnect”/></gpnp:HostNetwork></gpnp:Network-Profile> <orcl:CSS-Profile id=”css” DiscoveryString=”+asm” LeaseDuration=”400″/><orcl:ASM-Profile id=”asm” DiscoveryString=”/dev/asm*” SPFile=”+DATA1/rac-cluster/asmparameterfile/REGISTRY.253.857644239″/><ds:Signature xmlns:ds=”http://www.w3.org/2000/09/xmldsig#”><ds:SignedInfo><ds:CanonicalizationMethod Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”/><ds:SignatureMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#rsa-sha1″/><ds:Reference URI=””><ds:Transforms><ds:Transform Algorithm=”http://www.w3.org/2000/09/xmldsig#enveloped-signature”/><ds:Transform Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”> <InclusiveNamespaces xmlns=”http://www.w3.org/2001/10/xml-exc-c14n#” PrefixList=”gpnp orcl xsi”/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#sha1″/><ds:DigestValue>OUnyCqOFao3v51DLgMAXY2GOagA=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>TdyvuciCcAebSgt3/fAW8wxrcfo3tF0rH2pdNmy2bBo3yPIjx3mrZWfWz5aoaeYqd69GfiEPabh9udOxBFf4MxFjJz8DeoZRb7Nr2on/sU2qnaDJ8Vnep9Htph7oYUJMmSgB8ncyWw2+YrM1UmY0OTBlApJR/UiunwcTT/4NA84=</ds:SignatureValue></ds:Signature></gpnp:GPnP-Profile>[grid@rac1 peer]$

验证11gR2 RAC中ASM实例通过gpnp profile获得spfile信息来启动ASM实例

测试环境,安装EM12C AGENT后,登陆ASM时发现问题:
1.故障现象
[grid@AAAA grid]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Wed May 11 14:54:39 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-12547: TNS:lost contact
[root@AAAA ~]# crsctl stat res -t
——————————————————————————–
NAME TARGET STATE SERVER STATE_DETAILS
——————————————————————————–
Local Resources
——————————————————————————–
ora.ARCH.dg
ONLINE OFFLINE AAAA
ora.DATA.dg
ONLINE OFFLINE AAAA
ora.FRA.dg
ONLINE OFFLINE AAAA
ora.LISTENER.lsnr
ONLINE OFFLINE AAAA STARTING
ora.asm
ONLINE OFFLINE AAAA
ora.ons
OFFLINE OFFLINE AAAA
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.cssd
1 ONLINE OFFLINE
ora.AAAA.db
1 ONLINE OFFLINE
ora.diskmon
1 OFFLINE OFFLINE
ora.evmd
1 ONLINE ONLINE AAAA

———————————-
2.排查过程
登陆ASM报错,首先排查ASM的日志:
Fri Apr 15 22:01:04 2016
NOTE: Advanced to new COD format for group ARCH
Wed May 11 14:11:51 2016
Errors in file /u01/app/grid/diag/asm/+asm/+ASM/trace/+ASM_ora_8967.trc (incident=5761):
ORA-00600: internal error code, arguments: [spstp: ORACLE_HOME uid does not match euid], [500], [507], [], [], [], [], [], [], [], [], []
Incident details in: /u01/app/grid/diag/asm/+asm/+ASM/incident/incdir_5761/+ASM_ora_8967_i5761.trc
—-ORACLE_HOME的UID不相符,从下面检查用户权限可以看到是将UID 507、500对象的是GRID/ORACLE用户。
[grid@AAAA grid]$ id grid
uid=507(grid) gid=501(oinstall) groups=501(oinstall),502(dba),504(asmadmin),505(asmdba),506(asmoper)
[grid@AAAA grid]$ id oracle
uid=500(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper),504(asmadmin),505(asmdba)

如下验证可以发现GRID用户的安装权限都被误操作修改为OWNER为oracle。
[grid@AAAA +ASM]$ cd /u01/app/
[grid@AAAA app]$ ls -al
total 28
drwxrwxr-x. 7 oracle oinstall 4096 May 11 13:58 .
drwxrwxr-x. 3 oracle oinstall 4096 Apr 12 11:41 ..
drwxrwxr-x. 67 oracle oinstall 4096 Apr 15 11:49 11.2.0
drwxr-xr-x. 6 oracle oinstall 4096 May 11 14:03 agent12c
drwxrwxr-x. 9 oracle oinstall 4096 Apr 15 12:39 grid
drwxrwxr-x. 7 oracle oinstall 4096 Apr 15 13:38 oracle
drwxrwx—. 6 oracle oinstall 4096 May 11 14:24 oraInventory

临时解决方法:是重新使用命令:chown -R /u01/app/11.2.0 等方式修改目录权限后恢复正常,不过GRID软件中有一些文件的权限是root,此时暂时不管了。

–从运行稳定角度来看,建议是重新安装了。

扩展一下:
ORA-12547: TNS:lost contact在RAC中常见的还有oracle程序的权限不对,
ORA-12547 Errors
The error ORA-12547 indicates that the communication channel has been broken. It’s most often thrown because the other end of the process went away unexpectedly.

Note 1307075.1 Oracle Database Fails to Start with Error ORA-12547
Note 381566.1 connect / as sysdba Fails with Ora-12547 And Tns-12514
Note 744512.1 Ora-12547: Tns:Lost Contact Creating Database After Clean Installation

grid软件安装目录权限被修改引起登陆ASM出现ORA-12547 TNSlost contact

正常恢复控制文件并MOUNT数据库
环境:
生产环境进行备份数据库、控制文件
测试环境在之前执行过异机恢复任务,并进行过RESETLOGS操作,并遗留下每次RESETLOGS后的归档日志。

在使用生产环境的备份进行恢复时,报错:
RMAN-06026: some targets not found – aborting restore
RMAN-06100: no channel to

故障现象:
RMAN> restore database; —>此时进行恢复,报错检测此时RMAN-06026

Starting restore at 12-JUN-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=157 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=156 devtype=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/12/2016 14:27:13
RMAN-06026: some targets not found – aborting restore
RMAN-06100: no channel to restore a backup or copy of datafile 7
RMAN-06100: no channel to restore a backup or copy of datafile 6
RMAN-06100: no channel to restore a backup or copy of datafile 5
RMAN-06100: no channel to restore a backup or copy of datafile 4
RMAN-06100: no channel to restore a backup or copy of datafile 3
RMAN-06100: no channel to restore a backup or copy of datafile 2
RMAN-06100: no channel to restore a backup or copy of datafile 1

使用生产环境的备份手动传输到本地时遇到此问题,使用带库(保存15天备份集)时则去查找5/29号的备份。

—————-排查过程
1.查看此时ALERT日志:
Sun Jun 12 13:18:38 2016
Starting ORACLE instance (normal)
……………………省略实例启动的输出
Sun Jun 12 13:18:39 2016
alter database mount —>RMAN中进行恢复控制文件restore controlfile from ‘/oracle/ctlbak’并发出MOUNT命令
Sun Jun 12 13:18:43 2016
Setting recovery target incarnation to 2 —>控制文件中记录的incarnation信息
Sun Jun 12 13:18:43 2016
Successful mount of redo thread 1, with mount id 2622485423
Sun Jun 12 13:18:43 2016
Database mounted in Exclusive Mode
Completed: alter database mount
Sun Jun 12 13:20:52 2016
New incarnation branch detected in ArchiveLog, filename /oracle/product/10.2.0/flash_recovery_area/TESTA/archivelog/2016_05_30/o1_mf_
1_1_cnsfxbfv_.arc
Inspection of file changed rdi from 2 to 3 —>检测到闪回区中的归档信息,incarnation信息增加
Setting recovery target incarnation to 3
Sun Jun 12 13:20:52 2016
Setting recovery target incarnation to 3
Setting recovery target incarnation to 3
Sun Jun 12 13:20:52 2016
New incarnation branch detected in ArchiveLog, filename /oracle/product/10.2.0/flash_recovery_area/TESTA/archivelog/2016_06_09/o1_mf_
1_1_comr5bsb_.arc
Inspection of file changed rdi from 3 to 4—>检测到闪回区中的归档信息,incarnation信息增加
Setting recovery target incarnation to 4
Sun Jun 12 13:20:52 2016

2.RMAN中信息的查询:
RMAN> list incarnation; —>检测此时incarnation信息

using target database control file instead of recovery catalog

List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
——- ——- ——– —————- — ———- ———-
1 1 TESTA 2458714232 PARENT 1 22-JUL-05
2 2 TESTA 2458714232 PARENT 551299 07-MAY-11
3 3 TESTA 2458714232 PARENT 100554368532 30-MAY-16
4 4 TESTA 2458714232 CURRENT 100913181743 09-JUN-16

3.对RESTORE命令进行TRACE并分析:
rman target / debug trace=/oracle/olm/rman_debug
登陆后执行:RMAN> restore database;
TRACE文件内容分析:–259行
DBGMISC: ENTERED krmice [14:34:31.468]
DBGMISC: command to be compiled and executed is: restore [14:34:31.468] (krmice)
DBGMISC: command after this command is: NONE [14:34:31.468] (krmice)
DBGMISC: current incarnation does not matter for restore [14:34:31.468] (krmice)
DBGMISC: ENTERED krmkcrsr [14:34:31.468]

解决办法:
1.第一步MOVE或删除闪回区的归档
2.删除已经恢复的控制文件,重新对控制文件进行恢复。
此时观察ALRET日志中信息,未出现有“检测到闪回区中的归档信息,incarnation信息增加”的情况。
Sun Jun 12 14:44:26 2016
alter database mount
Sun Jun 12 14:44:30 2016
Setting recovery target incarnation to 2
Sun Jun 12 14:44:30 2016
Successful mount of redo thread 1, with mount id 2622505418
Sun Jun 12 14:44:30 2016
Database mounted in Exclusive Mode
Completed: alter database mount
Sun Jun 12 14:46:34 2016
Full restore complete of datafile 2

3.此时进行RECOVER操作,可以正常进行。
后续实验中发现,归档放在非闪回区时,没有这个问题。

因incarnation导致恢复时出现RMAN-06026错误

1. 11gR2 RAC 角色分离信息
11gR2中安装oracle 集群件和数据库软件中的一些group进行简单的介绍。
oinstall : 这个group是GI 和RDBMS软件的拥有者。
dba : 这个group是数据库的dba group, 对数据库具有最高权限。
asmdba : 这个group是asm实例的dba group, 可以启动/关闭实例,挂载/卸载asm 磁盘组。
asmadmin: 这个group是asm的管理员group,它包含asmdba的全部权限,同时还可以增加/删除 asm 磁盘,磁盘组等。

2. ASM共享磁盘及orale/grid用户及GI_HOME/RDBMS_HOME bin目录的oracle程序正确权限
————GI及RDBMS软件安装完成,未DBCA创建数据库时的权限:
[root@bys1 ~]# su – oracle
[oracle@bys1 ~]$ cd $ORACLE_HOME/bin
[oracle@bys1 bin]$ ls -al oracle –RDBMS_HOME的
-rwsr-s–x 1 oracle oinstall 239626665 Nov 9 21:31 oracle
[grid@bys1 ~]$ cd $ORACLE_HOME/bin
[grid@bys1 bin]$ ls -al oracle –GRID_HOME的
-rwsr-s–x 1 grid oinstall 209914471 Nov 9 19:07 oracle
[grid@bys1 bin]$ crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.2.0.4.0]

————DBCA创建数据库后的正确权限示例, 即正常的权限:
[oracle@bys1 bin]$ ls -al oracle
-rwsr-s–x 1 oracle asmadmin 239626665 Nov 9 21:31 oracle

[grid@bys1 ~]$ cd $ORACLE_HOME/bin
[grid@bys1 bin]$ ls -al oracle
-rwsr-s–x 1 grid oinstall 209914471 Nov 9 19:07 oracle
[grid@bys1 bin]$ id oracle
uid=502(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),506(asmdba)
[grid@bys1 bin]$ id grid
uid=501(grid) gid=501(oinstall) groups=501(oinstall),504(asmadmin),506(asmdba),507(asmoper)

3.RAC中常见的因GI/RDBMS HOME中oracle程序权限或者ASM使用的磁盘权限有问题引起的问题汇总:

3.1 sqlplus登陆时报错:ORA-12547: TNS:lost contact
在RAC中常见的还有oracle程序的权限不对,
ORA-12547 Errors
The error ORA-12547 indicates that the communication channel has been broken. It’s most often thrown because the other end of the process went away unexpectedly.

参考MOS文档:
Note 1307075.1 Oracle Database Fails to Start with Error ORA-12547
Note 381566.1 connect / as sysdba Fails with Ora-12547 And Tns-12514
ORA-12537 / ORA-12547 or TNS-12518 if Listener (including SCAN Listener) and Database are Owned by Different OS User (文档 ID 1069517.1)
Note 744512.1 Ora-12547: Tns:Lost Contact Creating Database After Clean Installation
导致 Scan VIP 和 Scan Listener(监听程序)出现故障的最常见的 5 个问题 (文档 ID 1602038.1)

3.2 安装完GI与RDBMS软件,未使用DBCA创建数据库。使用手动恢复数据库方法,此时rdmbs_home下oracle程序权限问题引发的错误
RMAN> restore controlfile from ‘/home/oracle/fulldb_SCTTEST_900418795_84′;

Starting restore at 06-JAN-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=98 instance=scttest1 device type=DISK

channel ORA_DISK_1: restoring control file
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/06/2016 13:20:29
ORA-19870: error while restoring backup piece /home/oracle/fulldb_SCTTEST_900418795_84
ORA-19504: failed to create file “+DATA/scttest/controlfile/control01.ctl”
ORA-17502: ksfdcre:3 Failed to create file +DATA/scttest/controlfile/control01.ctl
ORA-15001: diskgroup “DATA” does not exist or is not mounted
ORA-15055: unable to connect to ASM instance
ORA-01034: ORACLE not available
ORA-27123: unable to attach to shared memory segment
其它类似报错类型:
SQL> create spfile=’+DATA/jdedb/spfilejdedb1.ora’ from pfile;
create spfile=’+DATA/jdedb/spfilejdedb1.ora’ from pfile
*
ERROR at line 1:
ORA-17502: ksfdcre:4 Failed to create file +DATA/jdedb/spfilejdedb1.ora
ORA-15001: diskgroup “DATA” does not exist or is not mounted
ORA-15040: diskgroup is incomplete

查看alert日志:
Mon Nov 07 14:12:19 2016
Decreasing number of real time LMS from 2 to 0
Mon Nov 07 14:17:50 2016
ORA-15025: could not open disk “/dev/raw/raw2”
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
Mon Nov 07 14:17:50 2016
SUCCESS: diskgroup DATA was dismounted
ERROR: diskgroup DATA was not mounted

3.3 ASM使用的磁盘权限问题导致的报错
11.2.0.3中报错信息如下:
ORA-15045:ASM file name ‘+DATA1’ is not in reference form
ORA-17502:ksfdcre:5 Failed to create file +DATA1
ORA-15081:failed to submit an I/0 operation to a disk;

[oracle@bys1 bin]$ ls -al /dev/sdc /dev/sdd –这可以看到只有GRID用户可读写,要修改。
brw-r—– 1 grid asmadmin 8, 32 Apr 11 19:24 /dev/sdc

4.LINUX “suid”和“sgid”权限简介
Linux 权限模型有两个专门的位,叫做“suid”和“sgid”。当设置了一个可执行程序的“suid”这一位时,它将代表可执行文件的所有者运行,而不是代表启动程序的人运行。
关于6751权限的说明:
6751分别指定了ugoa的权限:
第一位6是suid+sgid权限
第二位7代表g(组)有读、写、执行权限
第三位5代表o(其它用户)有读、执行权限
第四位1代表a(所有者、组、其它用户)有执行权限
详细可以参考其它BLOG:

http://www.cnblogs.com/snake-hand/p/3161511.html

http://blog.csdn.net/xiaocainiaoshangxiao/article/details/17378611
—————————-本文内容参考MOS文档:
Oracle Database Fails to Start with Error ORA-12547 (文档 ID 1307075.1)
“Connected to an Idle Instance” Message when Connecting Bequeath to a Running Instance (文档 ID 435044.1)
Troubleshooting when srvctl can’t start RAC instance, but sqlplus can start it (文档 ID 844272.1)
10gR2 Database Creation Fails with 11gR2 ASM storage: ORA-15045, ORA-17502, ORA-15081 [ID 1384180.1]
Database Creation on 11.2 Grid Infrastructure with Role Separation ( ORA-15025, KFSG-00312, ORA-15081 ) (文档 ID 1084186.1)
ORA-00600 [kfioTranslateIO03] [17090] (Doc ID 1336846.1)
ORA-15183 Unable to Create Database on Server using 11.2 ASM and Grid Infrastructure (文档 ID 1054033.1)
Startup Instance Failed with ORA-27140 ORA-27300 ORA-27301 ORA-27302 and ORA-27303 on skgpwinit6 (文档 ID 1274030.1)
https://blogs.oracle.com/Database4CN/entry/%E4%BB%BB%E5%8A%A1%E8%A7%92%E8%89%B2%E5%88%86%E7%A6%BB_job_role_separation_%E7%AE%80%E4%BB%8B

11gR2 rac中用户角色分离及常见oracle bin程序及ASM磁盘权限问题汇总

11.2.0.4 RAC,一个节点宕机,此时VIP FAILOVER到了另一节点。
此时存在大量客户端连接,客户端使用VIP连接到数据库服务器;
且一半客户端为连接节点1 VIP,另一半客户端为连接节点2 VIP。
此时为了快速恢复客户端到数据库连接,使用在服务器端修改监听相关配置,使存活的数据库实例注册到VIP1/VIP2。
客户端可以不进行修改的连接到数据库。

—————-需求比较扯,最好还是用11G的SCAN IP。

1.查看FAILOVER后存活节点上的IP状态信息:
[grid@bys1 admin]$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:29:4B:B4
inet addr:192.168.57.215 Bcast:192.168.57.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe29:4bb4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3383 errors:0 dropped:0 overruns:0 frame:0
TX packets:3107 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:307995 (300.7 KiB) TX bytes:388155 (379.0 KiB)

eth0:1 Link encap:Ethernet HWaddr 08:00:27:29:4B:B4
inet addr:192.168.57.219 Bcast:192.168.57.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

eth0:2 Link encap:Ethernet HWaddr 08:00:27:29:4B:B4
inet addr:192.168.57.218 Bcast:192.168.57.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

eth0:3 Link encap:Ethernet HWaddr 08:00:27:29:4B:B4
inet addr:192.168.57.216 Bcast:192.168.57.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

eth1 Link encap:Ethernet HWaddr 08:00:27:64:B0:1C
inet addr:192.168.58.1 Bcast:192.168.58.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe64:b01c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:364 errors:0 dropped:0 overruns:0 frame:0
TX packets:79 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:37826 (36.9 KiB) TX bytes:12624 (12.3 KiB)

eth1:1 Link encap:Ethernet HWaddr 08:00:27:64:B0:1C
inet addr:169.254.167.252 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:21148 errors:0 dropped:0 overruns:0 frame:0
TX packets:21148 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:12245612 (11.6 MiB) TX bytes:12245612 (11.6 MiB)

[grid@bys1 admin]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.57.215 bys1.bys.com bys1
192.168.57.216 bys1-vip.bys.com bys1-vip
192.168.57.217 bys2.bys.com bys2
192.168.57.218 bys2-vip.bys.com bys2-vip
192.168.58.1 bys1-priv.bys.com bys1-priv
192.168.58.2 bys2-priv.bys.com bys2-priv
192.168.57.219 bysrac-scan.bys.com bysrac-scan

2.修改GRID下监听配置文件:

[grid@bys1 admin]$ cat listener.ora
#LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
###ADD BY DBA
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.57.215)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.57.216)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.57.218)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
###
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent

3.修改数据库local_listener参数
11.2.0.4 local_listener 默认是注册到本节点的VIP上。
SQL> show parameter local

NAME TYPE VALUE
———————————— ———– ——————————
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=
192.168.57.216)(PORT=1521))
SQL> alter system set local_listener=”;

System altered.

修改为空值,则向本主机上所有IP地址注册。
SQL> show parameter local

NAME TYPE VALUE
———————————— ———– ——————————
local_listener string
log_archive_local_first boolean TRUE
parallel_force_local boolean FALSE

4.登陆测试:使用本机公网IP、VIP、宕机节点的VIP均可以连接–192.168.57.215/216/218
[oracle@bys1 ~]$ sqlplus system/oracle@192.168.57.215:1521/bysrac
SQL*Plus: Release 11.2.0.4.0 Production on Thu Nov 17 14:46:19 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 Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,
OLAP, Data Mining, Oracle Database Vault and Real Application Testing options

SQL> exit

[oracle@bys1 ~]$ sqlplus system/oracle@192.168.57.216:1521/bysrac
SQL*Plus: Release 11.2.0.4.0 Production on Thu Nov 17 14:46:23 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 Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,
OLAP, Data Mining, Oracle Database Vault and Real Application Testing options

SQL> exit

[oracle@bys1 ~]$ sqlplus system/oracle@192.168.57.218:1521/bysrac
SQL*Plus: Release 11.2.0.4.0 Production on Thu Nov 17 14:46:28 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 Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,
OLAP, Data Mining, Oracle Database Vault and Real Application Testing options

SQL> exit

 

11G RAC 一节点宕机后修改监听相关配置使通过宕机节点VIP连接数据库的客户端可以连接