SMART smartctl
https://wiki.ubuntuusers.de/festplattenstatus
Nice windows program: Crystal Disk Info
Understanding SMART Values
https://en.wikipedia.org/wiki/S.M.A.R.T.#ATA_S.M.A.R.T._attributes
https://lime-technology.com/wiki/index.php/Understanding_SMART_Reports
Examples:
> smartctl -a /dev/sda ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000f 106 099 006 Pre-fail Always - 11448888 3 Spin_Up_Time 0x0003 090 090 000 Pre-fail Always - 0 4 Start_Stop_Count 0x0032 090 090 020 Old_age Always - 11094 5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0 7 Seek_Error_Rate 0x000f 078 060 030 Pre-fail Always - 63158251 9 Power_On_Hours 0x0032 091 091 000 Old_age Always - 8691 10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0 12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 14
- VALUE:
- 1byte; 0-255; values 0, 254, and 255 are reserved; value 253 usually always means "Not Used Yet"
- Mostly VALUE starts at 100 (=perfect) and drops to worst case of 1
- Some attributes start at 200
- For some calculated values like Raw_Read_Error_Rate, VALUE can be more than 100, which is ok.
- WORST:
- The worst value ever recorded
- THRESH:
- lowest value that is still ok. A value below THRESH issues a warning/failure
- TYPE:
- Pre-fail: a critical attribute, one that participates in the overall SMART health assessment
- Old_age: noncritical attribute, related to normal aging, normal wear and tear of the drive.
Serious Problems
- #005 0x05 Reallocated Sectors Count > 0
-
Wenn dieser Wert regelmäßig (z. B. täglich oder wöchentlich) steigt, dann wird Festplatte bald ausfallen. Dass eine ein paar Jahre alte Festplatte hier ein paar defekte Sektoren aufgelistet hat, ist normal.
-
- #197 0xC5 Current Pending Sector Count > 0
-
Dieser Wert sollte immer Null sein oder nur kurz ein paar Defekte Sektoren aufweisen. In diesem Fall ist der Wert alarmierend hoch. Daher die Festplatte kann die Sektoren nicht mehr reparieren bzw. austauschen.
-
- #198 0xC6 Uncorrectable Sector Count =Offline_Uncorrectable > 0
-
Hier genauso wie bei Wert 197. Die Werte 197 und 198 sind die wichtigsten Werte. Ich würde die Festplatte sobald wie möglich austauschen, sobald diese Werte sich erhöhen und nicht mehr auf 0 zurück gehen.
-
- 196 Reallocated_Event_Count
- 200 Multi_Zone_Error_Rate
Diagnosis
- Infos about drive + test results
- smartctl -a /dev/sda
- Short test (2min)
- smartctl -t short /dev/sda
- Long test (2hours)
- smartctl -t long /dev/sda
- smartctl -l selftest /dev/sda
- = Status report
Installation & Setup
-
apt-get install smartmontools
-
vi /etc/default/smartmontools
-
start_smartd=yes
-
-
service smartmontools start
-
Testing email notify:
-
vi /etc/smartd.conf
-
Add " -M test" to line starting with "DEVICESCAN ..."
-
service smartmontools restart
-
-> Email should be sent
-
Then remove " -M test" and restart again
-
-
Update database
-
update-smart-drivedb
-
-
If your external USB harddisk is not supported, see below for solution
Examples Problems
# smartctl -a /dev/sdb smartctl 6.5 2016-01-24 r4214 [i686-linux-4.4.0-31-generic] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: Western Digital Caviar Green Device Model: WDC WD15EADS-00R6B0 Serial Number: WD-WCAVY0454402 LU WWN Device Id: 5 0014ee 258514f9f Firmware Version: 01.00A01 User Capacity: 1.500.301.910.016 bytes [1,50 TB] Sector Size: 512 bytes logical/physical Device is: In smartctl database [for details use: -P show] ATA Version is: ATA8-ACS (minor revision not indicated) SATA Version is: SATA 2.6, 3.0 Gb/s Local Time is: Mon Oct 24 20:05:15 2016 CEST 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: (0x84) Offline data collection activity was suspended by an interrupting command from host. 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: (31200) 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: ( 2) minutes. Extended self-test routine recommended polling time: ( 356) minutes. Conveyance self-test routine recommended polling time: ( 5) 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: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x002f 192 192 051 Pre-fail Always - 2017140 3 Spin_Up_Time 0x0027 186 141 021 Pre-fail Always - 7658 4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 115 5 Reallocated_Sector_Ct 0x0033 193 193 140 Pre-fail Always - 53 7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0 9 Power_On_Hours 0x0032 019 019 000 Old_age Always - 59560 10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0 11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 109 192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 44 193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 69 194 Temperature_Celsius 0x0022 126 105 000 Old_age Always - 26 196 Reallocated_Event_Count 0x0032 161 161 000 Old_age Always - 39 197 Current_Pending_Sector 0x0032 196 195 000 Old_age Always - 1212 198 Offline_Uncorrectable 0x0030 200 196 000 Old_age Offline - 60 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 192 172 000 Old_age Offline - 1753 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 90% 59549 2267132689 # 2 Extended offline Completed: read failure 90% 59549 2267132689 # 3 Extended captive Interrupted (host reset) 90% 59549 - # 4 Extended offline Completed: read failure 90% 59549 2267132689 # 5 Short offline Completed: read failure 90% 59545 2002166722 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.
# smartctl -a /dev/sdb smartctl 5.41 2011-06-09 r3365 [armv5tel-linux-3.8.13-langerak] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net === START OF INFORMATION SECTION === Model Family: Western Digital Caviar Blue Serial ATA Device Model: WDC WD5000AAKS-00V1A0 Serial Number: WD-WCAWF0118377 LU WWN Device Id: 5 0014ee 1578d5b03 Firmware Version: 05.01D05 User Capacity: 500,107,862,016 bytes [500 GB] Sector Size: 512 bytes logical/physical Device is: In smartctl database [for details use: -P show] ATA Version is: 8 ATA Standard is: Exact ATA specification draft version not indicated Local Time is: Mon Oct 17 15:31:29 2016 CEST 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: (0x85) Offline data collection activity was aborted by an interrupting command from host. Auto Offline Data Collection: Enabled. Self-test execution status: ( 121) The previous self-test completed having the read element of the test failed. Total time to complete Offline data collection: ( 8160) 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: ( 2) minutes. Extended self-test routine recommended polling time: ( 97) minutes. Conveyance self-test routine recommended polling time: ( 5) 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: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x002f 199 199 051 Pre-fail Always - 1255524 3 Spin_Up_Time 0x0027 172 142 021 Pre-fail Always - 2391 4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 130 5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0 7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0 9 Power_On_Hours 0x0032 049 049 000 Old_age Always - 37501 10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0 11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 128 192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 127 193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 2 194 Temperature_Celsius 0x0022 092 085 000 Old_age Always - 51 196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0 197 Current_Pending_Sector 0x0032 183 183 000 Old_age Always - 1419 198 Offline_Uncorrectable 0x0030 200 194 000 Old_age Offline - 3 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 001 001 000 Old_age Offline - 181466 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 Short offline Completed: read failure 90% 37501 408716273 # 2 Extended offline Completed: read failure 90% 37501 413279813 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.
Fix unknown USB harddisks
Example: Seagate Backup+ Hub 6TB
- lsusb
- Bus 003 Device 003: ID 0bc2:ab38 Seagate RSS LLC Backup Plus Hub (Mass Storage)
Bus 003 Device 002: ID 0bc2:ab45 Seagate RSS LLC Backup+ Hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 0bc2:ab44 Seagate RSS LLC Backup Plus Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
- Bus 003 Device 003: ID 0bc2:ab38 Seagate RSS LLC Backup Plus Hub (Mass Storage)
-
vi /etc/default/grub
-
GRUB_CMDLINE_LINUX="nomodeset vga=771 ipv6.disable=1 fsck.repair=yes usb_storage.quirks=0x0bc2:0xab38:u"
-
-
update-grub
-
reboot
Now smartctl works.