對oracle asm 磁碟組進行檢查
在oracle 11gR2的版本中,新增一個命令,可以對正常mount的磁碟組進行檢查,這對我們去維護asm方式的資料庫提供了很多便利
有以下場合非常適用:
1:主機伺服器例行維護,需要重啟主機和資料庫,這時如果不進行檢查的話,很有可能出現asm例項磁碟組載入不成功,導致嚴重的事故。
例如磁碟頭損壞等,這個時候在重啟前我們加以檢查的話,就可以發現問題,及時預警,做資料備份等。
測試如下:
模擬磁碟頭損壞
[grid@12cdb1 ~]$ dd if=/dev/zero of=/dev/sde1 bs=4096 count=1
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 0.000932074 s, 4.4 MB/s
[grid@12cdb1 ~]$
[grid@12cdb1 ~]$
[grid@12cdb1 ~]$ kfed read /dev/sde1|more
kfbh.endian: 0 ; 0x000: 0x00
kfbh.hard: 0 ; 0x001: 0x00
kfbh.type: 0 ; 0x002: KFBTYP_INVALID
kfbh.datfmt: 0 ; 0x003: 0x00
kfbh.block.blk: 0 ; 0x004: blk=0
kfbh.block.obj: 0 ; 0x008: file=0
kfbh.check: 0 ; 0x00c: 0x00000000
kfbh.fcn.base: 0 ; 0x010: 0x00000000
kfbh.fcn.wrap: 0 ; 0x014: 0x00000000
kfbh.spare1: 0 ; 0x018: 0x00000000
kfbh.spare2: 0 ; 0x01c: 0x00000000
000000000 00000000 00000000 00000000 00000000 [................]
Repeat 255 times
KFED-00322: Invalid content encountered during block traversal: [kfbtTraverseBlock][Invalid OSM block type][][0]
asm例項中進行檢查:
Tue Jul 22 17:54:47 2014
ERROR: Could not read the header of disk DGTEST_0000 (0).
NOTE: process _user12084_+asm (12084) initiating offline of disk 0.3914034847 (DGTEST_0000) with mask 0x7e in group 2 (DGTEST) without client assisting
NOTE: initiating PST update: grp 2 (DGTEST), dsk = 0/0xe94b6e9f, mask = 0x6a, op = clear
Tue Jul 22 17:54:47 2014
GMON updating disk modes for group 2 at 24 for pid 23, osid 12084
ERROR: disk 0(DGTEST_0000) in group 2(DGTEST) cannot be offlined because the disk group has external redundancy.
Tue Jul 22 17:54:47 2014
ERROR: too many offline disks in PST (grp 2)
Tue Jul 22 17:54:47 2014
ERROR: Failed to offline disk DGTEST_0000 (0).
NOTE: starting check of diskgroup DGTEST
Tue Jul 22 17:54:48 2014
ASM Health Checker found 1 new failures
Tue Jul 22 17:54:48 2014
ASM Health Checker found 1 new failures
Tue Jul 22 17:54:48 2014
GMON checking disk 0 for group 2 at 25 for pid 23, osid 12084
有以下場合非常適用:
1:主機伺服器例行維護,需要重啟主機和資料庫,這時如果不進行檢查的話,很有可能出現asm例項磁碟組載入不成功,導致嚴重的事故。
例如磁碟頭損壞等,這個時候在重啟前我們加以檢查的話,就可以發現問題,及時預警,做資料備份等。
測試如下:
模擬磁碟頭損壞
[grid@12cdb1 ~]$ dd if=/dev/zero of=/dev/sde1 bs=4096 count=1
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 0.000932074 s, 4.4 MB/s
[grid@12cdb1 ~]$
[grid@12cdb1 ~]$
[grid@12cdb1 ~]$ kfed read /dev/sde1|more
kfbh.endian: 0 ; 0x000: 0x00
kfbh.hard: 0 ; 0x001: 0x00
kfbh.type: 0 ; 0x002: KFBTYP_INVALID
kfbh.datfmt: 0 ; 0x003: 0x00
kfbh.block.blk: 0 ; 0x004: blk=0
kfbh.block.obj: 0 ; 0x008: file=0
kfbh.check: 0 ; 0x00c: 0x00000000
kfbh.fcn.base: 0 ; 0x010: 0x00000000
kfbh.fcn.wrap: 0 ; 0x014: 0x00000000
kfbh.spare1: 0 ; 0x018: 0x00000000
kfbh.spare2: 0 ; 0x01c: 0x00000000
000000000 00000000 00000000 00000000 00000000 [................]
Repeat 255 times
KFED-00322: Invalid content encountered during block traversal: [kfbtTraverseBlock][Invalid OSM block type][][0]
asm例項中進行檢查:
SQL> alter diskgroup dgtest check;
Diskgroup altered.
這時我們檢視asm例項中日誌資訊:
可以看到紅色部分就顯示不能讀取磁碟頭資訊,這個時候我們就要介入處理了。
Tue Jul 22 17:54:47 2014
ERROR: Could not read the header of disk DGTEST_0000 (0).
NOTE: process _user12084_+asm (12084) initiating offline of disk 0.3914034847 (DGTEST_0000) with mask 0x7e in group 2 (DGTEST) without client assisting
NOTE: initiating PST update: grp 2 (DGTEST), dsk = 0/0xe94b6e9f, mask = 0x6a, op = clear
Tue Jul 22 17:54:47 2014
GMON updating disk modes for group 2 at 24 for pid 23, osid 12084
ERROR: disk 0(DGTEST_0000) in group 2(DGTEST) cannot be offlined because the disk group has external redundancy.
Tue Jul 22 17:54:47 2014
ERROR: too many offline disks in PST (grp 2)
Tue Jul 22 17:54:47 2014
ERROR: Failed to offline disk DGTEST_0000 (0).
NOTE: starting check of diskgroup DGTEST
Tue Jul 22 17:54:48 2014
ASM Health Checker found 1 new failures
Tue Jul 22 17:54:48 2014
ASM Health Checker found 1 new failures
Tue Jul 22 17:54:48 2014
GMON checking disk 0 for group 2 at 25 for pid 23, osid 12084
修改磁碟頭後,我們再次做檢查
沒有任何報錯
SQL> alter diskgroup dgtest check
Tue Jul 22 18:07:50 2014
NOTE: starting check of diskgroup DGTEST
Tue Jul 22 18:07:51 2014
GMON checking disk 0 for group 2 at 26 for pid 23, osid 12084
Tue Jul 22 18:07:53 2014
SUCCESS: check of diskgroup DGTEST found no errors
Tue Jul 22 18:07:53 2014
SUCCESS: alter diskgroup dgtest check
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-1247062/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 檢查asm磁碟組狀態的檢視v$asm_diskgroupASM
- 對ORACLE的SGA 進行檢查Oracle
- ORACLE RAC重建ASM磁碟組OracleASM
- oracle 11g 新特性 磁碟組檢查Oracle
- Oracle ASM新增磁碟組POWER OPTIONOracleASM
- Oracle ASM磁碟組常用操作命令OracleASM
- Oracle ASM異常dismount磁碟組OracleASM
- 【ASM】Oracle asm刪除磁碟組注意事項ASMOracle
- asm 磁碟組 增刪磁碟組ASM
- 利用kfod工具檢視asm磁碟組資訊ASM
- Linux下檢視ASM對應磁碟組以及裝置名LinuxASM
- 【ASM】Oracle asm磁碟被格式化,如何掛載該磁碟組ASMOracle
- ORACLE ASM磁碟組空間溢位OracleASM
- 規劃ASM DISK GROUP、檢視asm 磁碟當前狀態、mount or dismount 磁碟組ASM
- ASM磁碟組限制ASM
- Oracle ASM磁碟組擴容(AIX7.1)OracleASMAI
- 在Oracle10g 新增ASM磁碟組OracleASM
- Oracle10g RAC ASM磁碟組[zt]OracleASM
- 如何檢視Oracle RAC的asm磁碟的udev對應關係OracleASMdev
- 向ASM diskgroup中新增磁碟的例行檢查ASM
- 遷移ASM磁碟組ASM
- Oracle RAC環境下ASM磁碟組擴容OracleASM
- oracle asm 磁碟組mount不成功總結OracleASM
- oracle 11g asm 磁碟組相容屬性OracleASM
- 對ASM dgdata 磁碟組增加disk實施步驟ASM
- Oracle asm磁碟中新加磁碟OracleASM
- oracle 10g rac +asm 進行加物理磁碟與減物理磁碟的測試Oracle 10gASM
- ASM磁碟組修改重建操作ASM
- ASM磁碟組空間不足ASM
- Oracle 11gR2 DBCA 找不到ASM 磁碟組OracleASM
- 在Oracle10g RAC下新增ASM磁碟組OracleASM
- oracle 12c R1 對存放在asm磁碟中的password 進行移動OracleASM
- 檢視asm磁碟組剩餘空間的正確方法ASM
- Oracle RAC ASM磁碟組擴容時遇到的VIP漂移OracleASM
- oracle 11g ASM 磁碟組線上擴容實驗:OracleASM
- oracle 11g R1 asm 磁碟組新特性OracleASM
- 用oracle amdu 抽取asm磁碟組的資料檔案OracleASM
- ORACLE 資料庫 ASM磁碟組上新增控制檔案Oracle資料庫ASM