硬盘的检测

本文详细介绍了如何使用smartctl工具检测硬盘的健康状况,包括SMART自我评估测试和错误日志分析。通过检查硬盘错误,如坏道,以及如何使用badblocks进行坏道修复,提供了一套完整的硬盘维护流程。文章强调了当硬盘出现故障预兆时,应及时备份数据并考虑更换硬盘。
摘要由CSDN通过智能技术生成

1.oops ~ # smartctl -H /dev/sdb

smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.3.1-gentoo] (local build)

Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===

SMART overall-health self-assessment test result: FAILED! <----result后边的结果:PASSED,这表示硬盘健康状态良好;如果这里显示Failure,那么最好立刻给服务器更换硬盘

Drive failure expected in less than 24 hours. SAVE ALL DATA.

Failed Attributes:

ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE

5 Reallocated_Sector_Ct 0x0033 001 001 036 Pre-fail Always FAILING_NOW 4095

2.oops ~ # smartctl -C -t short /dev/sdb

smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.3.1-gentoo] (local build)

Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===

Sending command: "Execute SMART Short self-test routine immediately in captive mode".

Drive command "Execute SMART Short self-test routine immediately in captive mode" successful.

Testing has begun.

Please wait 1 minutes for test to complete.

Test will complete after Tue Nov 5 12:19:54 2013

3.oops ~ # smartctl -l selftest /dev/sdb2

smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.3.1-gentoo] (local build)

Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== 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 Short captive Completed: unknown failure 90% 36265 0

# 2 Short captive Completed: unknown failure 90% 36265 0

4.oops ~ # smartctl -l error /dev/sdb

smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.3.1-gentoo] (local build)

Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===

SMART Error Log Version: 1

ATA Error Count: 94 (device log contains only the most recent five errors)

CR = Command Register [HEX]

FR = Features Register [HEX]

SC = Sector Count Register [HEX]

SN = Sector Number Register [HEX]

CL = Cylinder Low Register [HEX]

CH = Cylinder High Register [HEX]

DH = Device/Head Register [HEX]

DC = Device Command Register [HEX]

ER = Error register [HEX]

ST = Status register [HEX]

Powered_Up_Time is measured from power on, and printed as

DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,

SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 94 occurred at disk power-on lifetime: 36263 hours (1510 days + 23 hours)

When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:

ER ST SC SN CL CH DH

-- -- -- -- -- -- --

04 71 04 9d 00 32 e0 Device Fault; Error: ABRT

Commands leading to the command that caused the error were:

CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name

-- -- -- -- -- -- -- -- ---------------- --------------------

a1 00 00 00 00 00 a0 00 00:14:55.632 IDENTIFY PACKET DEVICE

ec 00 00 00 00 00 a0 00 00:14:55.631 IDENTIFY DEVICE

ff 00 00 00 00 00 00 00 00:14:55.480 [VENDOR SPECIFIC]

00 00 00 00 00 00 00 04 00:14:55.480 NOP [Abort queued commands]

ff 00 00 00 00 00 00 00 00:14:55.173 [VENDOR SPECIFIC]

Error 93 occurred at disk power-on lifetime: 36263 hours (1510 days + 23 hours)

When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:

ER ST SC SN CL CH DH

-- -- -- -- -- -- --

04 71 04 9d 00 32 e0

Commands leading to the command that caused the error were:

CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name

-- -- -- -- -- -- -- -- ---------------- --------------------

ec 00 00 00 00 00 a0 00 00:14:55.631 IDENTIFY DEVICE

ff 00 00 00 00 00 00 00 00:14:55.480 [VENDOR SPECIFIC]

00 00 00 00 00 00 00 04 00:14:55.480 NOP [Abort queued commands]

ff 00 00 00 00 00 00 00 00:14:55.173 [VENDOR SPECIFIC]

00 00 00 00 00 00 00 ff 00:14:55.173 NOP [Abort queued commands]

Error 92 occurred at disk power-on lifetime: 36263 hours (1510 days + 23 hours)

When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:

ER ST SC SN CL CH DH

-- -- -- -- -- -- --

04 71 04 9d 00 32 e0 Device Fault; Error: ABRT

Commands leading to the command that caused the error were:

CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name

-- -

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值