aSt*_*eve 4 linux raid hard-drive smart seagate
大约 18 个月前,我买了一个 1TB 的 Seagate Barracuda 7200.12 - ST31000528AS 驱动器,因为它有 5 年的保修期,并将它与 Ubuntu Server 下的三星 Spinpoint 一起用作软件 RAID-1 阵列的一半。
昨天smartd开始报告一个问题:
Jan 18 06:08:03 svr smartd[2672]: Device: /dev/sdb [SAT], 2 Currently unreadable (pending) sectors
Jan 18 06:08:03 svr smartd[2672]: Device: /dev/sdb [SAT], 2 Offline uncorrectable sectors
Run Code Online (Sandbox Code Playgroud)
我随后通过 smartctl 进行了调查……并且在安排了一些测试后,我得到了以下结果:
$ smartctl -l error /dev/sdb
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.0.0-14-generic] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF READ SMART DATA SECTION ===
SMART Error Log Version: 1
No Errors Logged
$ smartctl -l selftest /dev/sdb
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.0.0-14-generic] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed: read failure 10% 12451 1953523918
# 2 Short offline Completed: read failure 90% 12445 1953523918
# 3 Short offline Completed: read failure 60% 12445 1953523918
# 4 Extended offline Completed without error 00% 5532 -
$
Run Code Online (Sandbox Code Playgroud)
只有“自测”输出记录了任何类型的问题——尽管我不是 100% 清楚如何解释它。我怀疑我可能同时安排了两个简短的测试……尽管我不确定为什么一个剩下 90%,另一个剩下 60%。说到这里,我不明白为什么我的长期测试还剩下 10%。
另一个奇怪的事情是 Raid-1 没有检测到任何类型的问题(或者,至少,这就是我理解的“[2/2][UU]”的意思。虽然 sdb 上有三个分区,但只有一个不是微不足道......在其他两个中,一个是引导分区(在两个驱动器之间复制以进行灾难恢复),另一个是交换分区。
$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sdb3[1] sda3[0]
967843840 blocks [2/2] [UU]
unused devices: <none>
Run Code Online (Sandbox Code Playgroud)
几个问题...
任何建议/意见热烈感谢... :)
根据要求... smartctl --all /dev/sdb
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.0.0-14-generic] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.12
Device Model: ST31000528AS
Serial Number: 9VP5LFZA
LU WWN Device Id: 5 000c50 0200362a0
Firmware Version: CC38
User Capacity: 1,000,204,886,016 bytes [1.00 TB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 8
ATA Standard is: ATA-8-ACS revision 4
Local Time is: Thu Jan 19 18:54:01 2012 GMT
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: ( 113) The previous self-test completed having
the read element of the test failed.
Total time to complete Offline
data collection: ( 609) 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: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 178) minutes.
Conveyance self-test routine
recommended polling time: ( 2) minutes.
SCT capabilities: (0x103f) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 118 099 006 Pre-fail Always - 198953639
3 Spin_Up_Time 0x0003 095 095 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 32
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 076 060 030 Pre-fail Always - 45828174
9 Power_On_Hours 0x0032 086 086 000 Old_age Always - 12498
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 16
183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 064 056 045 Old_age Always - 36 (Min/Max 25/44)
194 Temperature_Celsius 0x0022 036 044 000 Old_age Always - 36 (0 20 0 0)
195 Hardware_ECC_Recovered 0x001a 025 011 000 Old_age Always - 198953639
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 2
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 2
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 253776732631285
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 2894995523
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 2366564210
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 Extended offline Completed: read failure 10% 12451 1953523918
# 2 Short offline Completed: read failure 90% 12445 1953523918
# 3 Short offline Completed: read failure 60% 12445 1953523918
# 4 Extended offline Completed without error 00% 5532 -
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.
Run Code Online (Sandbox Code Playgroud)
对我来说,看起来你的驱动器快要死了,扇区无法重新映射。放弃驱动器,换一个新的,重建 RAID 阵列。驱动器太便宜了,真的不值得考虑。特别是如果您对任何这些数据有任何附件。
编辑:此外,SeaTools 将为您提供它找到的坏扇区的列表。此外, smartctl -a /dev/sdb 的输出会有所帮助。
编辑2:从查看您的 smartctl -a 输出...
您有 2 个“离线不可恢复扇区”——但这意味着什么?
An offline uncorrectable sector is a disk sector which was not readable during
an off-line scan or a self-test. This is important to know, because if you have
data stored in this disk sector, and you need to read it, the read will fail.
Please see the previous '-C' option for more details.
Run Code Online (Sandbox Code Playgroud)
引文:http : //smartmontools.sourceforge.net/man/smartd.8.html
还有 2 个“当前未决扇区”——它们是什么?
A pending sector is a disk sector (containing 512 bytes of your data) which the
device would like to mark as ``bad" and reallocate. Typically this is because
your computer tried to read that sector, and the read failed because the data on
it has been corrupted and has inconsistent Error Checking and Correction (ECC)
codes. This is important to know, because it means that there is some unreadable
data on the disk. The problem of figuring out what file this data belongs to is
operating system and file system specific. You can typically force the sector to
reallocate by writing to it (translation: make the device substitute a spare
good sector for the bad one) but at the price of losing the 512 bytes of data
stored there.
Run Code Online (Sandbox Code Playgroud)
因此,您的磁盘无法从两个扇区读取,不能,现在想要将它们标记为有故障,以便它们可以重新分配。
就个人而言,一旦驱动器开始出现坏扇区,我就倾向于扔掉它们(尤其是在 RAID 阵列中)。但是,我也不为他们付钱......
或者,也许您可以打破镜子,卸下该驱动器,然后使用 SeaTools 对其进行扫描?如果它能够重新映射扇区,它就会。它是否/何时销毁应该无关紧要,因为当您重新插入磁盘并重建阵列时,将重建镜像。但是,我没有这样做,并且会等待有人插话。