在Clusterware中,CSS、GPnP等服务的启动都需要依赖于GPnP profile文件。GPnP profile是一个XML文件,引导节点加入集群,GPnP profile提供了新节点的配置信息。GPnP profile还指定了整个集群的特性。如果该文件被破坏或丢失,Clusterware将无法正常启动。
$GRID_HOME/gpnp/$HOSTNAME/profile/peer/profile.xml
$GRID_HOME/gpnp/profile/peer/profile.xml(全局备份)
如果GPnP出现问题,可以使用cluvfy comp gpnp组件验证命令检查在集群中所有节点网格即插即用的完整性。
cluvfy comp gpnp [-n node_list] [-verbose]
在Clusterware启动期间,CSS守护进程使用GPnP profile发现表决文件(参数“DiscoveryString”)。一个不正确的Discovery字符串将阻止CSS守护进程启动,导致整个CRS无法启动。
Oracle不支持手动修改profile.xml文件,直接对它的修改可能导致无法修复的问题,最终导致在所有节点重建Clusterware。
GPnP profile文件保存的是集群的配置信息。默认的保存位置是:$GRID_HOME/gpnp/$HOSTNAME/profile/peer/profile.xml
$GRID_HOME/gpnp/profile/peer/profile.xml(全局备份)
下面是典型的GPnP profile内容:
<?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="544e8a6d114c6f1fbfec2667d0bf7c85" ClusterName="vmac-cluster" PALocation="">
<gpnp:Network-Profile>
<gpnp:HostNetwork id="gen" HostName="*">
<gpnp:Network id="net1" IP="192.168.1.0" Adapter="eth1" Use="public"/>
<gpnp:Network id="net2" IP="192.168.1.0" Adapter="eth2" Use="cluster_interconnect"/>
<gpnp:Network id="net3" Adapter="eth2" IP="172.168.1.0" 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*" <span style="background-color: rgb(255, 0, 0);">SPFile="/g01/11ggrid/app/11.2.0/grid/dbs/old_ora.bak"/></span>
<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>jkauDoZrfXw8N12JHcb69wPJpyo=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>X/G6cdsov/cPqZmmFCOWGIf6AMM4adp31DhC0jqzAFbn2bfdakp7IvRwCNc9vjJ0nGDaukCjQnbdGmWs2DiCBNI2zd1OuoZ3/pCKKo0hR3GHcL73A1sQ++50b0NJTeo+SDIYgwTnsHu+vbjoVBqAEuJlSE5t6EfmBBSZvihhRxE=</ds:SignatureValue>
</ds:Signature>
</gpnp:GPnP-Profile>
通过上面的例子可以看出,GPnP profile保存的是RAC的配置信息,包括集群名称、网络类型信息(public/private)、ASM和CSS的存储信息、安全的数字签名,以及ASM实例的SPFILE文件位置。当集群配置发生变化时,所有节点的该文件会被自动更新。在安装、系统引导或者当使用标准的集群工具更新期间,这些活动包括:oifcfg 改变网络信息、crsctl 改变css设备、ASM额外的存储等,会通过gpdpd进程复制GPnP profile到所有的其他节点。
如果GPnP出现问题,可以使用cluvfy comp gpnp组件验证命令检查在集群中所有节点网格即插即用的完整性。
cluvfy comp gpnp [-n node_list] [-verbose]