How to Check Disk Health with smartctl on a Dedicated Server
This guide explains how to check disk health on a Dedicated Server using smartctl from the smartmontools package.
smartctl allows you to read S.M.A.R.T. information from physical HDDs and SSDs. It can show disk model, serial number, power-on hours, temperature, error counters and self-test results.
You need root access to use smartctl. This guide applies to Dedicated Servers where you have direct access to the physical disks installed in the server.
Install smartmontools
On Debian or Ubuntu, install smartmontools with:
apt update apt install -y smartmontools
On AlmaLinux, Rocky Linux or CentOS, use:
dnf install -y smartmontools
On older CentOS systems, use:
yum install -y smartmontools
List Available Disks
Before checking disk health, list available disks:
lsblk -d -o NAME,SIZE,MODEL,SERIAL
Example output:
NAME SIZE MODEL SERIAL sda 1.8T ST2000NM0033 Z1X12345 sdb 1.8T ST2000NM0033 Z1X67890 nvme0n1 1.7T Samsung SSD S6XXXXXX
Disk names are usually:
- /dev/sda, /dev/sdb for SATA/SAS disks.
- /dev/nvme0n1, /dev/nvme1n1 for NVMe disks.
Check Basic Disk Information
To display basic disk information, use:
smartctl -i /dev/sda
Replace /dev/sda with the correct disk name.
This command shows information such as disk model, serial number, capacity, firmware version and whether S.M.A.R.T. is supported and enabled.
For NVMe disks, use:
smartctl -i /dev/nvme0n1
Check Full S.M.A.R.T. Information
To display all available S.M.A.R.T. information for a disk, use:
smartctl -a /dev/sda
For NVMe disks, use:
smartctl -a /dev/nvme0n1
This command shows detailed disk health information, including:
- overall health status,
- temperature,
- power-on hours,
- reallocated sectors,
- pending sectors,
- uncorrectable errors,
- SMART error log,
- self-test history.
Run a Short Self-Test
You can start a short disk self-test with:
smartctl -t short /dev/sda
For NVMe disks, use:
smartctl -t short /dev/nvme0n1
The command will show how long the test should take. After the test finishes, check the result with:
smartctl -a /dev/sda
or for NVMe:
smartctl -a /dev/nvme0n1
Run a Long Self-Test
A long self-test checks the disk more thoroughly and may take much longer, depending on disk size.
To start a long test, run:
smartctl -t long /dev/sda
For NVMe disks, use:
smartctl -t long /dev/nvme0n1
After the test finishes, check the result with:
smartctl -a /dev/sda
A long self-test may take from several minutes to many hours. The disk can usually remain online during the test, but performance may be affected.
Important S.M.A.R.T. Attributes
When checking HDD health, the most important attributes are usually:
- 5 Reallocated_Sector_Ct – reallocated sectors.
- 187 Reported_Uncorrect – reported uncorrectable errors.
- 197 Current_Pending_Sector – sectors waiting to be reallocated.
- 198 Offline_Uncorrectable – uncorrectable sectors found during offline tests.
- 199 UDMA_CRC_Error_Count – communication errors between disk and controller or cable.
Example:
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 12 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 1
In this example, the disk has reallocated sectors and one pending sector. This may indicate a failing disk.
When Is a Disk Considered Failing?
A disk should be treated as failing or End-of-Life if one or more of the following S.M.A.R.T. raw values is greater than 0:
- Attribute 5 – Reallocated Sectors Count
- Attribute 187 – Reported Uncorrectable Errors
- Attribute 197 – Current Pending Sector Count
- Attribute 198 – Offline Uncorrectable Sector Count
If any of these values is greater than 0, or if the value is increasing over time, back up your data as soon as possible and open a support ticket. Disks installed in our Dedicated Servers are provided by us, so disk replacement requests must be reported to our support team.
Check SMART Error Log
In the output of:
smartctl -a /dev/sda
look for the section:
SMART Error Log
If the disk has no logged errors, you may see:
No Errors Logged
If errors are listed there, the disk should be checked more carefully.
If SMART errors are logged, please back up your data and contact our support team with the smartctl output.
Check Disk Temperature
Disk temperature is usually shown in the full smartctl output:
smartctl -a /dev/sda | grep -i temperature
Example output:
194 Temperature_Celsius 0x0022 034 043 000 Old_age Always - 34
In this example, the disk temperature is 34°C.
Useful Commands
Show help:
smartctl -h
Show disk identity information:
smartctl -i /dev/sda
Show all SMART information:
smartctl -a /dev/sda
Run a short test:
smartctl -t short /dev/sda
Run a long test:
smartctl -t long /dev/sda
Show only the SMART health status:
smartctl -H /dev/sda
What Should You Send to Support?
If you suspect a disk problem, please open a support ticket and include the full smartctl output for the affected disk.
You can save the output to a file with:
smartctl -a /dev/sda > smart-sda.txt
For NVMe disks:
smartctl -a /dev/nvme0n1 > smart-nvme0n1.txt
Please attach the file to your ticket or paste the relevant output in the ticket message.
Verification
If smartctl displays disk information and the health status without errors, S.M.A.R.T. data can be read correctly from the disk.
S.M.A.R.T. warnings, reallocated sectors, pending sectors or uncorrectable errors may indicate disk problems. Always keep your own backups of important data and contact our support team if you suspect a failing disk.