在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
定期检查硬盘的健康状态是每个系统管理员必须要做的事情。说到硬盘的健康状态,这里就得先说一下S.M.A.R.T.了。 SMART是一种磁盘自我分析检测技术,早在90年代末就基本得到了普及
复制代码 代码如下:smartctl -i /dev/sda 正常情况下应该会得到下面这样的信息 复制代码 代码如下:[root@localhost ~]# smartctl -i /dev/sda smartctl version 5.38 [i686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is <a href="http://smartmontools.sourceforge.net/">http://smartmontools.sourceforge.net/</a> 复制代码 代码如下:=== START OF INFORMATION SECTION === Model Family: Seagate Barracuda 7200.10 family Device Model: ST3160815AS Serial Number: 5RA6A1K9 Firmware Version: 4.AAB User Capacity: 160,041,885,696 bytes Device is: In smartctl database [for details use: -P show] ATA Version is: 7 ATA Standard is: Exact ATA specification draft version not indicated Local Time is: Sat Jul 7 17:18:02 2012 CST SMART support is: Available – device has SMART capability. 在这里,如果看到SMART support is: Disabled,则表示SMART未启用
复制代码 代码如下:smartctl –smart=on –offlineauto=on –saveauto=on /dev/sda 查看硬盘当前的健康状态使用如下命令 复制代码 代码如下:[root@localhost ~]# smartctl -H /dev/sda smartctl version 5.38 [i686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is <a href="http://smartmontools.sourceforge.net/">http://smartmontools.sourceforge.net/</a> 复制代码 代码如下:=== START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED 请注意result后边的结果:PASSED,这表示硬盘健康状态良好
复制代码 代码如下:[root@localhost ~]# smartctl -A /dev/sda smartctl version 5.38 [i686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is <a href="https://www.ogeek.net/">https://www.ogeek.net/</a> 复制代码 代码如下:=== 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 100 253 006 Pre-fail Always – 0 3 Spin_Up_Time 0×0003 097 097 000 Pre-fail Always – 0 4 Start_Stop_Count 0×0032 100 100 020 Old_age Always – 818 5 Reallocated_Sector_Ct 0×0033 100 100 036 Pre-fail Always – 0 7 Seek_Error_Rate 0x000f 085 060 030 Pre-fail Always – 369003829 9 Power_On_Hours 0×0032 084 084 000 Old_age Always – 14527 10 Spin_Retry_Count 0×0013 100 100 097 Pre-fail Always – 0 12 Power_Cycle_Count 0×0032 100 100 020 Old_age Always – 817 187 Reported_Uncorrect 0×0032 100 100 000 Old_age Always – 0 189 High_Fly_Writes 0x003a 100 100 000 Old_age Always – 0 190 Airflow_Temperature_Cel 0×0022 052 046 045 Old_age Always – 48 (Lifetime Min/Max 47/52) 194 Temperature_Celsius 0×0022 048 054 000 Old_age Always – 48 (0 11 0 0) 195 Hardware_ECC_Recovered 0x001a 074 062 000 Old_age Always – 188295533 197 Current_Pending_Sector 0×0012 100 100 000 Old_age Always – 0 198 Offline_Uncorrectable 0×0010 100 100 000 Old_age Offline – 0 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always – 0 200 Multi_Zone_Error_Rate 0×0000 100 253 000 Old_age Offline – 0 202 TA_Increase_Count 0×0032 100 253 000 Old_age Always – 0 上边列出的参数表中可供进行技术分析和参考,使用下边的命令可以输出完整结果: 复制代码 代码如下:smartctl -a /dev/sda |
请发表评论