S.M.A.R.T. (Self-Monitoring, Analysis and Reporting Technology) is built into most hard drives and SSDs. It records the drive's own assessment of its condition, which lets you notice a failing disk before it takes your data with it.
This applies to dedicated servers, where you have access to the physical disks. On a virtual server you see a virtual disk, and its health is monitored by us.
The commands below use a hyphen:
smartctl -i. If you copy them from elsewhere, check that you have a real hyphen and not a dash — the command fails otherwise, which is a surprisingly common source of confusion.
Installing smartmontools
Debian and Ubuntu:
apt install smartmontools
AlmaLinux, Rocky Linux and other RHEL-based systems:
dnf install smartmontools
The commands you need
Basic drive information, including whether S.M.A.R.T. is enabled:
smartctl -i /dev/sda
If the output says support is disabled, enable it:
smartctl -s on /dev/sda
The full attribute report:
smartctl -a /dev/sda
The short version, if you only want the verdict:
smartctl -H /dev/sda
This prints PASSED or FAILED. Note that PASSED is not a guarantee of health — drives fail while still reporting PASSED — but FAILED is always serious.
List the drives on the server first if you are not sure of their names:
lsblk
Disks behind a hardware RAID controller may not be visible to smartctl directly. In that case the controller's own tools are needed — open a ticket and we will check them for you.
Reading the report
Each attribute has three columns worth understanding:
- RAW_VALUE — the raw counter reported by the drive.
- VALUE — a normalised figure, typically 1–253. Higher is better.
- THRESH — the minimum acceptable normalised value. If VALUE falls to or below THRESH, the attribute has failed.
Attributes are of two types. Pre-fail attributes describe imminent problems: a failed Pre-fail attribute means the drive may fail within days or hours. Old_age attributes describe wear: a failed Old_age attribute means the drive has reached the end of its rated life, without saying when it will actually stop.
The attributes that matter most
In practice you can ignore most of the report and watch a handful of counters. For these, what matters is the RAW_VALUE and, above all, whether it is growing:
- Reallocated_Sector_Ct — sectors the drive has found unreliable and replaced with spares. A few, stable over months, are tolerable. A number that grows is the clearest warning sign there is.
- Current_Pending_Sector — sectors that are suspect but not yet reallocated. Anything other than zero deserves attention.
- Offline_Uncorrectable — sectors that could not be read at all. Data has already been lost if this is non-zero.
- Reported_Uncorrect — errors the drive could not correct itself.
- Raw_Read_Error_Rate and Seek_Error_Rate — read and head-positioning errors. Interpretation varies by manufacturer, so watch the trend rather than the absolute number.
- Spin_Retry_Count — retries needed to spin the disk up. Non-zero indicates mechanical trouble.
- Temperature — sustained high temperature shortens the life of any drive.
For SSDs the useful counters are different: look at Wear_Leveling_Count or Percentage_Used, Reallocated_Sector_Ct, and Media_Wearout_Indicator depending on the manufacturer. NVMe drives report their own set — use smartctl -a /dev/nvme0 and look at Percentage Used and Available Spare.
Wear counters worth checking
- Power_On_Hours — total hours powered on. Not a fault in itself, but a drive well past its rated life deserves closer attention.
- Start_Stop_Count and Power_Cycle_Count — start and power cycles. Rarely a concern on a server that runs continuously.
Running a self-test
A short self-test takes a couple of minutes and can be run on a working server:
smartctl -t short /dev/sda smartctl -l selftest /dev/sda
The first starts the test, the second shows the results once it has finished. A long test is more thorough but takes hours and slows the disk noticeably, so schedule it for a quiet period.
What to do if the report looks bad
Back up first, investigate afterwards. A drive with growing reallocated or pending sectors may last months or fail the same day, and no attribute tells you which. Get a current copy of the data off the server before doing anything else.
Then open a ticket from our client area with the output of smartctl -a, and we will assess the drive and arrange a replacement if it is needed. Replacement is straightforward when planned in advance and unpleasant when the disk has already failed.
Checking S.M.A.R.T. occasionally is worth the two minutes it takes — it is one of the few things in server operation that gives you warning ahead of time.