4种查询vot的方法和4种查询ocr的方法

联系:QQ(5163721)

标题:4种查询vot的方法和4种查询ocr的方法

作者:Lunar©版权所有[文章允许转载,但必须以链接方式注明源地址,否则追究法律责任.]

一、查找voting disk 的4种方法
方法1:


[root@RAC1 ~]#  crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   983f5a2d804d4f81bfddc68e5bcf6e65 (/dev/asm-diskc) [DATA]
Located 1 voting disk(s).
[root@RAC1 ~]# 

方法2:


[grid@RAC1 ~]$ asmcmd dsget
parameter:/dev/asm*
profile:/dev/asm*
[grid@RAC1 ~]$ 

方法3:


[grid@RAC1 ~]$ gpnptool get
Warning: some command line parameters were defaulted. Resulting command line: 
         /u01/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="4" ClusterUId="4c62524e6a7dff62ffdae005dc6a08d6" ClusterName="racdb" PALocation=""><gpnp:Network-Profile><gpnp:HostNetwork id="gen" HostName="*"><gpnp:Network id="net1" IP="192.168.56.0" Adapter="eth0" Use="public"/><gpnp:Network id="net2" IP="192.168.88.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="+DATA/racdb/asmparameterfile/registry.253.814453247"/><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>NMq7bQ3EHBa9wKwma65k60q9+lo=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>hkf1TmKQMdERaBHuHx57vN/GxywzzxuZn0FjO0WqYpFWquF2mc+Pu0isVUHLvdhxzJ1snDmP+vVZ5V8Q1aaBi2KctXvHS1d81mY9PlXj47+/wIy38qZtg0vmazXscDG7rVfQb3jCtpa9vWE7S4Lq9p9Jq73emHvHk9FeTzYAs18=</ds:SignatureValue></ds:Signature></gpnp:GPnP-Profile>
Success.
[grid@RAC1 ~]$ 

方法4:


[grid@RAC1 ~]$ kfed dev=/dev/asm-diskc op=READ | egrep "kfdhdb.vf|ausize"
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000
kfdhdb.vfstart:                     192 ; 0x0ec: 0x000000c0
kfdhdb.vfend:                       224 ; 0x0f0: 0x000000e0
[grid@RAC1 ~]$ 

这里可以看到au是1M,voting disk从AU 192开始,到AU 224结束,共32个AU :


[grid@RAC1 ~]$ dd if=/dev/asm-diskc bs=1M skip=192 count=32 | od -c > /tmp/vote.out
32+0 records in
32+0 records out
33554432 bytes (34 MB) copied, 1.30292 seconds, 25.8 MB/s
[grid@RAC1 ~]$ 

跳过了头上的192M,dump了后面的32M内容,也就是我们需要的VOTING DISK的32个AU的内容

二、查找ocr的方法
方法1:


[grid@RAC1 ~]$ cat /etc/oracle/ocr.loc
ocrconfig_loc=+DATA
local_only=FALSE
[grid@RAC1 ~]$ 

方法2:


[grid@RAC1 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3056
         Available space (kbytes) :     259064
         ID                       : 1280092817
         Device/File Name         :      +DATA
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check bypassed due to non-privileged user

[grid@RAC1 ~]$ 

方法3: ocrdump

方法4:


set lines 120
set pages 100
column name format a40 wra
column type format a10 tru
select af.group_number, af.file_number, aa.name, af.type, af.redundancy
from v$asm_file af, v$asm_alias aa
where aa.file_number = af.file_number and aa.group_number=af.group_number and af.type = 'OCRFILE' ;

SYS% racdb1> select af.group_number, af.file_number, aa.name, af.type, af.redundancy
  2  from v$asm_file af, v$asm_alias aa
  3  where aa.file_number = af.file_number and aa.group_number=af.group_number and af.type = 'OCRFILE' ;

GROUP_NUMBER FILE_NUMBER NAME                                     TYPE       REDUND
------------ ----------- ---------------------------------------- ---------- ------
           2         255 REGISTRY.255.814453249                   OCRFILE    UNPROT

Elapsed: 00:00:08.70
SYS% racdb1> 

这里看到ocr的文件号是255,可以根据文件号查询AU:


SQL> set lines 120
SQL> set pages 100
SQL> column name format a40 wra
SQL> column type format a10 tru
SQL> select af.group_number, af.file_number, aa.name, af.type, af.redundancy
  2  from v$asm_file af, v$asm_alias aa
  3  where aa.file_number = af.file_number and aa.group_number=af.group_number and af.type = 'OCRFILE' ;


GROUP_NUMBER FILE_NUMBER NAME                                     TYPE       REDUND
------------ ----------- ---------------------------------------- ---------- ------
           2         255 REGISTRY.255.814453249                   OCRFILE    UNPROT

SQL>
SQL> select NUMBER_KFFXP, XNUM_KFFXP, DISK_KFFXP, AU_KFFXP from X$KFFXP where NUMBER_KFFXP = 255;

NUMBER_KFFXP XNUM_KFFXP DISK_KFFXP   AU_KFFXP
------------ ---------- ---------- ----------
         255          0          1         29
         255          1          0         32
         255          2          1         30
         255          3          0         33
         255          4          1         31
         255          5          0         34
         255          6          1         32
         255          7          0         35
         255          8          1         33
         255          9          0         36
         255         10          1         34
         255         11          0         37
         255         12          1         35
         255         13          0         38
         255         14          1         36
         255         15          0         39
         255         16          1         37
         255         17          0         40
         255         18          1         38
         255         19          0         41
         255         20          1         39
         255         21          0         42
         255         22          1         40
         255         23          0         43
         255         24          1         41
         255         25          0         44
         255         26          1         42
         255         27          0         45
         255         28          1         43
         255         29          0         46
         255         30          1         44
         255         31          0         47
         255         32          1         45
         255         33          0         48
         255         34          1         46
         255         35          0         49
         255         36          1         47
         255         37          0         50
         255         38          1         48
         255         39          0         51
         255         40          1         49
         255         41          0         52
         255         42          1         50
         255         43          0         53
         255         44          1         51
         255         45          0         54
         255         46          1         52
         255         47          0         55
         255         48          1         53
         255         49          0         56
         255         50          1         54
         255         51          0         57
         255         52          1         55
         255         53          0         58
         255         54          1         56
         255         55          0         59
         255         56          1         57
         255         57          0         60
         255         58          1         58
         255         59          0         61
         255         60          1         59
         255         61          0         63
         255         62          1         60
         255         63          0         64
         255         64          1         61
         255         65          0         65
         255         66          1         62
         255         67          0         66
         255         68          1         63
         255         69          0         67
         255         70          1         64
         255         71          0         68
         255         72          1         65
         255         73          0         69
         255         74          1         66
         255         75          0         70
         255         76          1         67
         255         77          0         71
         255         78          1         68
         255         79          0         72
         255         80          1         69
         255         81          0         73
         255         82          1         70
         255         83          0         74
         255         84          1         71
         255         85          0         75
         255         86          1         72
         255         87          0         76
         255         88          1         73
         255         89          0         77
         255         90          1         74
         255         91          0         78
         255         92          1         75
         255         93          0         79
         255         94          1         76
         255         95          0         80
         255         96          1         77

NUMBER_KFFXP XNUM_KFFXP DISK_KFFXP   AU_KFFXP
------------ ---------- ---------- ----------
         255         97          0         81
         255         98          1         78
         255         99          0         82
         255        100          1         79
         255        101          0         83
         255        102          1         80
         255        103          0         84
         255        104          1         81
         255        105          0         85
         255        106          1         82
         255        107          0         86
         255        108          1         83
         255        109          0         87
         255        110          1         84
         255        111          0         88
         255        112          1         85
         255        113          0         89
         255        114          1         86
         255        115          0         90
         255        116          1         87
         255        117          0         91
         255        118          1         88
         255        119          0         92
         255        120          1         89
         255        121          0         93
         255        122          1         90
         255        123          0         94
         255        124          1         91
         255        125          0         95
         255        126          1         92
         255        127          0         96
         255        128          1         93
         255        129          0         97
         255        130          1         94
         255        131          0         98
         255        132          1         95
         255        133          0         99
         255        134          1         96
         255        135          0        100
         255        136          1         97
         255        137          0        101
         255        138          1         98
         255        139          0        102
         255        140          1         99
         255        141          0        103
         255        142          1        100
         255        143          0        104
         255        144          1        101
         255        145          0        105
         255        146          1        102
         255        147          0        106
         255        148          1        103
         255        149          0        107
         255        150          1        104
         255        151          0        108
         255        152          1        105
         255        153          0        109
         255        154          1        106
         255        155          0        110
         255        156          1        107
         255        157          0        111
         255        158          1        108
         255        159          0        112
         255        160          1        109
         255        161          0        113
         255        162          1        110
         255        163          0        114
         255        164          1        111
         255        165          0        115
         255        166          1        112
         255        167          0        116
         255        168          1        113
         255        169          0        117
         255        170          1        114
         255        171          0        118
         255        172          1        115
         255        173          0        119
         255        174          1        116
         255        175          0        120
         255        176          1        117
         255        177          0        121
         255        178          1        118
         255        179          0        122
         255        180          1        119
         255        181          0        123
         255        182          1        120
         255        183          0        124
         255        184          1        121
         255        185          0        125
         255        186          1        122
         255        187          0        126
         255        188          1        123
         255        189          0        127
         255        190          1        124
         255        191          0        128
         255        192          1        125
         255        193          0        129

NUMBER_KFFXP XNUM_KFFXP DISK_KFFXP   AU_KFFXP
------------ ---------- ---------- ----------
         255        194          1        126
         255        195          0        130
         255        196          1        127
         255        197          0        131
         255        198          1        128
         255        199          0        132
         255        200          1        129
         255        201          0        133
         255        202          1        130
         255        203          0        134
         255        204          1        131
         255        205          0        135
         255        206          1        132
         255        207          0        136
         255        208          1        133
         255        209          0        137
         255        210          1        134
         255        211          0        138
         255        212          1        135
         255        213          0        139
         255        214          1        136
         255        215          0        140
         255        216          1        137
         255        217          0        141
         255        218          1        138
         255        219          0        142
         255        220          1        139
         255        221          0        143
         255        222          1        140
         255        223          0        144
         255        224          1        141
         255        225          0        145
         255        226          1        142
         255        227          0        146
         255        228          1        143
         255        229          0        147
         255        230          1        144
         255        231          0        148
         255        232          1        145
         255        233          0        149
         255        234          1        146
         255        235          0        150
         255        236          1        147
         255        237          0        151
         255        238          1        148
         255        239          0        152
         255        240          1        149
         255        241          0        153
         255        242          1        150
         255        243          0        154
         255        244          1        151
         255        245          0        155
         255        246          1        152
         255        247          0        156
         255        248          1        153
         255        249          0        157
         255        250          1        154
         255        251          0        158
         255        252          1        155
         255        253          0        159
         255        254          1        156
         255        255          0        160
         255        256          1        157
         255        257          0        161
         255        258          1        158
         255        259          0        162
         255        260          1        159
         255 2147483648          0         62

262 rows selected.

SQL> 

此条目发表在 ASM, RAC 分类目录,贴了 , , 标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注