Linux disk health check: verify your drive from the terminal

A step-by-step terminal checklist to check disk health on Linux: rule out full space and inodes, read the SMART self-assessment, and check live I/O per process.

LinuxhardwareFilessystemstoragedisk-spaceDiagnosticsMedium risk
Run a SMART self-assessment query on your drive to get an immediate PASSED or FAILED health verdict.

What this covers

Slow I/O, freezes, or read errors can come from a failing drive — or from something much simpler. This checklist walks you from cheap software causes (full space, exhausted inodes, runaway processes) to the drive's own SMART self-assessment, so you know whether to troubleshoot software or plan a replacement.

Symptom

?The system freezes intermittently, file operations hang or throw I/O errors, or a drive feels much slower than usual.

Confirm the filesystems have free space

Before digging into drive hardware, rule out a full disk — it produces similar symptoms like freezes and slow I/O. Run the check and make sure no mounted filesystem shows 100% used. If one is full, a capacity issue, not health, may be your real problem.

Show total, used, and available space plus usage percentage for every mounted filesystem in human-readable units.

Command
$ df -h

Rule out inode exhaustion

A filesystem can report free gigabytes yet refuse new files because its inodes are exhausted. Check the IUse% column; anything near 100% means the space problem is metadata, not hardware. This step is optional but saves a misdiagnosis.

LinuxCheck inode usage with df -iLow riskStep 2Optional

Diagnose 'No space left on device' errors when gigabytes of free space remain.

Command
$ df -i

Query the drive's SMART self-assessment

This is the core health check. The drive's firmware reports a one-line self-assessment: PASSED means no immediate SMART failure detected, FAILED means the drive predicts failure and should be backed up and replaced now. If SMART data is unavailable, make sure the drive supports SMART and that smartmontools is installed.

smartctl -H queries a drive's SMART self-assessment and answers with PASSED or FAILED in one line.

Command
$ sudo smartctl -H /dev/sda

Check whether a process is hammering the disk

Even a healthy drive feels slow when some process is constantly reading or writing. Watch the live I/O view for a few minutes: if one process dominates, the symptom is load, not hardware. If I/O is idle and the disk still lags, the health findings above carry more weight.

LinuxFind Disk I/O Per Process with iotopMedium riskStep 4Optional

Use iotop to see exactly which process is reading and writing your disk in real time.

Command
$ sudo iotop -o -a

Note your BIOS version for follow-up

Some disk issues (drive not detected, unstable SATA link) are fixed in firmware updates. Record your current BIOS version and board model so you can compare against the vendor's update page if the health checks come back clean but problems persist.

LinuxCheck your BIOS version from LinuxMedium riskStep 5Optional

dmidecode reads the DMI/SMBIOS table to report the exact BIOS version and board model — the values you compare against the vendor's update page.

Command
$ sudo dmidecode -s bios-version && sudo dmidecode -t baseboard
▾ Undo
Undo
$ null
!A PASSED SMART result is not a guarantee — drives can fail without warning. If SMART reports FAILED, back up immediately; every further boot is borrowed time.

How to confirm it worked

A clean result looks like: no filesystem at 100% usage, inode usage well below the limit, a SMART verdict of PASSED, and no single process dominating disk I/O.

Undo everything

Every command above can be reverted. Run these in order to undo all of it.

Undo everything
$ null

Review before running — some steps may not be independent.

Sources

  • df(1) — report file system disk space usage
    man7.org · technical · 2026-09-17
    Evidence: The df man page documents '-h' / '--human-readable' as printing sizes in powers of 1024 with human-readable units like G.
  • df(1) — Arch Manual Pages
    Arch Linux · community · 2026-09-17
    Evidence: Same coreutils page: --inodes reports inode usage per filesystem instead of block usage.
  • df(1) — Debian bookworm
    Debian Manpages · community · 2026-09-17
    Evidence: Documents -i, --inodes: list inode information instead of block usage, with IUsed/IFree/IUse% columns.
  • smartctl(8) - Control and Monitor Utility for SMART Disks
    Ubuntu Manpages · technical · 2026-09-17
    Evidence: -H, --health: prints the SMART health status of the device; smartctl monitors SMART data and reports device health.
  • iotop(8) — Debian manpage
    Debian · community · 2026-09-17
    Evidence: Debian manpage for iotop documents -o (only show processes actually doing I/O) and -a (accumulated I/O) options
  • iotop(8) — Arch Linux manual
    Arch Linux · community · 2026-09-17
    Evidence: Arch manual describes iotop's --only (-o) option to show only processes or threads actually doing I/O
  • dmidecode(8) — DMI table dumper
    Debian · community · 2026-09-17
    Evidence: -s bios-version and -t baseboard extract DMI fields
  • Kernel admin guide
    kernel.org · community · 2026-09-17
    Evidence: background for firmware-related troubleshooting

Last verified: 2026-09-21

Related guides