smartmontools and run sudo smartctl -H /dev/sda: PASSED means the drive does not predict its own failure. For the full picture, run sudo smartctl -a /dev/sda and look at reallocated and pending sectors (hard disks and SATA SSDs) or Percentage Used and Media and Data Integrity Errors (NVMe). Start a self-test with sudo smartctl -t short /dev/sda.
Before you start
- This page is for dedicated servers, where Linux talks to real disks. A VPS uses virtual disks, which usually do not expose SMART data:
smartctlthen reportsUnable to detect device type. That is expected and says nothing about the physical hardware. Keep VPS data safe with panel backups and your own backups. - SMART (Self-Monitoring, Analysis and Reporting Technology) is the drive’s own health log. A drive can fail without warning even when SMART looks fine, so it never replaces backups.
- Commands use
sudo; root users can leave it out.
How to install smartmontools
- Ubuntu / Debian
- AlmaLinux / Rocky / Fedora
How to find your disks
lsblk -o NAME,SIZE,MODEL,SERIAL also lists each disk with its model and serial number.
How to check disk health with smartctl
1
Get the overall verdict
FAILED means the drive has failed or expects to fail soon. Back up straight away.2
Read the details
sudo smartctl -x /dev/sda shows even more, including logs -a leaves out.3
Check the attributes that matter
See the tables below. Rising numbers matter more than a single reading, so note today’s values.
Hard disks and SATA SSDs: what to look at
Use the
RAW_VALUE column. Any growth in 5, 197 or 198 is a reason to plan a replacement.
NVMe drives: what to look at
How to run a SMART self-test
1
Start the test
smartctl prints when it will finish. -t long is thorough and can take hours on large disks. The disk stays usable meanwhile.2
Read the result
Completed without error is good. Completed: read failure means the disk has unreadable sectors.How to check disks behind a RAID controller
Disks behind a hardware RAID controller are hidden behind one logical device. Tellsmartctl which physical disk to query, for example for a MegaRAID/PERC controller:
smartctl --scan often lists the right -d value. With Linux software RAID (mdadm), query each member disk directly, as above.
How to get alerts with smartd
Thesmartd service checks your disks in the background and emails you when something changes. It needs working mail on the server.
- Edit the configuration file. On Ubuntu / Debian it is
/etc/smartd.conf; on AlmaLinux / Rocky,rpm -qc smartmontoolsshows its path. Comment out the existingDEVICESCANline with#and add: - Enable and restart the service:
- Ubuntu / Debian
- AlmaLinux / Rocky / Fedora
smartd is an alias of the smartmontools service, so systemctl restart smartd also works, but enabling must use the real name.What to do if a disk is failing
- Make a fresh backup immediately. See back up a Linux server.
- Note the disk’s serial number:
sudo smartctl -i /dev/sda. - If the disk is part of software RAID, follow replace a disk with mdadm.
- Open a ticket with the
smartctl -aoutput and serial number.
Frequently asked questions
Why does smartctl say “Unable to detect device type” on my VPS?
VPS disks are virtual devices, which usually do not pass SMART data through. This is normal and you cannot check physical disk health from inside a VPS.Does PASSED mean my disk is fine?
It means the drive does not predict failure by its own thresholds. Disks can still fail suddenly, and attributes such as pending sectors can rise long before the verdict changes. Read the attributes and keep backups.How often should I check SMART?
Letsmartd check continuously and email you. Look at the full smartctl -a output monthly, or after any disk errors in journalctl -k.
Is a short self-test safe on a live server?
Yes. Self-tests run inside the drive while it keeps working. A long test may slow heavy disk work slightly.Related guides
VPS and dedicated server guides
Every guide in this section.
Software RAID with mdadm
Check arrays and replace a disk.
Back up a Linux server
Protect your data first.
Check disk I/O performance
Find slow disks.
Read logs with journalctl
Look for kernel disk errors.
Checked against the official smartctl manual page from smartmontools on 4 November 2026; installation, the default
smartd.conf, the service names and the Unable to detect device type result on a virtual disk checked on Ubuntu 24.04 LTS (smartmontools 7.4). Health output examples could not be produced on physical disks in our environment. Commands can differ on other distributions or releases.Need Extra Help?
If you encounter any issues, our support team is ready to assist:- Live Chat: Quick assistance via our website.
- Support Ticket: Open a Ticket
- Discord: Join our Community
- Email: support@freakhosting.com
Last Updated: November 2026