normal redundancy Diskgroup裡required_mirror_free_mb值的變化規律
環境:Oracle 11g R2 GI Standalone Server
實驗目的:v$asm_diskgroup. REQUIRED_MIRROR_FREE_MB值隨不同的Failgroup策略所組成的Normal Redundancy Diskgroup而變化的規律,關於REQUIRED_MIRROR_FREE_MB的取值ASM Guide中是這樣定義的,強調了是在不加儲存的情況下為了能restore redundancy所必須留出的空閒容量:
REQUIRED_MIRROR_FREE_MB indicates the amount of space that must be available in a disk group to restore full redundancy after the worst failure that can be tolerated by the disk group without adding additional storage
ASM disk包括5塊hdiskpower:
/dev/rhdiskpower5 0DCB 09C:1 16B:C10 2-Way Mir N/Grp'd (M) RW 46478
/dev/rhdiskpower6 0DCF 09C:1 01D:D4 2-Way Mir N/Grp'd (M) RW 46478
/dev/rhdiskpower7 0DD3 09C:1 02C:DA 2-Way Mir N/Grp'd (M) RW 46478
/dev/rhdiskpower8 0DD7 09C:1 16A:D12 2-Way Mir N/Grp'd (M) RW 46478
/dev/rhdiskpower9 0DDB 09C:1 16D:D1 2-Way Mir N/Grp'd (M) RW 46478
場景1:兩個Failgroup,每個Failgroup一塊磁碟
create diskgroup chhdg1 normal redundancy disk '/dev/rhdiskpower5','/dev/rhdiskpower6' attribute 'compatible.asm'='11.2.0.0.0';
select * from v$asm_diskgroup where name='CHHDG1' --required_mirror_free_mb值為0
GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB HOT_USED_MB COLD_USED_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB OFFLINE_DISKS COMPATIBILITY DATABASE_COMPATIBILITY VOTING_FILES
1 CHHDG1 512 4096 1048576 MOUNTED NORMAL 92954 92848 0 106 0 46424 0 11.2.0.0.0 10.1.0.0.0 N
結論:一共只有兩塊盤,壞掉一塊只剩一塊,無論如何都無法實現normal redundancy,REQUIRED_MIRROR_FREE_MB=0
場景2:兩個Failgroup,第一個Failgroup一塊磁碟,第二個Failgroup兩塊磁碟
drop diskgroup chhdg1;
create diskgroup chhdg1 normal redundancy disk '/dev/rhdiskpower5' failgroup fg1 disk '/dev/rhdiskpower6', '/dev/rhdiskpower7' attribute 'compatible.asm'='11.2.0.0.0';
select * from v$asm_diskgroup where name='CHHDG1' --required_mirror_free_mb值為最小的那個failgroup大小
GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB HOT_USED_MB COLD_USED_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB OFFLINE_DISKS COMPATIBILITY DATABASE_COMPATIBILITY VOTING_FILES
1 CHHDG1 512 4096 1048576 MOUNTED NORMAL 139431 139323 0 108 46477 46423 0 11.2.0.0.0 10.1.0.0.0 N
結論:兩個Failgroup是比較特殊的情況, Oracle文件中只提及Normal redundancy disk group with more than two failure groups的情況下會以最大的那個Failgroup大小作為REQUIRED_MIRROR_FREE_MB的值。在此例中可以看到兩個Failgroup 的情況下,以最小的那個Failgroup作為REQUIRED_MIRROR_FREE_MB的取值,所有兩個Failgroup組成的normal redundancy diskgroup對應的REQUIRED_MIRROR_FREE_MB取值一定都是一塊盤的大小。
場景3:兩個Failgroup,每個Failgroup各兩塊磁碟
drop diskgroup chhdg1;
create diskgroup chhdg1 normal redundancy failgroup fg1 disk '/dev/rhdiskpower5','/dev/rhdiskpower6' failgroup fg2 disk '/dev/rhdiskpower7','/dev/rhdiskpower8' attribute 'compatible.asm'='11.2.0.0.0';
select * from v$asm_diskgroup where name='CHHDG1'
GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB HOT_USED_MB COLD_USED_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB OFFLINE_DISKS COMPATIBILITY DATABASE_COMPATIBILITY VOTING_FILES
1 CHHDG1 512 4096 1048576 MOUNTED NORMAL 185908 185798 0 110 46477 69660 0 11.2.0.0.0 10.1.0.0.0 N
結論:required_mirror_free_mb值為最小的那個failgroup裡一塊盤的大小,之所以不是整個failgroup的大小,REQUIRED_MIRROR_FREE_MB 的值代表了不增加額外儲存的情況下能達到的容錯效果,所以在最保守的情況下當然是能夠在一塊盤Fail的情況下restore redundancy。
場景4:兩個Failgroup,第一個Failgroup兩塊磁碟,第二個Failgroup三塊磁碟
SQL> drop diskgroup chhdg1;
Diskgroup dropped.
SQL> create diskgroup chhdg1 normal redundancy failgroup fg1 disk '/dev/rhdiskpower5','/dev/rhdiskpower6' failgroup fg2 disk '/dev/rhdiskpower7','/dev/rhdiskpower8','/dev/rhdiskpower9' attribute 'compatible.asm'='11.2.0.0.0';
Diskgroup created.
SQL>select name,total_mb,free_mb,required_mirror_free_mb,usable_file_mb from v$asm_diskgroup where name='CHHDG1'
NAME TOTAL_MB FREE_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB
CHHDG1 232385 232273 46477 92898
結論:兩個Failgroup的情況下,REQUIRED_MIRROR_FREE_MB只等於failgroup中單塊盤的大小,
場景5:三個Failgroup,有兩個Failgroup各兩塊磁碟,一個Failgroup只有一塊磁碟
drop diskgroup chhdg1;
create diskgroup chhdg1 normal redundancy failgroup fg1 disk '/dev/rhdiskpower5','/dev/rhdiskpower6' failgroup fg2 disk '/dev/rhdiskpower7','/dev/rhdiskpower8' failgroup fg3 disk '/dev/rhdiskpower9' attribute 'compatible.asm'='11.2.0.0.0';
select * from v$asm_diskgroup where name='CHHDG1'
GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB HOT_USED_MB COLD_USED_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB OFFLINE_DISKS COMPATIBILITY DATABASE_COMPATIBILITY VOTING_FILES
1 CHHDG1 512 4096 1048576 MOUNTED NORMAL 232385 232222 0 163 92954 69634 0 11.2.0.0.0 10.1.0.0.0 N
結論:required_mirror_free_mb值為最大的failgroup的大小
場景6:三個Failgroup,前兩個Failgroup各一塊磁碟,第三個Failgroup有三塊磁碟
drop diskgroup chhdg1;
create diskgroup chhdg1 normal redundancy failgroup fg1 disk '/dev/rhdiskpower5' failgroup fg2 disk '/dev/rhdiskpower6' failgroup fg3 disk '/dev/rhdiskpower7','/dev/rhdiskpower8','/dev/rhdiskpower9' attribute 'compatible.asm'='11.2.0.0.0';
select * from v$asm_diskgroup where name='CHHDG1'
GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB HOT_USED_MB COLD_USED_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB OFFLINE_DISKS COMPATIBILITY DATABASE_COMPATIBILITY VOTING_FILES
1 CHHDG1 512 4096 1048576 MOUNTED NORMAL 232385 232222 0 163 139431 46395 0 11.2.0.0.0 10.1.0.0.0 N
值為最大的failgroup的大小--這個如何解釋?顯然不合情理啊,如何兩個總量小於它的failgroup去冗餘這個最大的Failgroup?
場景7:兩個Failgroup,第一個Failgroup兩塊磁碟(256M、512M),第二個Failgroup三塊磁碟(768M、1024M、1280M)
SQL> create diskgroup testdg22 normal redundancy failgroup f1 disk '/dev/rchhlv30','/dev/rchhlv31' failgroup f2 disk '/dev/rchhlv32','/dev/rchhlv33','/dev/rchhlv34' attribute 'compatible.asm'='11.2.0.0.0','compatible.rdbms'='11.2.0.0.0';
Diskgroup
created.
SQL> select name,FAILGROUP,total_mb,path from v$asm_disk where
group_number=13;
NAME
FAILGROUP
TOTAL_MB PATH
------------------------------ ------------------------------ ----------
----------------------------------------
TESTDG22_0003
F2
1024 /dev/rchhlv33
TESTDG22_0004
F2
1280 /dev/rchhlv34
TESTDG22_0000
F1
256 /dev/rchhlv30
TESTDG22_0001
F1
512 /dev/rchhlv31
TESTDG22_0002
F2
768 /dev/rchhlv32
SQL> select name,required_mirror_free_mb from v$asm_diskgroup where name='TESTDG22';
NAME
REQUIRED_MIRROR_FREE_MB
------------------------------ -----------------------
TESTDG22
1280
結論:required_mirror_free_mb值為最大的那塊盤的大小,由上面這些例子可以看出當failgroup數量>2時,required_mirror_free_mb值等於最大的那個failgroup大小,當failgroup數量<3時且required_mirror_free_mb!=0的情況下,required_mirror_free_mb值等於最大的那塊盤的大小
詢問oracle community的結果是對於normal/high redundancy的diskgroup應該滿足所有FG裡的盤數相等、盤大小相等的設計原則。所以場景6這種情況下是不能保證壞盤情況下還能restore redundancy的要求
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/53956/viewspace-1285402/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 當asm file的REDUNDANCY值高於diskgroup的REDUNDANCY時ASM
- votedisk在ASM diskgroup上的存放規律ASM
- oracle asm normal redundancy 模式運用於專案中OracleASMORM模式
- 簡單討論資料型別(byte)強制轉化後的數值變化規律資料型別
- Python裡的引用與拷貝規律Python
- oracle 11.2.0.1 rac 修改asm磁碟組的冗餘模式(redundancy mode)為normalOracleASM模式ORM
- Oracle OCP 1Z0-053 Q649(Create DISKGROUP REDUNDANCY EXTERNAL)Oracle
- Java欄位初始化規律Java
- 10g RMAN的REDUNDANCY策略改變
- (中級) CSS中的“正常”(normal)值CSSORM
- Can you create a second voting disk in a different ASM diskgroup when using External Redundancy in 1ASM
- 正規化(Normal Form)是資料庫設計中的概念。新的正規化(paradigm)ORM資料庫
- 智慧手機增長規律,掌握在少數人手裡
- 關聯式資料庫的正規化(Normal Form)知識點資料庫ORM
- POJ- 3094 Quicksum-給規律求字元值UI字元
- LeetCode-6. Z字形變換(找規律)LeetCode
- EMS單號規律與順豐單號規律(C#)C#
- 列印出ckpt裡的所有變數和值變數
- A Multiplication Game (博弈,規律)GAM
- 打表找規律
- 軟體行業的發展要尊重軟體工程的價值規律 (轉)行業軟體工程
- 一分鐘大發和值走勢規律分析76930566
- 索引的應用規律總結索引
- 一分鐘大發和值走勢規律分析46377054
- 關聯式資料庫正規化詳解(Normal form,簡稱NF)資料庫ORM
- 受困於v$asm_dksigroup裡的欄位REQUIRED_MIRROR_FREE_MB!ASMUI
- 軟體開發的21條規律
- HDU 6298 Maximum Multiple(找規律)
- HDU 4951 Multiplication table(找規律)
- leedcode-單詞規律
- Oracle ASM 的redundancy與failgroupOracleASMAI
- win10系統normal.dot位置在哪裡_win10如何找到normal.dot檔案Win10ORM
- 從排行榜變動看騰訊網易也無法擺脫的行業規律行業
- 事理圖譜:事件演化的規律和模式事件模式
- 顧森——《追逐語言的規律》(視訊)
- Shareaholic:社交分享和閱讀的規律
- log_buffer的記憶體分配規律記憶體
- asm diskgroup 磁碟編號發生變化資料庫能正常開啟的測試ASM資料庫