现在的位置: 首页 > 综合 > 正文

Oracle 11gR2 RAC 中的 Grid Plug and Play(GPnP) 是什么?

2012年02月11日 ⁄ 综合 ⁄ 共 4813字 ⁄ 字号 评论关闭
 

 

 

一. 什么是GPnP?

 

Grid Plug and Play (GPnP):Foundation for a Dynamic Cluster Management 

(1)GPnPeliminates the need for a per node configuration

–It is an underlying gridconcept that enables the automation of operations in the cluster 

–Allows nodes to be dynamicallyadded or removed from the cluster 

–Provides an easier managementto build large clusters OUI does not ask    

–It is the basis for the GridNaming Service (GNS) for a private node name anymore.  

 

(2)Technically,GPnP is based on an XML profile 

–Defining node personality(e.g. cluster name, network classification) 

–Created during installation 

–Updated withevery relevant change (using oifcfg, crsctl) 

–Stored in local files per homeand in the OCR 

- Wallet protected

 

(3) GPnPis apparent in things that you do not  

   see and that youare not asked for (anymore).

 

Grid Plug and Play (GPnP)eliminates per-node configuration data and the need for explicit add and deletenodes steps. This allows a systemadministrator to take a template system image and run it on a new node with nofurther configuration. This removes many manual operations, reduces theopportunity for errors, and encourages configurations that can be changedeasily. Removal of the per-node configuration makes the nodes easierto replace, because they do not need to contain individually-managed state.

    --GPnP 简化了每个节点的配置数据和添加删除节点时的一些步骤。也就是说运行系统管理创建模板的系统镜像,并在新的节点上运行,而不需要其他的配置工作。这样就减少了一些手工操作,降低了发生错误的概率。

 

Grid Plug and Play reduces the cost of installing, configuring, andmanaging database nodes by making their per-node state disposable. It allowsnodes to be easily replaced with regenerated state.

    --GPnP在每个节点通过state来减少安装,配置和管理数据库的成本。

 

Grid Plug andPlay enables you to move your data center toward a dynamic grid infrastructure.This enables you to consolidate applications and lower the costs of managingapplications, while providing a highly available environment that can easilyscale when the workload requires.

 

There are manymodifications in Oracle RAC 11g release 2 (11.2) to support the easy additionof servers in a cluster and therefore a more dynamic grid.

 

 

In the past,adding or removing servers in a cluster required extensive manual preparation.With this release, Grid Plug and Play reduces the costs ofinstalling, configuring, and managing server nodes by automating the followingtasks:

--在过去的版本,添加删除节点需要大量的手工准备,在11gR2中,如下任务通过自动化的操作,GPnP 减少了每个节点安装,配置和管理服务器的成本。

 

1)  Adding an Oracle RAC databaseinstance

2)  Negotiating appropriate networkidentities for itself

3)  Acquiring additionalinformation it needs to operate from a configuration profile

4)  Configuring or reconfiguringitself using profile data, making host names and addresses resolvable on thenetwork

 

--查看GPnP的进程:

[root@rac2 ~]# ps -ef|grep gpnp

grid     5124     1  0 15:26 ?        00:00:01/u01/app/grid/11.2.0/bin/gpnpd.bin

root     6646  4954  0 15:38 pts/0    00:00:00 grep gpnp

[root@rac2 ~]#

 

Grid Plug and Play (GPNPD): GPNPD provides access to the Grid Plug and Play profile, andcoordinates updates to the profile among the nodes of the cluster to ensurethat all of the nodes node have the most recent profile.

--GPnPD 进程可以访问Grid Plug and Play 的profile 文件,并且在集群的所有节点中协调更新profile的内容。 已确保所有节点上的GPnP profile是最新的。

 

 

Multicast Domain Name Service (mDNS): Grid Plug and Play uses the mDNS process to locate profiles in thecluster, as well as by GNS to perform name resolution. The mDNS process is abackground process on Linux and UNIX, and a service on Windows.

    --GpnP 使用mDNS 进程来查找集群中的profile文件,然后执行名称解析。

 

 

The section, AboutPrivate Networks, Network Interfaces, and Network Adapters, says that theentity, Private network interfaces, is stored in the OracleClusterware, in the Grid Plug and Play (GPnP) Profile.

--entity,privatenetwork interface 的信息也会存入到Oracle Clusterwre 和Grid Plug and Play Profile中。

 

也就是说我们在安装过程中配置某个interface作为private interface或者使用oifcfg cluster_interconnects命令配置的private interface信息都会写入到GPnP的profile中。

 

 

二. GPnP Profile 位置及内容

 

GPnP profile文件保存的是集群的配置信息。这个XML 文件里记录了如下信息:

1.网络接口和IP地址(公网和私网)

2.ASM diskstring和spfile信息

 

注意:Oracle不支持手动修改profile.xml文件,直接对它的修改可能导致无法修复的问题,最终导致在所有节点重建Clusterware。

 

默认的保存位置是:

$GRID_HOME/gpnp/$HOSTNAME/profile/peer/profile.xml

$GRID_HOME/gpnp/profile/peer/profile.xml(全局备份)

 

 

在没有启动ASM 实例之前,diskgroup是没有mount的,这时候启动ASM 实例必须要读取spfile文件。 

 

当ASM instance 查找初始化文件的时候,搜索的顺序如下:

1.  GPnP(Grid Plug and Play) profile 中指定的本地位置

2.  如果GPnP profile中没有指定初始化文件的位置,然后搜索ASM InstanceHome目录。这里会包含2种文件,SPFILE 和 PFILE,默认路径是:$ORACLE_HOME/dbs/spfile+ASM.ora

 

在集群环境下,集群在启动的时候,ClusterSynchronization Services (CSS)将扫描所有的ASM disks,它利用的是GPnP profile文件中的ASM discovery string。

 

在Oracle 10g 的RAC里面, OCR 和Votingdisk是存放在单独的raw设备上的,所以我们可以停止启动ASM 实例。

 

但是在Oracle 11gRAC里。Oracle 的架构做了变跟。 和ASM 的spfile一样,OCR和Votingdisk 也存放到了ASM 的磁盘组里。

 

这时候,在启动CRS的时候,也必须通过GPnP 属性文件来获取OCR和votingdisk的信息。 然后在启动ASM 实例和数据库实例。

 

也正式如此,我们在11G RAC环境下,不能停止ASM 实例,只能停数据库实例。 ASM 实例只能和CRS 一起停止。 因为CRS 依赖的文件存放在ASM 磁盘组上。

 

 

将profile.xml的内容复制出来,用浏览器打开,如下图:

 

 

 

 

 

 

 

 

 

 

 

 

 

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

版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!

QQ:      251097186

Skype:    tianlesoftware

Email:    tianlesoftware@gmail.com

Blog:     http://blog.csdn.net/tianlesoftware

Weibo:    http://weibo.com/tianlesoftware

Twitter:  http://twitter.com/tianlesoftware

Facebook: http://www.facebook.com/tianlesoftware

Linkedin: http://cn.linkedin.com/in/tianlesoftware

抱歉!评论已关闭.