博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
oracle Grid 是如何找到voteidks和asm spfile.
阅读量:6966 次
发布时间:2019-06-27

本文共 4427 字,大约阅读时间需要 14 分钟。

grid 版本:11.2.0.4.0

GPnP profile

Gpnp profile文件是一个xml文件,它存储的位置是在$GRID_HOME/gpnp/profile/peer/profile.xml当集群启动的时候,Cluster Synchronization Services (CSS)将扫描所有的ASM disks,它利用的是GPnP profile文件中的ASM discovery string.如下所示:
gpnptool工具可以查看gpmp pfofile 内容:[grid@prod01 ~]$ gpnptool get -o-
omBcXU12u7D2rNJWiLbiRlEenpU=
GdjloSdmpnW0iuhLVAmR9bhQknVPxAvVuVpOVaQR3ZZO35ff164e9QYlXtQgfL2/63fA/YwpeQhi8uwMtqEjddFaFw8wCxm8RyMOa+6WcCMMBceIycgTNaMMnw93hGcmrYYClh3lt+2ACV3gkcjB3VTB82WfZEvvvcTZ1OTukVk=
Success.

定位votedisk

CSSD scans the headers of all ASM disks ( as indicated in ASM_DISKSTRING in GPnP profile) to identify the disk containing the voting file. Using the pointers in ASM disk headers, the Voting Files locations on ASM Disks are accessed by CSSD and CSSD is able to complete initialization and start or join an existing cluster.

css通过gpnp profile 文件的DiscoveryString确定votedisk 发现路径,然后扫描该路径下的磁盘的磁盘头信息。

kfdhdb.vfstart 是votedisk开始AU的偏移量,kfdhdb.vfend是votedisk结束AU偏移量。通过这2个值确定vd文件的位置

[grid@prod01 dev]$ kfed read /dev/asm-diskb |grep -E 'vf|au'kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000kfdhdb.vfstart:                     256 ; 0x0ec: 0x00000100kfdhdb.vfend:                       288 ; 0x0f0: 0x00000120[grid@prod01 dev]$ kfed read /dev/asm-diskc |grep -E 'vf|au'kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000kfdhdb.vfstart:                     256 ; 0x0ec: 0x00000100kfdhdb.vfend:                       288 ; 0x0f0: 0x00000120[grid@prod01 dev]$ kfed read /dev/asm-diskd |grep -E 'vf|au'kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000kfdhdb.vfstart:                     256 ; 0x0ec: 0x00000100kfdhdb.vfend:                       288 ; 0x0f0: 0x00000120[grid@prod01 dev]$ kfed read /dev/asm-test01 |grep -E 'vf|au'kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000kfdhdb.vfstart:                       0 ; 0x0ec: 0x00000000kfdhdb.vfend:                         0 ; 0x0f0: 0x00000000[grid@prod01 dev]$ kfed read /dev/asm-test02 |grep -E 'vf|au'kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000kfdhdb.vfstart:                       0 ; 0x0ec: 0x00000000kfdhdb.vfend:                         0 ; 0x0f0: 0x00000000

定位asm spfile

通过kfdhdb.spfile,kfdhdb.spfflg标志确定asm spfile 位置,启动asm实例。

kfdhdb.spfile:Allocation unit number of the ASM spfile. Version 11.2 and later only.kfdhdb.spfflg:ASM spfile flag. If this is 1, the ASM spfile is on this disk in allocation unit kfdhdb.spfile. Version 11.2 and later only.
[grid@prod01 dev]$ kfed read /dev/asm-diskb |grep -E 'spf|au'kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000kfdhdb.spfile:                       59 ; 0x0f4: 0x0000003bkfdhdb.spfflg:                        1 ; 0x0f8: 0x00000001[grid@prod01 dev]$ kfed read /dev/asm-diskc |grep -E 'spf|au'kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000kfdhdb.spfile:                        0 ; 0x0f4: 0x00000000kfdhdb.spfflg:                        0 ; 0x0f8: 0x00000000[grid@prod01 dev]$ kfed read /dev/asm-diskd |grep -E 'spf|au'kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000kfdhdb.spfile:                       59 ; 0x0f4: 0x0000003bkfdhdb.spfflg:                        1 ; 0x0f8: 0x00000001[grid@prod01 dev]$ asmcmdlASMCMD> sdgState    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  NameMOUNTED  NORMAL  N         512   4096  1048576     15360    14434             5120            4657              0             Y  DATA/MOUNTED  EXTERN  N         512   4096  1048576      6144     6047                0            6047              0             N  DG1/ASMCMD> exit[grid@prod01 dev]$ asmcmd spget+DATA/prod-cluster/asmparameterfile/registry.253.990525365When an Oracle ASM instance searches for an initialization parameter file, the search order is:The location of the initialization parameter file specified in the Grid Plug and Play (GPnP) profileIf the location has not been set in the GPnP profile, then the search order changes to:SPFILE in the Oracle ASM instance homeFor example, the SPFILE for Oracle ASM has the following default path in the Oracle Grid Infrastructure home in a Linux environment:$ORACLE_HOME/dbs/spfile+ASM.oraPFILE in the Oracle ASM instance home

转载地址:http://elbsl.baihongyu.com/

你可能感兴趣的文章
React Native 项目简单整理-组件优化
查看>>
IOS 百度地图获取当前屏幕的经纬度
查看>>
smartrpc编译构建
查看>>
自动输入runas密码的方法
查看>>
Quartz2.2.1开发问题
查看>>
Win8 快捷键
查看>>
WINCE开发中,EBOOT模式下,TFTP方式无法下载NK镜像的问题解决方案
查看>>
实体映射基础(二)
查看>>
poj 2677 tour
查看>>
设计模式之模板方法模式
查看>>
lm-sensors工具安装和使用
查看>>
CI查询绑定
查看>>
FLASH基础概念 [一]
查看>>
产品力挺PHP完爆Java
查看>>
朴素贝叶斯分类器的应用-转载加我的理解注释
查看>>
与内存对齐,字符数组求sizeof相关的一些问题
查看>>
drbd
查看>>
ORACLE11G 将dataguard的rman备份恢复到测试环境的单机oracle中的详细过程
查看>>
gevent-zookeeper for windows
查看>>
php csv文件的读取,写入,输出下载操作详解
查看>>