In this post I will write about some techniques that can be used in a Windows env. to check the hard disk health status using S.M.A.R.T. You can read about S.M.A.R.T. and other stuff in my post
Detect Hard Drive Failure in Linux using S.M.A.R.T. (see linkografia).
S.M.A.R.T. stands for Self-Monitoring, Analysis and Reporting Technology and is a monitoring system for hard disk to detect the low-level indicators of the general health conditions of the device. Note that the raw values are calculated by the drive’s SMART logic internally.
Indeed “S.M.A.R.T Monitoring Tools” exists for windows: did you know ?
After you successfully installed the software you can open SmartMonTools -> SmartCtl (Admin CMD). Here you have to detect the name of the installed Hard Disk.
C:\Program Files\smartmontools\bin>smartctl --scan /dev/sda -d ata # /dev/sda, ATA device /dev/sdf -d usbjmicron # /dev/sdf [USB JMicron], ATA device
/dev/sda is the “main” hard disk, and /dev/sdf in the USB disk that in this example I want to check to.
C:\Program Files\smartmontools\bin>smartctl -i /dev/sdf smartctl 6.4 2015-06-04 r4109 [x86_64-w64-mingw32-win8] (sf-6.4-1) Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: Seagate Barracuda 7200.14 (AF) Device Model: ST500DM002-1BD142 Serial Number: Z6E1SRNK LU WWN Device Id: 5 000c50 0666f4d70 Firmware Version: KC45 User Capacity: 500.107.862.016 bytes [500 GB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 7200 rpm Device is: In smartctl database [for details use: -P show] ATA Version is: ATA8-ACS T13/1699-D revision 4 SATA Version is: SATA 3.0, 6.0 Gb/s (current: 1.5 Gb/s) Local Time is: Tue Apr 26 10:25:06 2016 WEDT SMART support is: Available - device has SMART capability. SMART support is: Enabled
OK: The hard disk was it has been recognized by the software (SMART Support lines). Now it is possible to ask to the device to report its S.M.A.R.T. health status using H option.
C:\Program Files\smartmontools\bin>smartctl -H /dev/sdf smartctl 6.4 2015-06-04 r4109 [x86_64-w64-mingw32-win8] (sf-6.4-1) Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED
Att.: S.M.A.R.T. status is based on related information that it has gathered from online and offline tests, which were used to determine/update its SMART vendor-specific attribute values.
Now we can print the disk’s table attributes.
C:\Program Files\smartmontools\bin>smartctl -a /dev/sdf smartctl 6.4 2015-06-04 r4109 [x86_64-w64-mingw32-win8] (sf-6.4-1) Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: Seagate Barracuda 7200.14 (AF) Device Model: ST500DM002-1BD142 Serial Number: Z6E1SRNK LU WWN Device Id: 5 000c50 0666f4d70 Firmware Version: KC45 User Capacity: 500.107.862.016 bytes [500 GB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 7200 rpm Device is: In smartctl database [for details use: -P show] ATA Version is: ATA8-ACS T13/1699-D revision 4 SATA Version is: SATA 3.0, 6.0 Gb/s (current: 1.5 Gb/s) Local Time is: Tue Apr 26 10:36:55 2016 WEDT 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: ( 600) 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: ( 82) minutes. Conveyance self-test routine recommended polling time: ( 2) minutes. SCT capabilities: (0x303f) 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 119 099 006 Pre-fail Always - 228783320 3 Spin_Up_Time 0x0003 100 097 000 Pre-fail Always - 0 4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 206 5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0 7 Seek_Error_Rate 0x000f 085 060 030 Pre-fail Always - 351746422 9 Power_On_Hours 0x0032 084 084 000 Old_age Always - 15527 10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0 12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 121 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 0 0 189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0 190 Airflow_Temperature_Cel 0x0022 065 046 045 Old_age Always - 35 (Min/Max 22/35) 194 Temperature_Celsius 0x0022 035 054 000 Old_age Always - 35 (0 21 0 0 0) 195 Hardware_ECC_Recovered 0x001a 057 038 000 Old_age Always - 228783320 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0 240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 14522h+01m+17.198s 241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 204923795 242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 398996911 SMART Error Log Version: 1 No Errors Logged SMART Self-test log structure revision number 1 No self-tests have been logged. [To run self-tests, use: smartctl -t] 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.
The names/meanings of Attributes and the interpretation of their raw values is not specified by any standard, and different manufacturers sometimes use the same Attribute ID for different purposes. For this reason, though rare, the interpretation of specific Attributes can be wrong. Google can help you…..
An important value here is raw value of parameter Reallocated_Sector_Ct (id# 5). But you can take a look at VALUE, WORST and THRESH columns: these are the interpreted data from raw values.
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH 5 Reallocated_Sector_Ct 0x0033 X% Y% Z%
Meaning that your Reallocated_Sector_Ct is currently considered to be X% good, and is reported as a problem by SMART when it reaches Z% good (thresold): the worst value checked from the hard disk electronic driver was z%.
Att.: For critical hard disk my suggestion is to replace all the HD with Reallocated_Sector_Ct raw value > 0!
Here we can read that all works fine, but the value of Power_On_Hours suggest that you have to replace it, because that value is a little higher (15527 hours = 646 days).
Other important part of the smartctl command is a report of the self-tests run on the disk. It is possible to run two types of self-tests, short and long. These can be run with the the following commands.
smartctl -t short /dev/sdf smartctl -t long /dev/sdf
Typically, short tests take only few minutes to complete, while long tests can take several hours. If you launch a short or long test and at the end we can get the result with the a option.
C:\Program Files\smartmontools\bin>smartctl -t short /dev/sdf ...... 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% 14528 - .....
Linkografia
S.M.A.R.T. Monitoring Tools
Detect Hard Drive Failure in Linux using S.M.A.R.T.