我有一个 Debian 盒子,带有额外的(它不是系统磁盘)1.5Tb sata 硬盘(wd caviar green)。整个磁盘只有一个分区。
磁盘用于从远程系统进行备份(rsnapshot
备份更新每 4 小时运行一次)和某些文件的 rtorrent。所以磁盘永久处于使用状态。
一切都很完美,直到出现一些文件系统错误,并且由于文件系统读/写错误,我无法删除很多文件。
fsck
救了我,一个月内错误出现了好几次。每次我需要卸载分区并运行fsck
来修复所有错误。
fsck
在修复不同的文件系统块读/写期间,还出现了一些消息,例如:
Inode 61477311 ref count is 3, should be 2. Fix? yes
Block bitmap differences: -(246948483--246948494) -(246987843--246987871) -(246988756--246988758) -(246989103--246989109). Fix? yes
smartctl
根本不显示任何错误。
那么,我应该备份整个数据并格式化它,还是硬盘快要死了,或者也许有另一种方法来解决这个问题?
附注这是 smartctls 输出:
smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Model Family: Western Digital Caviar Green (Adv. Format) family
Device Model: WDC WD15EARS-00Z5B1
Serial Number: WD-WMAVU1111103
Firmware Version: 80.00A80
User Capacity: 1,500,301,910,016 bytes
Device is: In smartctl database [for details use: -P show]
ATA Version is: 8
ATA Standard is: Exact ATA specification draft version not indicated
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (33000) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 255) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x3031) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 197 197 051 Pre-fail Always - 36297
3 Spin_Up_Time 0x0027 206 177 021 Pre-fail Always - 4658
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 267
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 084 084 000 Old_age Always - 12335
10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 265
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 57
193 Load_Cycle_Count 0x0032 142 142 000 Old_age Always - 176547
194 Temperature_Celsius 0x0022 120 087 000 Old_age Always - 30
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 200 200 000 Old_age Offline - 3
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 3
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 12335 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
答案1
您的 HDD 或控制器似乎出现故障,似乎丢失了一些写入。
我建议尽快进行完整备份,并运行完整的脱机磁盘检查。对于 1.5 tb 驱动器,这可能需要一段时间。如果可以,请使用 SMART 驱动器以外的其他设备运行完整磁盘检查,因为 SMART 可能无法正确向您报告错误。这坏块本页底部的部分可能有用。尝试读写测试(备份后)
答案2
您的 RAM 可能很差。尝试跑步记忆测试约24小时。
答案3
另外我发现了一些消息,dmesg
例如:
[2429573.624923] ata6.00: status: { DRDY ERR }
[2429573.624945] ata6.00: error: { UNC }
[2429573.632900] ata6.00: configured for UDMA/133
[2429573.632942] ata6: EH complete
[2429576.564846] ata6.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x0
[2429576.564885] ata6.00: irq_stat 0x40000008
[2429576.564910] ata6.00: failed command: READ FPDMA QUEUED
[2429576.564942] ata6.00: cmd 60/08:00:e8:14:c0/00:00:75:00:00/40 tag 0 ncq 4096 in
[2429576.564946] res 41/40:00:e8:14:c0/00:00:75:00:00/40 Emask 0x409 (media error) <F>
Google建议更换数据线。所以现在一切看起来都很好。谢谢大家。