我的Ubuntu 13.10系统在过去大约一天的时间里一直表现很差。查看内核日志,看来<1yr旧的3TB SATA磁盘在特定扇区上有问题:
Nov 4 20:54:04 mediaserver kernel: [10893.039180] ata4.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
Nov 4 20:54:04 mediaserver kernel: [10893.039187] ata4.01: BMDMA stat 0x65
Nov 4 20:54:04 mediaserver kernel: [10893.039193] ata4.01: failed command: READ DMA EXT
Nov 4 20:54:04 mediaserver kernel: [10893.039202] ata4.01: cmd 25/00:08:f8:3f:83/00:00:af:00:00/f0 tag 0 dma 4096 in
Nov 4 20:54:04 mediaserver kernel: [10893.039202] res 51/40:00:f8:3f:83/40:00:af:00:00/10 Emask 0x9 (media error)
Nov 4 20:54:04 mediaserver kernel: [10893.039207] ata4.01: status: { DRDY ERR }
Nov 4 20:54:04 mediaserver kernel: [10893.039211] ata4.01: error: { UNC }
Nov 4 20:54:04 mediaserver kernel: [10893.148527] ata4.00: configured for UDMA/133
Nov 4 20:54:04 mediaserver kernel: [10893.180322] ata4.01: configured for UDMA/133
Nov 4 20:54:04 mediaserver kernel: [10893.180345] sd 3:0:1:0: [sdc] Unhandled sense code
Nov 4 20:54:04 mediaserver kernel: [10893.180349] sd 3:0:1:0: [sdc]
Nov 4 20:54:04 mediaserver kernel: [10893.180353] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Nov 4 20:54:04 mediaserver kernel: [10893.180356] sd 3:0:1:0: [sdc]
Nov 4 20:54:04 mediaserver kernel: [10893.180359] Sense Key : Medium Error [current] [descriptor]
Nov 4 20:54:04 mediaserver kernel: [10893.180371] Descriptor sense data with sense descriptors (in hex):
Nov 4 20:54:04 mediaserver kernel: [10893.180373] 72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
Nov 4 20:54:04 mediaserver kernel: [10893.180384] af 83 3f f8
Nov 4 20:54:04 mediaserver kernel: [10893.180389] sd 3:0:1:0: [sdc]
Nov 4 20:54:04 mediaserver kernel: [10893.180393] Add. Sense: Unrecovered read error - auto reallocate failed
Nov 4 20:54:04 mediaserver kernel: [10893.180396] sd 3:0:1:0: [sdc] CDB:
Nov 4 20:54:04 mediaserver kernel: [10893.180398] Read(16): 88 00 00 00 00 00 af 83 3f f8 00 00 00 08 00 00
Nov 4 20:54:04 mediaserver kernel: [10893.180412] end_request: I/O error, dev sdc, sector 2944614392
Nov 4 20:54:04 mediaserver kernel: [10893.180431] ata4: EH complete
该kern.log
文件约为33MB,其中大部分充满了上述重复的错误,并且在重复的消息中扇区似乎没有任何不同。
我目前正在现在卸下的磁盘上运行以下命令,以测试并尝试找出磁盘可能存在的所有问题。我大约需要12个小时,并且由于磁盘很大,预计还要花24/48个小时:
e2fsck -c -c -p -v /dev/sdc1
我的问题是:该驱动器是否出现故障,还是我在这里看到一个常见问题?我想知道我是否有必要修理或忽略坏扇区,是否仍应在保修期内更换处于保修期内的磁盘。我对上述命令的知识有些欠缺,因此我对它是否会有所帮助表示怀疑。
快速更新!
e2fsck在两天后终于完成,并带有许多“ inode中被倍受称赞的块”。尝试挂载文件系统导致错误,迫使其回落到只读状态:
Nov 11 08:29:05 mediaserver kernel: [211822.287758] EXT4-fs (sdc1): warning: mounting fs with errors, running e2fsck is recommended
Nov 11 08:29:05 mediaserver kernel: [211822.301699] EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts: errors=remount-ro
尝试手动读取扇区:
sudo dd count=1 if=/dev/sdc of=/dev/null skip=2944614392
dd: reading ‘/dev/sdc’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 5.73077 s, 0.0 kB/s
尝试写:
sudo dd count=1 if=/dev/zero of=/dev/sdc seek=2944614392
dd: writing to ‘/dev/sdc’: Input/output error
1+0 records in
0+0 records out
0 bytes (0 B) copied, 2.87869 s, 0.0 kB/s
在这两个方面,Reallocated_Sector_Ct
其余均为0。
驱动器确实经常进入睡眠状态。我现在认为这可能是文件系统问题?我不是100%。