Oracle ASM Partnership and Status Table

Partnership and Status Table(PST)包含了关于磁盘组中所有ASM磁盘的信息,比如,磁盘号,磁盘状态,伙伴磁盘号,心跳信息与故障磁盘组信息(11g及以后版本)。PST跟踪磁盘组的成员关系与磁盘的伙伴关系。ASM为了在mount磁盘组时来判断是否有足够的一组磁盘被online就会咨询PST。每个ASM磁盘中的AU 1被保留给PST使用,但只有某些磁盘有PST数据。

PST count
在任何时候,磁盘组有受限数量的活动PSTs。PSTs的数量是由磁盘组的冗余类型与故障磁盘组数量所决定的。对于外部冗余磁盘组它只有一个PST副本。对于正常冗余磁盘组至少有两个PST副本。如果存在三个或多个故障磁盘组,它将有三个PST副本。对于高冗余磁盘组至少有三个PST副本。如果存在四个故障磁盘组,它将有四个PST副本,并且如果有五个或多个故障磁盘组,它将有五个PST副本。

下面通过例子来说明每种冗余磁盘组所包含的PST数量
1.外部冗余磁盘组

SQL> create diskgroup testdg external redundancy disk '/dev/raw/raw5','/dev/raw/raw6','/dev/raw/raw7','/dev/raw/raw12','/dev/raw/raw13','/dev/raw/raw14';

Diskgroup created.

ASM alert log信息如下:

SQL> create diskgroup testdg external redundancy disk '/dev/raw/raw5','/dev/raw/raw6','/dev/raw/raw7','/dev/raw/raw12','/dev/raw/raw13','/dev/raw/raw14' 
NOTE: Assigning number (4,0) to disk (/dev/raw/raw5)
NOTE: Assigning number (4,1) to disk (/dev/raw/raw6)
NOTE: Assigning number (4,2) to disk (/dev/raw/raw7)
NOTE: Assigning number (4,3) to disk (/dev/raw/raw12)
NOTE: Assigning number (4,4) to disk (/dev/raw/raw13)
NOTE: Assigning number (4,5) to disk (/dev/raw/raw14)
NOTE: initializing header on grp 4 disk TESTDG_0000
NOTE: initializing header on grp 4 disk TESTDG_0001
NOTE: initializing header on grp 4 disk TESTDG_0002
NOTE: initializing header on grp 4 disk TESTDG_0003
NOTE: initializing header on grp 4 disk TESTDG_0004
NOTE: initializing header on grp 4 disk TESTDG_0005
NOTE: initiating PST update: grp = 4
Thu Dec 22 08:51:03 2016
GMON updating group 4 at 16 for pid 30, osid 6861
NOTE: group TESTDG: initial PST location: disk 0000 (PST copy 0)
NOTE: PST update grp = 4 completed successfully 

从上面的信息可以看到只有一个PST副本

2.正常冗余磁盘组

SQL> create diskgroup testdg normal redundancy disk '/dev/raw/raw5','/dev/raw/raw6','/dev/raw/raw7','/dev/raw/raw12','/dev/raw/raw13','/dev/raw/raw14';

Diskgroup created.

ASM alert log信息如下:

SQL> create diskgroup testdg normal redundancy disk '/dev/raw/raw5','/dev/raw/raw6','/dev/raw/raw7','/dev/raw/raw12','/dev/raw/raw13','/dev/raw/raw14' 
NOTE: Assigning number (4,0) to disk (/dev/raw/raw5)
NOTE: Assigning number (4,1) to disk (/dev/raw/raw6)
NOTE: Assigning number (4,2) to disk (/dev/raw/raw7)
NOTE: Assigning number (4,3) to disk (/dev/raw/raw12)
NOTE: Assigning number (4,4) to disk (/dev/raw/raw13)
NOTE: Assigning number (4,5) to disk (/dev/raw/raw14)
NOTE: initializing header on grp 4 disk TESTDG_0000
NOTE: initializing header on grp 4 disk TESTDG_0001
NOTE: initializing header on grp 4 disk TESTDG_0002
NOTE: initializing header on grp 4 disk TESTDG_0003
NOTE: initializing header on grp 4 disk TESTDG_0004
NOTE: initializing header on grp 4 disk TESTDG_0005
Fri Dec 23 08:05:45 2016
GMON updating for reconfiguration, group 4 at 24 for pid 30, osid 6861
NOTE: group 4 PST updated.
NOTE: initiating PST update: grp = 4
GMON updating group 4 at 25 for pid 30, osid 6861
NOTE: group TESTDG: initial PST location: disk 0000 (PST copy 0)
NOTE: group TESTDG: initial PST location: disk 0001 (PST copy 1)
NOTE: group TESTDG: initial PST location: disk 0002 (PST copy 2)
NOTE: PST update grp = 4 completed successfully 

从上面的信息可以看到有三个PST副本

3.高冗余磁盘组

SQL> create diskgroup testdg high redundancy disk '/dev/raw/raw5','/dev/raw/raw6','/dev/raw/raw7','/dev/raw/raw12','/dev/raw/raw13','/dev/raw/raw14';

Diskgroup created.

ASM alert log信息如下:

SQL> create diskgroup testdg high redundancy disk '/dev/raw/raw5','/dev/raw/raw6','/dev/raw/raw7','/dev/raw/raw12','/dev/raw/raw13','/dev/raw/raw14' 
NOTE: Assigning number (4,0) to disk (/dev/raw/raw5)
NOTE: Assigning number (4,1) to disk (/dev/raw/raw6)
NOTE: Assigning number (4,2) to disk (/dev/raw/raw7)
NOTE: Assigning number (4,3) to disk (/dev/raw/raw12)
NOTE: Assigning number (4,4) to disk (/dev/raw/raw13)
NOTE: Assigning number (4,5) to disk (/dev/raw/raw14)
NOTE: initializing header on grp 4 disk TESTDG_0000
NOTE: initializing header on grp 4 disk TESTDG_0001
NOTE: initializing header on grp 4 disk TESTDG_0002
NOTE: initializing header on grp 4 disk TESTDG_0003
NOTE: initializing header on grp 4 disk TESTDG_0004
NOTE: initializing header on grp 4 disk TESTDG_0005
Fri Dec 23 08:18:04 2016
GMON updating for reconfiguration, group 4 at 33 for pid 30, osid 6861
NOTE: group 4 PST updated.
NOTE: initiating PST update: grp = 4
GMON updating group 4 at 34 for pid 30, osid 6861
NOTE: group TESTDG: initial PST location: disk 0000 (PST copy 0)
NOTE: group TESTDG: initial PST location: disk 0001 (PST copy 1)
NOTE: group TESTDG: initial PST location: disk 0002 (PST copy 2)
NOTE: group TESTDG: initial PST location: disk 0003 (PST copy 3)
NOTE: group TESTDG: initial PST location: disk 0004 (PST copy 4)
NOTE: PST update grp = 4 completed successfully 

从上面的信息可以看到有五个PST副本

PST重新定位
在以下情况下PST将会重新定位:
.(在ASM启动时)磁盘的PST不可用
.磁盘脱机
.当对PST执行读/写时出现I/O错误
.磁盘被删除

对于以上情况PST将会被重新定位到相同故障磁盘组的另一个磁盘上(相同故障磁盘组中可用的磁盘上)或另一个故障磁盘组中的磁盘上(哪些不包括PST副本的磁盘)。

例如:

SQL> drop diskgroup testdg;

Diskgroup dropped.

SQL> create diskgroup testdg normal redundancy disk '/dev/raw/raw5','/dev/raw/raw6','/dev/raw/raw7','/dev/raw/raw12','/dev/raw/raw13','/dev/raw/raw14';

Diskgroup created.

ASM alert log信息显示PST副本分布存储在disk 0,1和2:

NOTE: group TESTDG: initial PST location: disk 0000 (PST copy 0)
NOTE: group TESTDG: initial PST location: disk 0001 (PST copy 1)
NOTE: group TESTDG: initial PST location: disk 0002 (PST copy 2)


我们现在来删除disk 0:
SQL> select disk_number, name, path from v$asm_disk_stat where group_number = (select group_number from v$asm_diskgroup_stat where name='TESTDG') order by disk_number asc;

DISK_NUMBER NAME                           PATH
----------- ------------------------------ ------------------------------
          0 TESTDG_0000                    /dev/raw/raw5
          1 TESTDG_0001                    /dev/raw/raw6
          2 TESTDG_0002                    /dev/raw/raw7
          3 TESTDG_0003                    /dev/raw/raw12
          4 TESTDG_0004                    /dev/raw/raw13
          5 TESTDG_0005                    /dev/raw/raw14

6 rows selected.

SQL> alter diskgroup testdg drop disk TESTDG_0000;

Diskgroup altered.

ASM alert log信息

SQL> alter diskgroup testdg drop disk TESTDG_0000 
NOTE: GroupBlock outside rolling migration privileged region
NOTE: requesting all-instance membership refresh for group=4
Fri Dec 23 09:05:37 2016
GMON updating for reconfiguration, group 4 at 50 for pid 30, osid 6861
NOTE: group 4 PST updated.
Fri Dec 23 09:05:38 2016
NOTE: membership refresh pending for group 4/0xce186197 (TESTDG)
GMON querying group 4 at 51 for pid 18, osid 5012
SUCCESS: refreshed membership for 4/0xce186197 (TESTDG)
NOTE: starting rebalance of group 4/0xce186197 (TESTDG) at power 1
SUCCESS: alter diskgroup testdg drop disk TESTDG_0000
Starting background process ARB0
Fri Dec 23 09:05:41 2016
ARB0 started with pid=36, OS id=23811 
NOTE: assigning ARB0 to group 4/0xce186197 (TESTDG) with 1 parallel I/O
cellip.ora not found.
NOTE: F1X0 copy 1 relocating from 0:2 to 4:28 for diskgroup 4 (TESTDG)
Fri Dec 23 09:05:53 2016
NOTE: stopping process ARB0
SUCCESS: rebalance completed for group 4/0xce186197 (TESTDG)
NOTE: Attempting voting file refresh on diskgroup TESTDG
NOTE: Refresh completed on diskgroup TESTDG. No voting file found.
Fri Dec 23 09:05:53 2016
NOTE: GroupBlock outside rolling migration privileged region
NOTE: requesting all-instance membership refresh for group=4
Fri Dec 23 09:05:56 2016
GMON updating for reconfiguration, group 4 at 52 for pid 36, osid 23854
NOTE: group 4 PST updated.
SUCCESS: grp 4 disk TESTDG_0000 emptied
NOTE: erasing header on grp 4 disk TESTDG_0000
NOTE: process _x000_+asm1 (23854) initiating offline of disk 0.3915944465 (TESTDG_0000) with mask 0x7e in group 4
NOTE: initiating PST update: grp = 4, dsk = 0/0xe9689211, mask = 0x6a, op = clear
GMON updating disk modes for group 4 at 53 for pid 36, osid 23854
NOTE: group TESTDG: updated PST location: disk 0001 (PST copy 0)
NOTE: group TESTDG: updated PST location: disk 0002 (PST copy 1)
NOTE: group TESTDG: updated PST location: disk 0003 (PST copy 2)

我们现在来删除disk 0:

SQL> select disk_number, name, path from v$asm_disk_stat where group_number = (select group_number from v$asm_diskgroup_stat where name='TESTDG') order by disk_number asc;

DISK_NUMBER NAME                           PATH
----------- ------------------------------ ------------------------------
          0 TESTDG_0000                    /dev/raw/raw5
          1 TESTDG_0001                    /dev/raw/raw6
          2 TESTDG_0002                    /dev/raw/raw7
          3 TESTDG_0003                    /dev/raw/raw12
          4 TESTDG_0004                    /dev/raw/raw13
          5 TESTDG_0005                    /dev/raw/raw14

6 rows selected.

PST可用性
PST表的数据要先于其他ASM元数据之前可用。当磁盘组被请求mount时,GMON进程(在ASM实例请求mount)会读取磁盘组中的所有磁盘来找到并验证所有可用的PST副本。一旦它验证有足够的PST,就会mount磁盘组。从这个时刻开始,PST表的信息储存在ASM实例的cache里;位于GMON 进程的PGA中,由PT.n.0 enqueue排他锁进行保护。对于同一集群的其他ASM实例,在启动之后会把PST表缓存在自己的GMON PGA中,加上共享的PT.n.0 enqueue。只有拥有排他PT enqueue锁的GMON进程(10gR1中为CKPT),可以更新磁盘中的PST表信息。

PST(GMON)跟踪
每次尝试mount磁盘组时,GMON trace文件就会记录PST信息。注意我说的是尝试,不是已经mount上。换句话说,GMON不管mount动作成功与否,都会记录信息。这些信息对于Oracle Support诊断磁盘组mount失败故障可能会有价值。
下面查看GMON trace文件记录的testdg磁盘组mount的信息:

[grid@jyrac1 trace]$ ls -lrt *gmon*
-rw-r----- 1 grid oinstall    276 Nov 22 18:25 +ASM1_gmon_21379.trm
-rw-r----- 1 grid oinstall   9953 Nov 22 18:25 +ASM1_gmon_21379.trc
-rw-r----- 1 grid oinstall    631 Nov 23 07:57 +ASM1_gmon_22366.trm
-rw-r----- 1 grid oinstall  26275 Nov 23 07:57 +ASM1_gmon_22366.trc
-rw-r----- 1 grid oinstall    809 Nov 24 09:01 +ASM1_gmon_4906.trm
-rw-r----- 1 grid oinstall  41769 Nov 24 09:01 +ASM1_gmon_4906.trc
-rw-r----- 1 grid oinstall    263 Nov 24 09:06 +ASM1_gmon_18658.trm
-rw-r----- 1 grid oinstall  17305 Nov 24 09:06 +ASM1_gmon_18658.trc
-rw-r----- 1 grid oinstall    256 Nov 24 09:12 +ASM1_gmon_20072.trm
-rw-r----- 1 grid oinstall  17274 Nov 24 09:12 +ASM1_gmon_20072.trc
-rw-r----- 1 grid oinstall    263 Nov 24 09:14 +ASM1_gmon_20707.trm
-rw-r----- 1 grid oinstall  17300 Nov 24 09:14 +ASM1_gmon_20707.trc
-rw-r----- 1 grid oinstall    332 Nov 24 09:26 +ASM1_gmon_22827.trm
-rw-r----- 1 grid oinstall  17595 Nov 24 09:26 +ASM1_gmon_22827.trc
-rw-r----- 1 grid oinstall    262 Nov 24 09:48 +ASM1_gmon_26737.trm
-rw-r----- 1 grid oinstall  15829 Nov 24 09:48 +ASM1_gmon_26737.trc
-rw-r----- 1 grid oinstall   2175 Dec 14 16:57 +ASM1_gmon_4909.trm
-rw-r----- 1 grid oinstall 178545 Dec 14 16:57 +ASM1_gmon_4909.trc
-rw-r----- 1 grid oinstall   1616 Dec 23 09:05 +ASM1_gmon_5014.trm
-rw-r----- 1 grid oinstall 135047 Dec 23 09:05 +ASM1_gmon_5014.trc
[grid@jyrac1 trace]$ cat +ASM1_gmon_5014.trc
*** 2016-12-23 09:05:56.534
GMON updating disk modes for group 4 at 53 for pid 36, osid 23854
  dsk = 0/0xe9689211, mask = 0x6a, op = clear
PRE
=============== PST ==================== 
grpNum:    4 
state:     1 
callCnt:   53 
(lockvalue) valid=1 ver=1.1 ndisks=3 flags=0x0 from inst=1 (I am 1) last=4
(lockvalue) dsks: 0 1 2
--------------- HDR -------------------- 
next: 	 4 
last: 	 4 
pst count: 	 3 
pst locations: 	 0  1  2 
incarn:   	 1 
dta size: 	 6 
version: 	 0 
ASM version: 	 168820736 = 10.1.0.0.0
contenttype: 	 0
partnering pattern: 	 [ ]
--------------- LOC MAP ---------------- 
0: dirty 0 	 cur_loc: 0 	 stable_loc: 0
1: dirty 0 	 cur_loc: 1 	 stable_loc: 1
--------------- DTA -------------------- 
0: sts v v(rw) p(rw) a(x) d(x) fg# = 0 addTs = 0 parts: 
1: sts v v(rw) p(rw) a(x) d(x) fg# = 0 addTs = 0 parts: 2 (amp) 3 (amp) 4 (amp) 5 (amp) 
2: sts v v(rw) p(rw) a(x) d(x) fg# = 0 addTs = 0 parts: 1 (amp) 3 (amp) 4 (amp) 5 (amp) 
3: sts v v(rw) p(rw) a(x) d(x) fg# = 0 addTs = 0 parts: 1 (amp) 2 (amp) 4 (amp) 5 (amp) 
4: sts v v(rw) p(rw) a(x) d(x) fg# = 0 addTs = 0 parts: 1 (amp) 2 (amp) 3 (amp) 5 (amp) 
5: sts v v(rw) p(rw) a(x) d(x) fg# = 0 addTs = 0 parts: 1 (amp) 2 (amp) 3 (amp) 4 (amp) 

=== PST ===标记的部分显示了磁盘组号(grpNum),状态,例如grpNum: 4 说明磁盘组号为4,就是testdg磁盘组

SQL> select group_number,name,block_size,allocation_unit_size,state,type from v$asm_diskgroup where group_number=4;

GROUP_NUMBER NAME                           BLOCK_SIZE ALLOCATION_UNIT_SIZE STATE                  TYPE
------------ ------------------------------ ---------- -------------------- ---------------------- ------------
           4 TESTDG                               4096              1048576 MOUNTED                NORMAL

— HDR —标记的部分显示了PST的副本数(pst count)和所在的磁盘号,例如这里显示了有3个PST,分别存储在disk

0000,0001,0002
pst count: 	 3 
pst locations: 	 0  1  2 

— DTA —显示了PST所在磁盘的状态

0: sts v v(rw) p(rw) a(x) d(x) fg# = 0 addTs = 0 parts: 
1: sts v v(rw) p(rw) a(x) d(x) fg# = 0 addTs = 0 parts: 2 (amp) 3 (amp) 4 (amp) 5 (amp) 
2: sts v v(rw) p(rw) a(x) d(x) fg# = 0 addTs = 0 parts: 1 (amp) 3 (amp) 4 (amp) 5 (amp) 
3: sts v v(rw) p(rw) a(x) d(x) fg# = 0 addTs = 0 parts: 1 (amp) 2 (amp) 4 (amp) 5 (amp) 
4: sts v v(rw) p(rw) a(x) d(x) fg# = 0 addTs = 0 parts: 1 (amp) 2 (amp) 3 (amp) 5 (amp) 
5: sts v v(rw) p(rw) a(x) d(x) fg# = 0 addTs = 0 parts: 1 (amp) 2 (amp) 3 (amp) 4 (amp) 

可以看到PST副本所在磁盘从原来的disk 0000,disk 0001,disk 0002变成了现在的disk 0001,disk 0002,disk 0003了。我们也可以使用kfed来验证PST只存在于testdg磁盘组中的disk 0001,disk 0002,disk 0003的三块磁盘上

SQL> select disk_number, name, path from v$asm_disk_stat where group_number = (select group_number from v$asm_diskgroup_stat where name='TESTDG') order by disk_number asc;

DISK_NUMBER NAME                           PATH
----------- ------------------------------ ------------------------------
          1 TESTDG_0001                    /dev/raw/raw6
          2 TESTDG_0002                    /dev/raw/raw7
          3 TESTDG_0003                    /dev/raw/raw12
          4 TESTDG_0004                    /dev/raw/raw13
          5 TESTDG_0005                    /dev/raw/raw14

testdg中的disk 0001,0002,0003对应的磁盘就是/dev/raw/raw6,7,12:

[grid@jyrac1 trace]$ kfed read /dev/raw/raw6 aun=1 blkn=0 | grep type
kfbh.type:                           17 ; 0x002: KFBTYP_PST_META
[grid@jyrac1 trace]$ kfed read /dev/raw/raw6 aun=1 blkn=1 | grep type
kfbh.type:                           17 ; 0x002: KFBTYP_PST_META
[grid@jyrac1 trace]$ kfed read /dev/raw/raw6 aun=1 blkn=2 | grep type
kfbh.type:                           18 ; 0x002: KFBTYP_PST_DTA
[grid@jyrac1 trace]$ kfed read /dev/raw/raw6 aun=1 blkn=3 | grep type
kfbh.type:                           18 ; 0x002: KFBTYP_PST_DTA
[grid@jyrac1 trace]$ kfed read /dev/raw/raw6 aun=1 blkn=4 | grep type
kfbh.type:                           13 ; 0x002: KFBTYP_PST_NONE

从上面的信息可以看到在磁盘的au 1都是用来存储PST。其中块(块号从0开始)1,2用来存储的PST元数据,块3,4用来存储的PST数据,还可以看到块5没有存储任何数据,下面的磁盘/dev/raw/raw7,12的情况与/dev/raw/raw6是一样的

[grid@jyrac1 trace]$ kfed read /dev/raw/raw7 aun=1 blkn=0 | grep type
kfbh.type:                           17 ; 0x002: KFBTYP_PST_META
[grid@jyrac1 trace]$ kfed read /dev/raw/raw7 aun=1 blkn=1 | grep type
kfbh.type:                           17 ; 0x002: KFBTYP_PST_META
[grid@jyrac1 trace]$ kfed read /dev/raw/raw7 aun=1 blkn=2 | grep type
kfbh.type:                           18 ; 0x002: KFBTYP_PST_DTA
[grid@jyrac1 trace]$ kfed read /dev/raw/raw7 aun=1 blkn=3 | grep type
kfbh.type:                           18 ; 0x002: KFBTYP_PST_DTA
[grid@jyrac1 trace]$ kfed read /dev/raw/raw7 aun=1 blkn=4 | grep type
kfbh.type:                           13 ; 0x002: KFBTYP_PST_NONE
[grid@jyrac1 trace]$ kfed read /dev/raw/raw12 aun=1 blkn=0 | grep type
kfbh.type:                           17 ; 0x002: KFBTYP_PST_META
[grid@jyrac1 trace]$ kfed read /dev/raw/raw12 aun=1 blkn=1 | grep type
kfbh.type:                           17 ; 0x002: KFBTYP_PST_META
[grid@jyrac1 trace]$ kfed read /dev/raw/raw12 aun=1 blkn=2 | grep type
kfbh.type:                           18 ; 0x002: KFBTYP_PST_DTA
[grid@jyrac1 trace]$ kfed read /dev/raw/raw12 aun=1 blkn=3 | grep type
kfbh.type:                           18 ; 0x002: KFBTYP_PST_DTA
[grid@jyrac1 trace]$ kfed read /dev/raw/raw12 aun=1 blkn=4 | grep type
kfbh.type:                           13 ; 0x002: KFBTYP_PST_NONE

从下面的信息可以看到disk 0004,0005对应的/dev/raw/raw13,14的AU 1中没有存储PST相关数据。

[grid@jyrac1 trace]$ kfed read /dev/raw/raw13 aun=1 blkn=0 | grep type
kfbh.type:                           13 ; 0x002: KFBTYP_PST_NONE
[grid@jyrac1 trace]$ kfed read /dev/raw/raw14 aun=1 blkn=0 | grep type
kfbh.type:                           13 ; 0x002: KFBTYP_PST_NONE

查看PST元数据

[grid@jyrac1 trace]$ kfed read /dev/raw/raw6 aun=1 blkn=0 | more
kfbh.endian:                          1 ; 0x000: 0x01 --0 表示big endian,1 表示little endian.
kfbh.hard:                          130 ; 0x001: 0x82 --表示HARD magic number
kfbh.type:                           17 ; 0x002: KFBTYP_PST_META --表示PST元数据块
kfbh.datfmt:                          1 ; 0x003: 0x01 --表示元数据块格式
kfbh.block.blk:                     256 ; 0x004: blk=256 --表示块号,那为什么这里是256,因为AU的大小是1M,块大小是4K,一个AU包含256个块,而块号是从0开始,第一个AU(AU 0)的最大块号就是255,那么第二个AU(AU 1)的第一个块的块号就是256
kfbh.block.obj:              2147483649 ; 0x008: disk=1 
kfbh.check:                  2539674092 ; 0x00c: 0x976059ec --做校验用的,check一致性
kfbh.fcn.base:                        0 ; 0x010: 0x00000000
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kfdpHdrBv0.time.hi:            33043177 ; 0x000: HOUR=0x9 DAYS=0x17 MNTH=0xc YEAR=0x7e0 --最后一次pst元数据的更新时间,精确到小时
kfdpHdrBv0.time.lo:           395175936 ; 0x004: USEC=0x0 MSEC=0x37a SECS=0x38 MINS=0x5 --最后一次pst元数据的更新时间,精确到微秒
kfdpHdrBv0.last:                      7 ; 0x008: 0x00000007 --最新的disk版本号
kfdpHdrBv0.next:                      7 ; 0x00c: 0x00000007 --下一个disk版本号
kfdpHdrBv0.copyCnt:                   3 ; 0x010: 0x03 --表示PST元数据的备份信息,3表示磁盘组是normal冗余。1表示磁盘组是external冗余。
kfdpHdrBv0.version:                   0 ; 0x011: 0x00
kfdpHdrBv0.ub2spare:                  0 ; 0x012: 0x0000
kfdpHdrBv0.incarn:                    4 ; 0x014: 0x00000004
kfdpHdrBv0.copy[0]:                   1 ; 0x018: 0x0001
kfdpHdrBv0.copy[1]:                   2 ; 0x01a: 0x0002
kfdpHdrBv0.copy[2]:                   3 ; 0x01c: 0x0003
kfdpHdrBv0.copy[3]:                   0 ; 0x01e: 0x0000
kfdpHdrBv0.copy[4]:                   0 ; 0x020: 0x0000
kfdpHdrBv0.dtaSz:                     6 ; 0x022: 0x0006 --表示pst元数据中,diskgroup所包含的disk个数
ub1[0]:                               0 ; 0x024: 0x00
ub1[1]:                               0 ; 0x025: 0x00
ub1[2]:                               0 ; 0x026: 0x00
ub1[3]:                               0 ; 0x027: 0x00
ub1[4]:                               0 ; 0x028: 0x00
ub1[5]:                               0 ; 0x029: 0x00
ub1[6]:                               0 ; 0x02a: 0x00
ub1[7]:                               0 ; 0x02b: 0x00
ub1[8]:                               0 ; 0x02c: 0x00
ub1[9]:                               0 ; 0x02d: 0x00
ub1[10]:                              0 ; 0x02e: 0x00
ub1[11]:                              0 ; 0x02f: 0x00
ub1[12]:                              0 ; 0x030: 0x00
ub1[13]:                              0 ; 0x031: 0x00
ub1[14]:                              0 ; 0x032: 0x00
ub1[15]:                              0 ; 0x033: 0x00
ub1[16]:                              0 ; 0x034: 0x00
ub1[17]:                              0 ; 0x035: 0x00
ub1[18]:                              0 ; 0x036: 0x00

磁盘伙伴
磁盘的Partnership是在normal或者high冗余的磁盘组上,在两个磁盘之间有一个“对称”的关系。在external冗余中,不存在disk partnership。

小结
PST(Partnership and Status Table)包含一个磁盘组里所有磁盘的相关信息 — 磁盘号,磁盘状态,partner磁盘号,心跳信息和failgroup信息(11g之后)。每个ASM磁盘的第二AU(AU 1)被保留给PST使用,但是只有部分磁盘有PST数据。由于PST是重要的ASM元数据,只要故障磁盘组个数足够,在normal冗余中将会有三副本,在high冗余中将会有五副本。

发表评论

电子邮件地址不会被公开。