GPNP Profile in 11G R2 RAC

11G R2 RAC: gPnPPROFILE

In this post, I will explain what is gPnPprofile, what does it contain and how is it used by clusterware.
WHAT IS gPnPPROFILE?
The gPnPprofile is a small XML file located in GRID_HOME/gpnp//profiles/peer under the name profile.xml. It is used to establish the correct global personality of a node. Each node maintains a local copy of the gPnPProfile and is maintanied by the gPnPDeamon (GPnPD) .
WHAT DOES gPnPPROFILE CONTAIN?
gPnPProfile  is used to store necessary information required for the startup of Oracle Clusterware like  SPFILE location,ASM DiskString  etc.
It contains various attributes defining node personality.
==> Cluster name
==> Network classifications (Public/Private)
==> Storage to be used for CSS
==> Storage to be used for ASM : SPFILE location,ASM DiskString  etc
==> Digital signature information : The profile is security sensitive. It might identify the storage to be used as the root partition of a machine.  Hence, it contains digital signature information of the provisioning authority.
Here is the gPnPprofile of my RAC setup.
gpnptool can be  used  for reading/editing the gPnPprofile.
[root@YesBolisetty01 peer]# gpnptool get
8″?>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=”14cddaccc0464f92bfc703ec1004a386″ ClusterName=”cluster01″ PALocation=””>Profile>Profile>Profile id=”css” DiscoveryString=”+asm” LeaseDuration=”400″/>Profile id=”asm” DiscoveryString=”” SPFile=”+DATA/cluster01/asmparameterfile/registry.253.783619911″/>exc==>c14n#”/>sha1″/>signature”/>exc==>c14n#”> exc==>c14n#” PrefixList=”gPnPorcl xsi”/>4VMorzxVNa+FeOx2SCk1unVBpfU=bbzV04n2zSGTtUEvqqB+pjw1vH7i8MOEUqkhXAyloX0a41T2FkDEA++ksc0BafndAk7tR+6LGdppE1aOsaJUtYxQqaHJdpVsJF+sj2jN7LPJlT5NBt+K7b08TLjDID92Se6vEiDAeeKlEbpVWKMUIvQvp6LrYK8cDB/YjUnXuGU=Profile>
WHO UPDATES gPnPPROFILE?
GPnPd daemon replicates changes to the profile during
==> installation,
==> system boot or
==> when updated
Profile is updated Whenever changes are made to a cluster with configuration tools like
. oifcfg (Change network),
. crsctl (change location of voting disk),
. asmcmd (change ASM_DISKSTRING, SPfile location) etc.
HOW IS gPnPPROFILE USED BY CLUSTERWARE?

To start clusterware, voting disk needs to be accessed. If voting disk is on ASM, this information (that voting disk is on ASM) is read from gPnPprofile (Profile id=”css” DiscoveryString=”+asm” LeaseDuration=”400″/>).   The voting disk is read using kfed utility  even if ASM is not up.
Next,  the clusterware checks if all the nodes have the updated gPnPprofile and the node joins the cluster based on the gPnPconfiguration . Whenver a node is started/added to the cluster, the clusterware software on the starting node starts a gPnPagent.
==> If the node is already part of the cluster, the gPnPagent reads the existing profile on that node.
==> If the node is being added to the cluster, gPnPagent locates agent on another existing node using multicast protocol (provided by mDNS) and gets the profile from that agent.
Next CRSD needs to read OCR to startup various resources on the node and hence update it as status of resources changes. Since OCR is also on ASM, location of ASM SPfile should be known.
The order of searching the ASM SPfile is
==> gPnPprofile
==> ORACLE_HOME/dbs/spfile
==> ORACLE_HOME/dbs/init
In cluster environment, the location of  SPfile for ASMread from gPnPprofile.
[grid@YesBolisetty01 peer]$ gpnptool getpval ==>asm_spf
Warning: some command line parameters were defaulted. Resulting command line:
         /u01/app/11.2.0/grid/bin/gpnptool.bin getpval ==>asm_spf ==>p=profile.xml ==>o==>
+DATA/cluster01/asmparameterfile/registry.253.793721441
The oputput of the query shows that SPfile is on ASM in DATA diskgroup. To find out the
 location of ASM disks, following query is issued :
[root@YesBolisetty01 peer]# gpnptool getpval ==>asm_dis
ASM==>Profile id=”asm” DiscoveryString=””
The  device headers of every device in the disk string returned by the above query are scanned  (if configured by you at ASM initial setup time). Here Discovery String is blank is as ASMDISKSTRINGS parameter has not been set. Hence, headers of all the ASM disks are scanned .
Here, I have shown the output of the query only on the disk which contains SPfile.(spfflg is not null)
[root@YesBolisetty01 ~]#  kfed read /dev/sdb3 | grep ==>E ‘spf|ausize’
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000
kfdhdb.spfile:                       16 ; 0x0f4: 0x00000010
kfdhdb.spfflg:                        1 ; 0x0f8: 0x00000001
In the output above, we see that
     the device /dev/sdb3 contains a copy of the ASM spfile (spfflg=1).
     The ASM spfile location starts at the disk offset of 16 (spfile=16)
Considering the allocation unit size (kfdhdb.ausize = 1M), let’s dump the ASM spfile from the device:
[root@YesBolisetty01 ~]#  dd if=/dev/sdb3 of=spfileASM_Copy2.ora skip=16  bs=1M count=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.170611 seconds, 6.1 MB/s
[root@YesBolisetty01 ~]# strings spfileASM_Copy2.ora
+ASM1.__oracle_base=’/u01/app/grid’#ORACLE_BASE set from in memory value
+ASM2.__oracle_base=’/u01/app/grid’#ORACLE_BASE set from in memory value
+ASM3.__oracle_base=’/u01/app/grid’#ORACLE_BASE set from in memory value
+ASM3.asm_diskgroups=’FRA’#Manual Mount
+ASM2.asm_diskgroups=’FRA’#Manual Mount
+ASM1.asm_diskgroups=’FRA’#Manual Mount
*.asm_power_limit=1
*.diagnostic_dest=’/u01/app/grid’
*.instance_type=’asm’
*.large_pool_size=12M
*.remote_login_passwordfile=’EXCLUSIVE’
Using the parameters in SPfile, ASM is started.
Once ASM is up, OCR is read by CRSD and various resources on the node are started.
Each node reads network information in gPnPprofile and using GNS,  negotiates appropriate network identity for itself . Hence, nodes can be dynamically added/deleted.
+++++++++++++++++++++++++++++++++++++++
GPNPTOOL COMMAND REFERENCE:

==> How to read the profile
[root@inssc3 bin]# ./gpnptool get
==> How to find gPnPDeamons are running on the local node
[root@YesBolisetty01 peer]# gpnptool lfind
Success. Local gpnpd found.
==> How to find the location of ASM spfile if the ASM is down
[root@YesBolisetty01 peer]# gpnptool getpval ==>asm_spf
+DATA/cluster01/asmparameterfile/registry.253.783619911
==> How to find all RD==>discoverable resources of given type
[root@YesBolisetty01 peer]# gpnptool find
Found 3 instances of service ‘gpnp’.
        mdns:service:gpnp._tcp.local.://YesBolisetty03:18015/agent=gpnpd,cname=cluster01,host=YesBolisetty03,pid=5066/gpnpd h:YesBolisetty03 c:cluster01
        mdns:service:gpnp._tcp.local.://YesBolisetty02:17637/agent=gpnpd,cname=cluster01,host=YesBolisetty02,pid=5236/gpnpd h:YesBolisetty02 c:cluster01
        mdns:service:gpnp._tcp.local.://YesBolisetty01:16633/agent=gpnpd,cname=cluster01,host=YesBolisetty01,pid=5206/gpnpd h:YesBolisetty01 c:cluster01

Comments

Popular posts from this blog

ORA-01565: error in identifying file '?/dbs/spfile@.ora'

Reboot Exadata Machine

How to combine Oracle .ova files