利用KFED工具从存储中读出spfile信息

本实验是在redhat6 oracle11.2.0.3环境中在关闭crs的情况下利用KFED工具从存储中读出spfile信息的过程.
关闭crs

[root@hp580-5 ~]# crsctl  stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'hp580-5'
CRS-2673: Attempting to stop 'ora.crsd' on 'hp580-5'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'hp580-5'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'hp580-5'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'hp580-5'
CRS-2673: Attempting to stop 'ora.oc4j' on 'hp580-5'
CRS-2673: Attempting to stop 'ora.SYS.dg' on 'hp580-5'
CRS-2673: Attempting to stop 'ora.orcl.db' on 'hp580-5'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'hp580-5'
CRS-2673: Attempting to stop 'ora.cvu' on 'hp580-5'
CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'hp580-5' succeeded
CRS-2673: Attempting to stop 'ora.scan2.vip' on 'hp580-5'
CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'hp580-5' succeeded
CRS-2673: Attempting to stop 'ora.scan3.vip' on 'hp580-5'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'hp580-5' succeeded
CRS-2673: Attempting to stop 'ora.hp580-5.vip' on 'hp580-5'
CRS-2677: Stop of 'ora.scan3.vip' on 'hp580-5' succeeded
CRS-2672: Attempting to start 'ora.scan3.vip' on 'hp580-4'
CRS-2677: Stop of 'ora.scan2.vip' on 'hp580-5' succeeded
CRS-2672: Attempting to start 'ora.scan2.vip' on 'hp580-4'
CRS-2677: Stop of 'ora.hp580-5.vip' on 'hp580-5' succeeded
CRS-2672: Attempting to start 'ora.hp580-5.vip' on 'hp580-4'
CRS-2677: Stop of 'ora.orcl.db' on 'hp580-5' succeeded
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'hp580-5'
CRS-2673: Attempting to stop 'ora.FRA.dg' on 'hp580-5'
CRS-2677: Stop of 'ora.DATA.dg' on 'hp580-5' succeeded
CRS-2676: Start of 'ora.scan2.vip' on 'hp580-4' succeeded
CRS-2676: Start of 'ora.scan3.vip' on 'hp580-4' succeeded
CRS-2677: Stop of 'ora.FRA.dg' on 'hp580-5' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'hp580-4'
CRS-2672: Attempting to start 'ora.LISTENER_SCAN3.lsnr' on 'hp580-4'
CRS-2676: Start of 'ora.hp580-5.vip' on 'hp580-4' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'hp580-4' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'hp580-4' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'hp580-5' succeeded
CRS-2672: Attempting to start 'ora.oc4j' on 'hp580-4'
CRS-2677: Stop of 'ora.cvu' on 'hp580-5' succeeded
CRS-2672: Attempting to start 'ora.cvu' on 'hp580-4'
CRS-2676: Start of 'ora.cvu' on 'hp580-4' succeeded
CRS-2676: Start of 'ora.oc4j' on 'hp580-4' succeeded
CRS-2677: Stop of 'ora.SYS.dg' on 'hp580-5' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'hp580-5'
CRS-2677: Stop of 'ora.asm' on 'hp580-5' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'hp580-5'
CRS-2677: Stop of 'ora.ons' on 'hp580-5' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'hp580-5'
CRS-2677: Stop of 'ora.net1.network' on 'hp580-5' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'hp580-5' has completed
CRS-2677: Stop of 'ora.crsd' on 'hp580-5' succeeded
CRS-2673: Attempting to stop 'ora.crf' on 'hp580-5'
CRS-2673: Attempting to stop 'ora.ctssd' on 'hp580-5'
CRS-2673: Attempting to stop 'ora.evmd' on 'hp580-5'
CRS-2673: Attempting to stop 'ora.asm' on 'hp580-5'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'hp580-5'
CRS-2677: Stop of 'ora.evmd' on 'hp580-5' succeeded
CRS-2677: Stop of 'ora.crf' on 'hp580-5' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'hp580-5' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'hp580-5' succeeded
CRS-2677: Stop of 'ora.asm' on 'hp580-5' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'hp580-5'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'hp580-5' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'hp580-5'
CRS-2677: Stop of 'ora.cssd' on 'hp580-5' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'hp580-5'
CRS-2677: Stop of 'ora.gipcd' on 'hp580-5' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'hp580-5'
CRS-2677: Stop of 'ora.gpnpd' on 'hp580-5' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'hp580-5' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@hp580-5 ~]# crsctl status res  -t
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4000: Command Status failed, or completed with errors.
[root@hp580-5 ~]# gpnptool get -o-
Cannot get GPnP profile. Error CLSGPNP_NO_DAEMON (GPNPD daemon is not running).
GPnP service is not running on localhost. Found locally cached profile...
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="18" ClusterUId="379dca7c7a467f12bf284ef18a5a1055" ClusterName="hp580-cluster" PALocation="">
--------有用信息
http://www.w3.org/2000/09/xmldsig#"> Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> URI="">http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"> http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="gpnp orcl xsi"/>AX6UhUpTQTyu2IkFfMg/2g+4d9M=Ay3PpU54ALybHmNKT7iWtA5ZoWki8yN3J5bGXbEisyu6i4Fi4sffC/qXazgfrHWklZj3ahDBKeadm38DmobANY5F6VceRSDhAIUEkivVTDfn4AzCpB3SrjN7oWb062QRXRHNwkaw8qKac6QxucmFn7AZCiv8doD2lCmIBVFNrK8=AX6UhUpTQTyu2IkFfMg/2g+4d9M=Ay3PpU54ALybHmNKT7iWtA5ZoWki8yN3J5bGXbEisyu6i4Fi4sffC/qXazgfrHWklZj3ahDBKeadm38DmobANY5F6VceRSDhAIUEkivVTDfn4AzCpB3SrjN7oWb062QRXRHNwkaw8qKac6QxucmFn7AZCiv8doD2lCmIBVFNrK8=http://www.w3.org/2000/09/xmldsig#sha1"/>AX6UhUpTQTyu2IkFfMg/2g+4d9M=Ay3PpU54ALybHmNKT7iWtA5ZoWki8yN3J5bGXbEisyu6i4Fi4sffC/qXazgfrHWklZj3ahDBKeadm38DmobANY5F6VceRSDhAIUEkivVTDfn4AzCpB3SrjN7oWb062QRXRHNwkaw8qKac6QxucmFn7AZCiv8doD2lCmIBVFNrK8=>
Success.

Error CLSGPNP_NO_DAEMON getting profile.

从上面命令可以看出asm磁盘信息
[root@hp580-5 ~]# cd  /dev
[root@hp580-5 dev]# ls asm*
asm-diskb  asm-diskc  asm-diskd  asm-diske  asm-diskf  asm-diskg

通过kfed找磁盘中的kfdhdb.sp|ausize来获得asm spfile相关信息
[root@hp580-5 dev]# kfed dev=/dev/asm-diskb op=READ | egrep "kfdhdb.sp|ausize"
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000
kfdhdb.spfile:                        0 ; 0x0f4: 0x00000000
kfdhdb.spfflg:                        0 ; 0x0f8: 0x00000000
[root@hp580-5 dev]# kfed dev=/dev/asm-diskc op=READ | egrep "kfdhdb.sp|ausize"
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000
kfdhdb.spfile:                        0 ; 0x0f4: 0x00000000
kfdhdb.spfflg:                        0 ; 0x0f8: 0x00000000
[root@hp580-5 dev]# kfed dev=/dev/asm-diskd op=READ | egrep "kfdhdb.sp|ausize"
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000
kfdhdb.spfile:                        0 ; 0x0f4: 0x0000003b
kfdhdb.spfflg:                        0 ; 0x0f8: 0x00000001
[root@hp580-5 dev]# kfed dev=/dev/asm-diske op=READ | egrep "kfdhdb.sp|ausize"
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000
kfdhdb.spfile:                        0 ; 0x0f4: 0x0000003b
kfdhdb.spfflg:                        0 ; 0x0f8: 0x00000001
[root@hp580-5 dev]# kfed dev=/dev/asm-diskf op=READ | egrep "kfdhdb.sp|ausize"
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000
kfdhdb.spfile:                        0 ; 0x0f4: 0x00000000
kfdhdb.spfflg:                        0 ; 0x0f8: 0x00000000
[root@hp580-5 dev]# kfed dev=/dev/asm-diskg op=READ | egrep "kfdhdb.sp|ausize"
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000
kfdhdb.spfile:                      352 ; 0x0f4: 0x00000160
kfdhdb.spfflg:                        1 ; 0x0f8: 0x00000001

可以看出来asm spfile信息在磁盘g中,spfile从第352个au开始,1个au(1M),恢复asmspfile信息
[root@hp580-5 dev]# dd if=/dev/asm-diskg bs=1M skip=352 count=1 > /tmp/spfile
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0361562 s, 29.0 MB/s
[root@hp580-5 dev]# strings /tmp/spfile
+ASM2.asm_diskgroups='FRA','SYS'#Manual Mount
+ASM1.asm_diskgroups='FRA','SYS','DATA'#Manual Mount
*.asm_diskstring='/dev/asm*'
*.asm_power_limit=1
*.diagnostic_dest='/g01/app/grid'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'
[root@hp580-5 dev]#

请使用浏览器的分享功能分享到微信等