Oracle ASM Partnership and Status Table

eric0435發表於2016-12-23

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冗餘中將會有五副本。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26015009/viewspace-2131287/,如需轉載,請註明出處,否則將追究法律責任。

相關文章