smartctl version 5.38 [i686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION === Device Model:???? ST3320418AS Serial Number:??? 9VM1R2WY Firmware Version: CC35 User Capacity:??? 320,072,933,376 bytes Device is:??????? Not in smartctl database [for details use: -P showall] ATA Version is:?? 8 ATA Standard is:? ATA-8-ACS revision 4 Local Time is:??? Sun Aug 16 21:25:18 2009 EDT SMART support is: Available - device has SMART capability. SMART support is: Enabled
在上面的信息可以看到,该硬盘是支持SMART技术,且当前是开启的。如果SMART support is: Disabled表示SMART未启用,执行如下命令,启动SMART:
# smartctl -H /dev/sda smartctl version 5.33 [i686-turbo-linux-gnu] Copyright (C) 2002-4 Bruce Allen Home page is http://smartmontools.sourceforge.net/
=== START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED 请注意result后边的结果:PASSED,这表示硬盘健康状态良好,如果这里显示Failure,那么最好立刻给服务器更换硬盘。SMART只能报告磁盘已经不再健康,但是报警后还能继续运行多久是不确定的,通常,SMART报警参数是有预留的,磁盘报警后,不会当场坏掉,一般能坚持一段时间,有的硬盘SMART报警后还继续跑了好几年,有的硬盘SMART报错后几天就坏了,千万不要存在侥幸心理。执行如下命令可以看到详细的参数:
# smartctl -A /dev/sda
smartctl version 5.38 [i686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/
=== START OF READ SMART DATA SECTION === 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?? 109?? 100?? 006??? Pre-fail? Always?????? -?????? 21618934 ? 3 Spin_Up_Time??????????? 0x0003?? 098?? 098?? 000??? Pre-fail? Always?????? -?????? 0 ? 4 Start_Stop_Count??????? 0x0032?? 100?? 100?? 020??? Old_age?? A