Linux

需要有關 Linux 主機的文件系統進入只讀模式的任何提示

  • March 5, 2012

我有一個在 XEN (Citrix) 伺服器上執行的 CentOS 5.x Linux 客戶機,它有時會神秘地進入只讀模式。

我檢查了文件系統是否有錯誤,沒有出現任何可疑的情況…… :(

系統日誌顯示如下:

Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 309735103
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 309735191
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 309735279
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 309735359
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 309735447
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 309735535
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 309735103
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 309735103
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 307662855
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 315316647
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 315316655
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 315316663
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 315316671
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 315316735
Mar  5 10:57:16 testsrv last message repeated 38 times
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 307662855
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 262717023
Mar  5 10:57:16 testsrv last message repeated 2 times
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 258482255
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 141041743
Mar  5 10:57:16 testsrv kernel: EXT3-fs error (device xvdb1): ext3_find_entry: reading directory #17629185 offset 0
Mar  5 10:57:16 testsrv kernel: Aborting journal on device xvdb1.
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 16519
Mar  5 10:57:16 testsrv kernel: Buffer I/O error on device xvdb1, logical block 2057
Mar  5 10:57:16 testsrv kernel: lost page write due to I/O error on xvdb1
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 63
Mar  5 10:57:16 testsrv kernel: Buffer I/O error on device xvdb1, logical block 0
Mar  5 10:57:16 testsrv kernel: lost page write due to I/O error on xvdb1
Mar  5 10:57:16 testsrv kernel: end_request: I/O error, dev xvdb, sector 59692223
Mar  5 10:57:16 testsrv last message repeated 33 times
Mar  5 10:57:16 testsrv kernel: ext3_abort called.
Mar  5 10:57:16 testsrv kernel: EXT3-fs error (device xvdb1): ext3_journal_start_sb: Detected aborted journal
Mar  5 10:57:16 testsrv kernel: Remounting filesystem read-only

@DejanLekic:tune2fs等只掃描文件系統以查找錯誤。您觀察到的核心錯誤消息是關於硬體故障的,這是文件系統下的一層。現代文件系統和作業系統非常重視硬體故障。ext* 將自身重新掛載為只讀以防止任何寫訪問造成進一步的損壞,XFS 將自身完全關閉等等。

所以你有某種硬體問題。壞的 RAID 控制器、死硬碟、不可靠的 SAN 等等。

引用自:https://serverfault.com/questions/366424