« Diagnostic smart d'un disque » : différence entre les versions
Ligne 93 : | Ligne 93 : | ||
=interprétation des attributs= | =interprétation des attributs= | ||
Les attributs SMART sont ceux utilisés pour calculer l'état global du disque (<code>smartctl -H /dev/sda</code>). Pour visualiser ces attributs il faut utiliser l'option <code>-A</code> : | |||
<pre> | |||
~# smartctl -A /dev/sdb | |||
smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build) | |||
Copyright (C) 2002-10 by Bruce Allen, 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 108 099 006 Pre-fail Always - 19851850 | |||
3 Spin_Up_Time 0x0003 097 097 000 Pre-fail Always - 0 | |||
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 46 | |||
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0 | |||
7 Seek_Error_Rate 0x000f 075 060 030 Pre-fail Always - 35032672 | |||
9 Power_On_Hours 0x0032 088 088 000 Old_age Always - 10912 | |||
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0 | |||
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 23 | |||
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 | |||
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0 | |||
190 Airflow_Temperature_Cel 0x0022 070 049 045 Old_age Always - 30 (Lifetime Min/Max 26/30) | |||
194 Temperature_Celsius 0x0022 030 051 000 Old_age Always - 30 (0 15 0 0) | |||
195 Hardware_ECC_Recovered 0x001a 021 018 000 Old_age Always - 19851850 | |||
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 - 200536318028511 | |||
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 861445114 | |||
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 218940809 | |||
</pre> |
Version du 20 avril 2013 à 11:27
Activation
Vous pouvez vérifier si smart est activé avec :
smartctl -i /dev/sda
Vous devriez avoir un retour terminant par :
SMART support is: Available - device has SMART capability. SMART support is: Enabled
si jamais le smart de votre disque est disabled, essayez de l'activer avec
smartctl -s on /dev/sda
Généralités
Pour vérifier l'état global du disque utilisez l'option -H. Si vous obtenez PASSED, tant mieux, sinon, préparez vous à sauvegarder d'urgence vos données !
~# smartctl -H /dev/sda smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build) Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED
Pour vérifier la présence d'erreur dans le log smart :
~# smartctl -l error /dev/sda smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build) Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net === START OF READ SMART DATA SECTION === SMART Error Log Version: 1 No Errors Logged
self test
Commencez par vérifier les tests supportés par votre disque
~# smartctl --capabilities /dev/sda smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build) Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net === START OF READ SMART DATA SECTION === 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: ( 244) Self-test routine in progress... 40% of test remaining. 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: ( 84) minutes. Conveyance self-test routine recommended polling time: ( 2) minutes. SCT capabilities: (0x103f) SCT Status supported. SCT Error Recovery Control supported. SCT Feature Control supported. SCT Data Table supported.
Ici, le disque supporte le short self-test (d'une durée d'environs 1 minute), l'extended self-test (d'une durée d'environs 84 minutes) et le Conveyance self-test (d'une durée d'environs 2 minutes). Notez qu'en plus de ces tests, tous les disques devraient normalement supporter le self-test offline.
Pour lancer l'un de ces tests :
smartctl -t short /dev/sda smartctl -t long /dev/sda smartctl -t conveyance /dev/sda
Pour vérifier le status des tests :
smartctl -l selftest /dev/sda
interprétation des attributs
Les attributs SMART sont ceux utilisés pour calculer l'état global du disque (smartctl -H /dev/sda
). Pour visualiser ces attributs il faut utiliser l'option -A
:
~# smartctl -A /dev/sdb smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build) Copyright (C) 2002-10 by Bruce Allen, 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 108 099 006 Pre-fail Always - 19851850 3 Spin_Up_Time 0x0003 097 097 000 Pre-fail Always - 0 4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 46 5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0 7 Seek_Error_Rate 0x000f 075 060 030 Pre-fail Always - 35032672 9 Power_On_Hours 0x0032 088 088 000 Old_age Always - 10912 10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0 12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 23 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 189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0 190 Airflow_Temperature_Cel 0x0022 070 049 045 Old_age Always - 30 (Lifetime Min/Max 26/30) 194 Temperature_Celsius 0x0022 030 051 000 Old_age Always - 30 (0 15 0 0) 195 Hardware_ECC_Recovered 0x001a 021 018 000 Old_age Always - 19851850 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 - 200536318028511 241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 861445114 242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 218940809