驗證11gR2 RAC中ASM例項通過gpnp profile獲得spfile資訊來啟動ASM例項

還不算暈發表於2016-05-09
主要為了驗證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]$


相關文章