11gR2 中asm 实例的spfile文件的默认存储位置

本文参考自:

ASM spfile in a disk group (文档 ID 1668455.1)


一、确认asm diskgroup:注意看是Normal冗余级别,AU是1048576

[grid@rhel63single ~]$ asmcmd
ASMCMD> lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  NORMAL  N         512   4096  1048576      6141     6019             2047            1986              0             N  DATA/
ASMCMD> exit
[grid@rhel63single ~]$ 


二、spfile的位置

[grid@rhel63single ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.4.0 Production on Sun Jan 10 17:49:33 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Automatic Storage Management option

SQL> show parameter pfile

NAME    TYPE         VALUE
---------------- ----------- ------------------------------
spfile    string       +DATA/asm/asmparameterfile/registry.253.890702019
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Automatic Storage Management option
[grid@rhel63single ~]$

注意:可以看到asm的spfile存储在+data磁盘组中,而+data磁盘组是Normal冗余级别的,因此,一共有两个spfile,并且是互为镜像关系。


三、检查asm 的spfile的位置:

[grid@rhel63single peer]$ for disk in `asmcmd lsdsk -G DATA --suppressheader`
> do
> echo $disk
> kfed read $disk | grep spf
> done
/dev/raw/raw1
kfdhdb.spfile:                        4 ; 0x0f4: 0x00000004  --->十进制数字4代表存放spfile的AU Number
kfdhdb.spfflg:                        1 ; 0x0f8: 0x00000001  --->十进制数字1代表该asm disk中存放了spfile        
/dev/raw/raw2
kfdhdb.spfile:                       59 ; 0x0f4: 0x0000003b  --->十进制数字59代表存放spfile的AU Number
kfdhdb.spfflg:                        1 ; 0x0f8: 0x00000001  --->十进制数字1代表该asm disk中存放了spfile 
/dev/raw/raw3
kfdhdb.spfile:                        0 ; 0x0f4: 0x00000000 
kfdhdb.spfflg:                        0 ; 0x0f8: 0x00000000
[grid@rhel63single peer]$


四、根据上一步信息确认asm 的spfile内容:

[grid@rhel63single peer]$ dd if=/dev/raw/raw1 bs=1048576 skip=4 count=1 | strings
*.asm_power_limit=1
*.diagnostic_dest='/u03/app/grid'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0493577 s, 21.2 MB/s
[grid@rhel63single peer]$ 

 

[grid@rhel63single peer]$ dd if=/dev/raw/raw2 bs=1048576 skip=59 count=1 | strings
*.asm_power_limit=1
*.diagnostic_dest='/u03/app/grid'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0491052 s, 21.4 MB/s
[grid@rhel63single peer]$ 

 

四、查看asm spfile的alias信息:

[grid@rhel63single peer]$ kfed read /dev/raw/raw1 aun=4 blkn=255
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                           27 ; 0x002: KFBTYP_ASMSPFALS
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                     255 ; 0x004: blk=255
kfbh.block.obj:                     253 ; 0x008: file=253
kfbh.check:                   873236675 ; 0x00c: 0x340c88c3
kfbh.fcn.base:                        0 ; 0x010: 0x00000000
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kfspbals.incarn:              890702019 ; 0x000: 0x351708c3
kfspbals.blksz:                     512 ; 0x004: 0x00000200
kfspbals.size:                        3 ; 0x008: 0x0003
kfspbals.path.len:                    0 ; 0x00a: 0x0000 --------->十进制数字0表示没有alias
kfspbals.path.buf:                      ; 0x00c: length=0
[grid@rhel63single peer]$ 

你可能感兴趣的:(11gR2 中asm 实例的spfile文件的默认存储位置)