设为首页 加入收藏

TOP

Oracle ASM spfile in a disk group(二)
2017-01-20 08:15:08 】 浏览:518
Tags:Oracle ASM spfile disk group
:? children of , optional
? ? -[id:]css_dis? ? ? ? Profile Tag: ">, optional
? ? -[id:]css_ld? ? ? ? ? Profile Tag: ">, optional
? ? -[id:]css_cin? ? ? ? Profile Tag: ">, optional
? ? -[id:]css_cuv? ? ? ? Profile Tag: ">, optional
? ? -[pid:]ocr? ? ? ? ? ? Profile Tag:? children of , optional
? ? -[id:]ocr_oid? ? ? ? Profile Tag: ">, optional
? ? -rmws? ? ? ? ? ? ? ? Remove whitespace from xml, optional
? ? -fmt[=0,2]? ? ? ? ? ? Format profile. Value is ident level,step, optional
? ? -p[=profile.xml]? ? ? GPnP profile name
? ? -o[=gpnptool.out]? ? Output result to a file, optional
? ? -o-? ? ? ? ? ? ? ? ? Output result to stdout
? ? -ovr? ? ? ? ? ? ? ? ? Overwrite output file, if exists, optional
? ? -t[=3]? ? ? ? ? ? ? ? Trace level (min..max=0..7), optional
? ? -f=? ? ? ? ? ? ? Command file name, optional
? ? -?? ? ? ? ? ? ? ? ? ? Print verb help and exit



[grid@jyrac2 peer]$ gpnptool getpval -p=profile.xml -asm_dis -o-


[grid@jyrac2 peer]$ gpnptool getpval -p=profile.xml -asm_spf -o-
+CRSDG/jyrac-cluster/asmparameterfile/spfileasm.ora


?


在单实例环境中没有GPnP profile,因此为了支持在磁盘组中存储ASM spfile
[grid@jyrac1 ~]$ crsctl stat res ora.asm -p | egrep "ASM_DISKSTRING|SPFILE"
ASM_DISKSTRING=
SPFILE=+DATA/ASM/ASMPARAMETERFILE/registry.253.822856169



现在知道ASM在什么目录查找ASM磁盘与spfile。但磁盘组不能被mount,ASM实例没有启动时,ASM如何读取spfile呢,答案就在ASM磁盘头中。为了支持在磁盘组中存储ASM spfile,在ASM磁盘头中增加了两个字段:
?.kfdhdb.spfile:ASM spfile的AU号
.kfdhdb.spfflg:ASM spfile标记,如果为1,ASM spfile将存储在kfdhdb.spfile所指示的AU中。


作为磁盘发现操作的一部分,ASM实例将读取磁盘头并查找spfile信息。一旦它查找到磁盘存储了spfile,它将可以读取真实的初始化参数。


下面先来检查我环境中的磁盘组CRSDG的状态与冗余类型
[grid@jyrac1 ~]$ asmcmd lsdg -g CRSDG? | cut -c1-26
Inst_ID? State? ? Type? ?
? ? ? 1? MOUNTED? EXTERN?
? ? ? 2? MOUNTED? EXTERN?



磁盘组CRSDG被mount并且磁盘组为外部冗余。这意味着ASM spfile不会有镜像副本,因此我们只能看到一个磁盘有kfdhdb.spfile与fkdhdb.spfflg字段。例如:
[grid@jyrac1 ~]$ asmcmd lsdsk -G CRSDG --suppressheader
/dev/raw/raw1
/dev/raw/raw8
[grid@jyrac1 ~]$ kfed read /dev/raw/raw1 | grep spf
kfdhdb.spfile:? ? ? ? ? ? ? ? ? ? ? ? 0 ; 0x0f4: 0x00000000
kfdhdb.spfflg:? ? ? ? ? ? ? ? ? ? ? ? 0 ; 0x0f8: 0x00000000
[grid@jyrac1 ~]$ kfed read /dev/raw/raw8 | grep spf
kfdhdb.spfile:? ? ? ? ? ? ? ? ? ? ? 30 ; 0x0f4: 0x0000001e
kfdhdb.spfflg:? ? ? ? ? ? ? ? ? ? ? ? 1 ; 0x0f8: 0x00000001


SQL> select group_number,disk_number, name,path from v$asm_disk where group_number=2;


GROUP_NUMBER DISK_NUMBER NAME? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? PATH
------------ ----------- ------------------------------------------------------------ --------------------------------------------------
? ? ? ? ? 2? ? ? ? ? 1 CRSDG_0001? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? /dev/raw/raw8
? ? ? ? ? 2? ? ? ? ? 0 CRSDG_0000? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? /dev/raw/raw1



可以看到只有一个磁盘上存储了ASM spfile文件


使用kfed工具来查看磁盘/dev/raw/raw8上的30号AU所存储的内容
[grid@jyrac1 ~]$ dd if=/dev/raw/raw8 bs=1048576 skip=30 count=1 | strings
+ASM1.__oracle_base='/u01/app/grid'#ORACLE_BASE set from in memory value
+ASM2.asm_diskgroups='ARCHDG','DATADG'#Manual Dismount
+ASM1.asm_diskgroups='ARCHDG','DATADG','ACFS'#Manual Mount
*.asm_power_limit=1
*.diagnostic_dest='/u01/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.035288 seconds, 29.7 MB/s
KeMQ
jyrac-cluster/asmparameterfile/spfileasm.ora



磁盘/dev/raw/raw8上的30号AU的确是存储的ASM spfile内容


ASM spfile别名块
?新的ASM磁盘头有一个额外的字段,它的元数据块类型为KFBTYP_ASMSPFALS,它用来描述ASM spfile别名。ASM spfile别名存储在ASM spfile所在AU的最后一个块中。下面来查看磁盘/dev/raw/raw8上的30号AU的最一个块255:

首页 上一页 1 2 3 4 下一页 尾页 2/4/4
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Oracle 列数据聚合方法汇总 下一篇Oracle 10gR2 DataGuard搭建(非du..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目