我的家庭媒体服务器(操作系统 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 个错误)
我不确定还能做什么来诊断这个问题,会不会只是硬盘坏了?
编辑:我意识到我没有发布更新或解决方案。我最终退回了受影响的硬盘,此后系统一直运行良好。