CentOS 6.5 ext4 filesystemio_options=SETALL 備庫archivelog 損壞問題
資料庫版本 11.2.0.3.15
作業系統 CentOS 6.5
檔案系統 ext4
最近發現我們線上資料庫的3臺備庫,全部出現一樣的錯誤如下:
INCIDENT_ID PROBLEM_KEY CREATE_TIME
-------------------- ----------------------------------------------------------- ----------------------------------------
352249 ORA 445 2016-04-07 22:18:02.350000 +08:00
640297 ORA 600 [3020] 2016-11-08 20:09:44.612000 +08:00
640217 ORA 600 [ORA-00600: internal error code, arguments: [3020], 2016-11-08 20:10:19.945000 +08:00
640298 ORA 600 [3020] 2016-11-14 11:40:52.532000 +08:00
640177 ORA 600 [ORA-00600: internal error code, arguments: [3020], 2016-11-14 11:41:32.540000 +08:00
Dump continued from file: /home/oracle/database/diag/rdbms/yjfhisd/yjfhis/trace/yjfhis_mrp0_27052.trc
ORA-00600: internal error code, arguments: [3020], [3], [33188], [12616100], [], [], [], [], [], [], [], []
ORA-10567: Redo is inconsistent with data block (file# 3, block# 33188, file offset is 271876096 bytes)
ORA-10564: tablespace UNDOTBS1
ORA-01110: da
========= Dump for incident 640177 (ORA 600 [ORA-00600: internal error code, arguments: [3020], [3], [33188], [12616100], [], [], [], [], [], [], [], []
開始查詢這個錯誤發現可能是BUG引起的,只能是重新進行備庫配置,但是回頭想想為什麼只有這一套庫的STANDBY 出現問題,
回想一下這臺機器因為磁碟I/O不行,我開啟了非同步I/O,讓I/O進入核心態快取,加快ORACLE I/O的速度
也就是
filesystemio_options=SETALL
初衷是好的,但是經過查詢MOS和一些網友的文章 也發現同樣的問題。
MOS:
ORA-1578 ORA-353 ORA-19599 Corrupt blocks with zeros when filesystemio_options=SETALL on ext4 file system using Linux (文件 ID 1487957.1)
這個文章指出,不光是備庫,主庫的各種檔案都可能出現問題,臥槽這個問題就大了。只有改引數重啟資料庫了。
同時我注意到這樣一句話:
Database files on ext4 File System on Linux and Database parameter filesystemio_options is set to SETALL.
This is a Linux defect when using O_SYNC|O_DIRECT on ext4 file systems
(filesystemio_options=SETALL open the database files using O_SYNC|O_DIRECT).
也就是說ORACLE呼叫LINUX API OPEN 函式的時候 由LINUX決定使用使用O_SYNC還是O_DIRECT
那麼這也就說明了一點為什麼這個引數是靜態的,
因為ORACLE程式呼叫 OPEN函式呼叫開啟檔案後返回一個檔案描述符給 ORACLE程式,除非資料庫
程式終止,一直在read write的情況下 這個不可能動態修改。
再來看
O_SYNC,O_DIRECT
O_DIRECT (Since Linux 2.4.10)
Try to minimize cache effects of the I/O to and from this file. In general this will degrade performance, but it is useful in special
situations, such as when applications do their own caching. File I/O is done directly to/from user space buffers. The I/O is syn-
chronous, that is, at the completion of a read(2) or write(2), data is guaranteed to have been transferred. See NOTES below for further
discussion.
大概意思是說,最小化系統cache,這裡應該是值的核心緩衝區,一般情況會導致效能問題,但是如果應用程式有自己的快取,可以這樣幹。
O_SYNC The file is opened for synchronous I/O. Any write(2)s on the resulting file descriptor will block the calling process until the data
has been physically written to the underlying hardware. But see NOTES below.
再來看看ORACLE對這個引數的描述:
FILESYTEMIO_OPTIONS can be set to one of the following values:
ASYNCH: enable asynchronous I/O on file system files, which has no timing requirement for transmission.
在檔案系統檔案上啟用非同步I/O,在資料傳送上沒有計時要求。
DIRECTIO: enable direct I/O on file system files, which bypasses the buffer cache.
在檔案系統檔案上啟用直接I/O,繞過buffer cache。
SETALL: enable both asynchronous and direct I/O on file system files.
在檔案系統檔案上啟用非同步和直接I/O。
NONE: disable both asynchronous and direct I/O on file system files.
在檔案系統檔案上禁用非同步和直接I/O。
然後看看LINUX為什麼把它設定為NONE
Linux none
Oracle only supports native Linux asynchronous I/O,
which requires also using direct I/O.
Older Linux kernels do not support native asynchronous I/O.
LINUX老版本不支援(沒有)原生的非同步I/O(native asynchronous I/O),其實
回想MYSQL的早期版本的實現是MYSQL層自己模擬的非同步的I/O,後來
mysql也採用LINUX的原生非同步I/O。
ORACLE出於這種考慮設定為了NONE,其實還應該加一句就是回觸發本文的
這個問題。
最後我們看看MYSQL innodb 中一般也有一個差不多的引數:
innodb_flush_method 這個引數一般設定為O_DIRECT,繞開核心緩衝區
http://blog.itpub.net/7728585/viewspace-1980262/
總之在linux 5 6 EXT4檔案系統上主備不要設定
filesystemio_options=SETALL
另外設定這種底層的引數,需要參考MOS的建議或檢視一下有沒有什麼bug或者
嚴重問題,千萬不要想當然,除非大家都這樣用。。
作業系統 CentOS 6.5
檔案系統 ext4
最近發現我們線上資料庫的3臺備庫,全部出現一樣的錯誤如下:
INCIDENT_ID PROBLEM_KEY CREATE_TIME
-------------------- ----------------------------------------------------------- ----------------------------------------
352249 ORA 445 2016-04-07 22:18:02.350000 +08:00
640297 ORA 600 [3020] 2016-11-08 20:09:44.612000 +08:00
640217 ORA 600 [ORA-00600: internal error code, arguments: [3020], 2016-11-08 20:10:19.945000 +08:00
640298 ORA 600 [3020] 2016-11-14 11:40:52.532000 +08:00
640177 ORA 600 [ORA-00600: internal error code, arguments: [3020], 2016-11-14 11:41:32.540000 +08:00
Dump continued from file: /home/oracle/database/diag/rdbms/yjfhisd/yjfhis/trace/yjfhis_mrp0_27052.trc
ORA-00600: internal error code, arguments: [3020], [3], [33188], [12616100], [], [], [], [], [], [], [], []
ORA-10567: Redo is inconsistent with data block (file# 3, block# 33188, file offset is 271876096 bytes)
ORA-10564: tablespace UNDOTBS1
ORA-01110: da
========= Dump for incident 640177 (ORA 600 [ORA-00600: internal error code, arguments: [3020], [3], [33188], [12616100], [], [], [], [], [], [], [], []
開始查詢這個錯誤發現可能是BUG引起的,只能是重新進行備庫配置,但是回頭想想為什麼只有這一套庫的STANDBY 出現問題,
回想一下這臺機器因為磁碟I/O不行,我開啟了非同步I/O,讓I/O進入核心態快取,加快ORACLE I/O的速度
也就是
filesystemio_options=SETALL
初衷是好的,但是經過查詢MOS和一些網友的文章 也發現同樣的問題。
MOS:
ORA-1578 ORA-353 ORA-19599 Corrupt blocks with zeros when filesystemio_options=SETALL on ext4 file system using Linux (文件 ID 1487957.1)
這個文章指出,不光是備庫,主庫的各種檔案都可能出現問題,臥槽這個問題就大了。只有改引數重啟資料庫了。
同時我注意到這樣一句話:
Database files on ext4 File System on Linux and Database parameter filesystemio_options is set to SETALL.
This is a Linux defect when using O_SYNC|O_DIRECT on ext4 file systems
(filesystemio_options=SETALL open the database files using O_SYNC|O_DIRECT).
也就是說ORACLE呼叫LINUX API OPEN 函式的時候 由LINUX決定使用使用O_SYNC還是O_DIRECT
那麼這也就說明了一點為什麼這個引數是靜態的,
因為ORACLE程式呼叫 OPEN函式呼叫開啟檔案後返回一個檔案描述符給 ORACLE程式,除非資料庫
程式終止,一直在read write的情況下 這個不可能動態修改。
再來看
O_SYNC,O_DIRECT
O_DIRECT (Since Linux 2.4.10)
Try to minimize cache effects of the I/O to and from this file. In general this will degrade performance, but it is useful in special
situations, such as when applications do their own caching. File I/O is done directly to/from user space buffers. The I/O is syn-
chronous, that is, at the completion of a read(2) or write(2), data is guaranteed to have been transferred. See NOTES below for further
discussion.
大概意思是說,最小化系統cache,這裡應該是值的核心緩衝區,一般情況會導致效能問題,但是如果應用程式有自己的快取,可以這樣幹。
O_SYNC The file is opened for synchronous I/O. Any write(2)s on the resulting file descriptor will block the calling process until the data
has been physically written to the underlying hardware. But see NOTES below.
再來看看ORACLE對這個引數的描述:
FILESYTEMIO_OPTIONS can be set to one of the following values:
ASYNCH: enable asynchronous I/O on file system files, which has no timing requirement for transmission.
在檔案系統檔案上啟用非同步I/O,在資料傳送上沒有計時要求。
DIRECTIO: enable direct I/O on file system files, which bypasses the buffer cache.
在檔案系統檔案上啟用直接I/O,繞過buffer cache。
SETALL: enable both asynchronous and direct I/O on file system files.
在檔案系統檔案上啟用非同步和直接I/O。
NONE: disable both asynchronous and direct I/O on file system files.
在檔案系統檔案上禁用非同步和直接I/O。
然後看看LINUX為什麼把它設定為NONE
Linux none
Oracle only supports native Linux asynchronous I/O,
which requires also using direct I/O.
Older Linux kernels do not support native asynchronous I/O.
LINUX老版本不支援(沒有)原生的非同步I/O(native asynchronous I/O),其實
回想MYSQL的早期版本的實現是MYSQL層自己模擬的非同步的I/O,後來
mysql也採用LINUX的原生非同步I/O。
ORACLE出於這種考慮設定為了NONE,其實還應該加一句就是回觸發本文的
這個問題。
最後我們看看MYSQL innodb 中一般也有一個差不多的引數:
innodb_flush_method 這個引數一般設定為O_DIRECT,繞開核心緩衝區
http://blog.itpub.net/7728585/viewspace-1980262/
總之在linux 5 6 EXT4檔案系統上主備不要設定
filesystemio_options=SETALL
另外設定這種底層的引數,需要參考MOS的建議或檢視一下有沒有什麼bug或者
嚴重問題,千萬不要想當然,除非大家都這樣用。。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7728585/viewspace-2128474/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RAC磁碟頭損壞問題處理
- 網路故障造成備庫standby logfile的損壞
- Linux Centos6.5 使用問題彙總LinuxCentOS
- 聯機日誌檔案損壞問題
- zt_Archivelog 模式下,datafile header損壞,如何恢復?Hive模式Header
- Oracle資料庫塊的物理損壞與邏輯損壞Oracle資料庫
- 資料庫損壞解決:資料庫已損壞,無法分配空間資料庫
- 物理備庫無法接受archivelogHive
- centos6.5報錯:checking filesystems failed問題處理CentOSAI
- Oracle塊損壞恢復(有rman備份)Oracle
- CentOS6.5安裝mysql以及常見問題的解決CentOSMySql
- 【資料庫資料恢復】SQL SERVER資料庫MDF (NDF)或LDF損壞問題如何解決?資料庫資料恢復SQLServer
- CentOS6.5安裝Redis資料庫CentOSRedis資料庫
- 物理DG從庫損壞後的重建
- 歸檔日誌損壞驗證:Corrupt archivelog giving unclear errors [ID 1359971.1]HiveError
- 磁碟損壞造成RMAN備份檔案有壞塊的恢復案例
- 面對硬碟磁頭損壞問題,資料該如何解救?硬碟
- CentOS 6.5安裝Oracle 11.2.0.4------CentOS 6.5安裝CentOSOracle
- PostgreSQL資料庫toast表損壞解決SQL資料庫AST
- SQLite資料庫損壞及其修復探究SQLite資料庫
- 備份&恢復之十三:損壞全部控制檔案
- Oracle REDO損壞Oracle Redo
- backup database plus archivelog 不同寫法導致備份集位置不同問題DatabaseHive
- 【DG】備庫斷檔問題
- SQL Server 2008在資料庫損壞時備份事務日誌SQLServer資料庫
- 【故障處理】通過重建資料庫物件解決因EXPDP/IMPDP工具損壞無法使用問題資料庫物件
- 非系統表空間損壞,rman備份恢復
- 備份&恢復之十二:損壞單個控制檔案
- 沒有備份的情況下處理undo損壞
- Oracle資料庫UNDO損壞後的恢復Oracle資料庫
- master資料庫損壞之後的恢復AST資料庫
- 使用RMAN恢復完全損壞的資料庫資料庫
- 解決Reiserfs檔案系統損壞的問題我們是認真的
- 資料塊損壞ORA-1578(發現損壞塊)
- Centos6.5搭建LAMPCentOSLAMP
- CentOS 6.5 正式釋出CentOS
- CentOS6.5搭建ZabbixCentOS
- centos6.5搭建phpCentOSPHP