[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
howtos:hardware:smart_hdd_diagnostics [2015/01/04 23:33 (UTC)] – [SMART Attributes] metaschima | howtos:hardware:smart_hdd_diagnostics [2015/01/05 01:08 (UTC)] – [SMART Tests] metaschima | ||
---|---|---|---|
Line 20: | Line 20: | ||
In order to be able to use SMART you need: | In order to be able to use SMART you need: | ||
- | - A HDD or SDD that supports SMART | + | - A HDD or SSD that supports SMART |
- SMART enabled in the UEFI/BIOS | - SMART enabled in the UEFI/BIOS | ||
- Software to interface with SMART | - Software to interface with SMART | ||
Line 30: | Line 30: | ||
smartctl -a /dev/sda | smartctl -a /dev/sda | ||
</ | </ | ||
- | Note that we will be assuming that ''/ | + | Note that we will be assuming that ''/ |
The output will be something like: | The output will be something like: | ||
Line 137: | Line 137: | ||
</ | </ | ||
- | This is just an example from my current HDD. Technically '' | + | This is just an example from my current HDD. Technically '' |
Note the line '' | Note the line '' | ||
Line 147: | Line 147: | ||
arguments to this option are on and off. | arguments to this option are on and off. | ||
</ | </ | ||
+ | This also updates attributes that are marked '' | ||
Note also that the approximate times for running various tests are listed. We will discuss SMART tests in the next section. | Note also that the approximate times for running various tests are listed. We will discuss SMART tests in the next section. | ||
Line 187: | Line 188: | ||
===== #4 Start_Stop_Count and #12 Power_Cycle_Count and #193 Load_Cycle_Count ===== | ===== #4 Start_Stop_Count and #12 Power_Cycle_Count and #193 Load_Cycle_Count ===== | ||
- | This attribute is important for laptop HDDs, because they default to powering off when not in use. Now, although laptop HDDs are designed to spin up and down more times than desktop HDD and this is an '' | + | This attribute is important for laptop HDDs, because they default to powering off when not in use. Now, although laptop HDDs are designed to spin up and down more times than desktop HDD and this is an '' |
< | < | ||
hdparm -B 254 /dev/sda | hdparm -B 254 /dev/sda | ||
Line 198: | Line 199: | ||
===== #174 Unexpected power loss count and #192 Power-Off_Retract_Count ===== | ===== #174 Unexpected power loss count and #192 Power-Off_Retract_Count ===== | ||
- | Sudden power loss is detrimental to both HDDs and [[http:// | + | Sudden power loss is detrimental to both HDDs and [[http:// |
===== #190 Airflow_Temperature_Cel and 194 Temperature_Celsius ===== | ===== #190 Airflow_Temperature_Cel and 194 Temperature_Celsius ===== | ||
Line 206: | Line 207: | ||
===== Bad Blocks (#5, 196, 197, 198) ===== | ===== Bad Blocks (#5, 196, 197, 198) ===== | ||
- | Bad blocks are basically areas of the disk surface that are damaged and can no longer hold data reliably. Internally the HDD/SSD deals with these by marking them and re-mapping/allocating | + | Bad blocks are basically areas of the disk surface that are damaged and can no longer hold data reliably. Internally the HDD/SSD deals with these by marking them and remapping/reallocating |
+ | |||
+ | ====== SMART Tests ====== | ||
+ | |||
+ | There are 3 main types of SMART tests that you can perform. | ||
+ | |||
+ | * short: a superficial test that tests electrical and mechanical performance and updates offline attributes | ||
+ | * conveyance: identifies damage during transport (mostly useful for external or laptop HDDs) | ||
+ | * long: a short test plus it scans the disk surface for bad blocks | ||
+ | |||
+ | These tests are run with the '' | ||
+ | < | ||
+ | smartctl -t long /dev/sda | ||
+ | </ | ||
+ | |||
+ | These tests can all be run on a running system without major side-effects. If you expect the long test to finish, you should minimize HDD usage as it has to scan the whole disk to finish the test. | ||
+ | |||
+ | After waiting for the test to finish, you can get the results using the '' | ||
+ | |||
+ | Short and Conveyance tests should always pass. If these fail, check the attributes as the drive is probably failing. A long test can fail if there are bad blocks, and this does NOT mean the drive is failing. The long test stops when it finds an error on the disk, so if there is a bad block it just stops. This doesn' | ||
+ | http:// | ||
+ | However, this method is difficult to implement safely, so you should usually just wait for the HDD to remap/ | ||
+ | |||
+ | How often should you run these tests ? That depends. If you run a server then more often is better, the smartmontools site recommends weekly tests. For a home user, I usually run a long test every 1000 power on hours, but that is up to you and also depends on the details of the drive and situation. | ||
+ | |||
+ | ====== Is my drive failing ? ====== | ||
+ | |||
+ | A failing drive is defined as: | ||
+ | - Having a '' | ||
+ | - Having an '' | ||
+ | |||
+ | Do not ignore your senses, if the HDD sounds unusual or makes strange noises, monitor it closely and/or replace it. Again, SMART cannot tell you with great accuracy if or when the drive will fail. The drive can fail with above threshold attributes and minimal signs. The only hope you have to keep your data safe is to backup your data, use the 3-2-1 strategy as mentioned above. | ||
====== Sources ====== | ====== Sources ====== | ||
<!-- If you are copying information from another source, then specify that source --> | <!-- If you are copying information from another source, then specify that source --> |