硬碟錯誤 - Ubuntu 有時會啟動到 busybox,然後變成唯讀

硬碟錯誤 - Ubuntu 有時會啟動到 busybox,然後變成唯讀

我的家庭媒體伺服器(作業系統 ubuntu 14.04 LTS)有一個問題,大約 50% 的時間我打開它,而不是啟動到作業系統,我看到以下內容:

BusyBox v1.21.1 (ubuntu 1:1.21.0-1ubuntu1) built-in shell (ash)
Enter 'help' for a list of built-in commands
(initramfs) [ 66.386735 ata1: STST failed (errno=-16)
[71.40 ...] ata1: SRST failed(errno=-16)
[71.41 ...] ata1: reset failed, giving up

我不確定這是 RAM 問題(initramfs)還是硬碟問題(ata1)。我傾向於後者,因為我還有第二個問題,我認為與此有關。

在第二個問題中,其中一個硬碟(不是主硬碟,用於檔案儲存的WD 3TB Red,使用時間不到兩個月)在運行時變成唯讀(我無法預測它什麼時候會這樣做,有時我會幾天沒有發生,有些人一天發生幾次)。我在 dmseg 中發現了以下內容:此時,我嘗試透過網路(samda)存取硬碟,但由於硬碟變成唯讀而出現權限錯誤。

[ 7344.659295] ata5: soft resetting link
[ 7349.686555] ata5: SRST failed (errno=-16)
[ 7349.697955] ata5: reset failed, giving up
[ 7349.697961] ata5.01: disabled
[ 7349.697972] ata5.01: device reported invalid CHS sector 0
[ 7349.697997] ata5: EH complete
[ 7349.698055] sd 4:0:1:0: [sdd] FAILED Result: hostbyte=DID_BAD_TARGET     driverbyte=DRIVER_OK
[ 7349.698061] sd 4:0:1:0: [sdd] CDB: 
[ 7349.698065] Write(16): 8a 00 00 00 00 00 ae 84 08 20 00 00 00 10 00 00
[ 7349.698103] blk_update_request: I/O error, dev sdd, sector 2927888416
[ 7349.698139] sd 4:0:1:0: [sdd] FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 7349.698146] sd 4:0:1:0: [sdd] CDB: 
[ 7349.698149] Read(16): 88 00 00 00 00 01 44 41 0b b0 00 00 00 08 00 00
[ 7349.698172] blk_update_request: I/O error, dev sdd, sector 5440080816
[ 7349.698459] Aborting journal on device sdd1-8.
[ 7349.698470] EXT4-fs error (device sdd1): ext4_find_entry:1289: inode     #170000532: comm mhddfs: reading directory lblock 0
[ 7349.698484] sd 4:0:1:0: [sdd] FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 7349.698485] sd 4:0:1:0: [sdd] FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 7349.698486] sd 4:0:1:0: [sdd] CDB: 
[ 7349.698487] Write(16): 8a
[ 7349.698490] sd 4:0:1:0: [sdd] CDB: 
[ 7349.698491] Write(16): 8a 00 00 00 00 00 ae 84 08 00 00 00 00 08 00 00
[ 7349.698502] blk_update_request: I/O error, dev sdd, sector 2927888384
[ 7349.698503]  00 00 00
[ 7349.698505] Buffer I/O error on dev sdd1, logical block 365985792, lost sync page write
[ 7349.698507]  00 00 00 00 08
[ 7349.698513] JBD2: Error -5 detected when updating journal superblock for sdd1-8.
[ 7349.698518]  00 00 00 00 08 00 00
[ 7349.698560] blk_update_request: I/O error, dev sdd, sector 2048
[ 7349.698562] Buffer I/O error on dev sdd1, logical block 0, lost sync page write
[ 7349.885463] EXT4-fs (sdd1): previous I/O error to superblock detected
[ 7349.885509] sd 4:0:1:0: [sdd] FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 7349.885513] sd 4:0:1:0: [sdd] CDB: 
[ 7349.885515] Write(16): 8a 00 00 00 00 00 00 00 08 00 00 00 00 08 00 00
[ 7349.885531] blk_update_request: I/O error, dev sdd, sector 2048
[ 7349.885536] Buffer I/O error on dev sdd1, logical block 0, lost sync page write    
[ 7349.885551] EXT4-fs error (device sdd1): ext4_journal_check_start:56: Detected aborted journal
[ 7349.885556] EXT4-fs (sdd1): Remounting filesystem read-only    
[ 7349.885560] EXT4-fs (sdd1): previous I/O error to superblock detected
[ 7349.885579] sd 4:0:1:0: [sdd] FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 7349.885582] sd 4:0:1:0: [sdd] CDB: 
[ 7349.885584] Write(16): 8a 00 00 00 00 00 00 00 08 00 00 00 00 08 00 00
[ 7349.885599] blk_update_request: I/O error, dev sdd, sector 2048
[ 7349.885602] Buffer I/O error on dev sdd1, logical block 0, lost sync page write
[ 7635.410532] sd 4:0:1:0: [sdd] FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 7635.410540] sd 4:0:1:0: [sdd] CDB: 
[ 7635.410544] Read(16): 88 00 00 00 00 00 ca 05 e2 18 00 00 00 08 00 00
[ 7635.410565] blk_update_request: I/O error, dev sdd, sector 3389383192

最後的「FAILED」語句在磁區 3389383192 上重複。

為了嘗試解決這個問題,我啟動了一個即時 USB 並運行

 sudo fsck -Cf /dev/sdd1

檢查錯誤並得到輸出

/dev/sdd1: 26069/181583872 files (8.3% non-contiguous) 291044092/726308608 blocks

我目前正在嘗試理解這在這種情況下意味著什麼,因為它沒有說任何明顯的錯誤。

我測試壞塊

sudo badblocks -v /dev/sdd1

給出 0 個已發現的壞塊,(0/0/0 錯誤)

我不知道還能做什麼來診斷這個問題,這可能只是硬碟壞了?

編輯:我意識到我沒有發布對此的更新或解決方案。我最終退回了受影響的硬碟,此後系統運作良好。

相關內容