Hostxpeed
Login Get Started →
Server Management

How to Check Disk Health (SMART)

5 min read
21 views
Jun 10, 2026

Prerequisites

Before checking SMART data, make sure you have:

  • SSH access to your VPS
  • Root or sudo privileges
  • Physical disk access (not always available on VPS)

💡 Many VPS providers do not expose SMART data. If commands fail, contact Hostxpeed for disk health information.

Step 1: Install smartmontools

Connect to your VPS:

ssh hxroot@YOUR_SERVER_IP -p 22
sudo apt install smartmontools -y

Step 2: Identify Disks

lsblk
sudo fdisk -l

Step 3: Check if SMART is Enabled

sudo smartctl -i /dev/vda

Look for "SMART support is: Enabled".

Step 4: View SMART Health Summary

sudo smartctl -H /dev/vda

Output: PASSED or FAILED.

Step 5: View Detailed SMART Attributes

sudo smartctl -A /dev/vda

Key attributes to watch:

  • Reallocated_Sector_Ct – should be 0 (non-zero indicates failing disk)
  • Current_Pending_Sector – should be 0
  • Uncorrectable_Sector_Ct – should be 0
  • Temperature_Celsius – should be under 60°C
  • Power_On_Hours – total runtime

Step 6: Run Short Self-Test

sudo smartctl -t short /dev/vda

Wait about 2 minutes, then check results:

sudo smartctl -l selftest /dev/vda

Step 7: Run Extended Self-Test (Takes Hours)

sudo smartctl -t long /dev/vda

Monitor Disk Health with a Script

#!/bin/bash
if ! smartctl -H /dev/vda | grep -q PASSED; then
    echo "Disk health warning on $(hostname)" | mail -s "SMART Alert" admin@example.com
fi

✅ SMART data checked. Replace disk if PASSED is not shown.

Was this article helpful?