Skip to content

Check NVMe Health Linux: 7 SSD Health Checks

check NVMe health Linux servers using smartctl and nvme-cli to inspect available SSD SMART data, NVMe temperature, drive endurance, and media errors. These tools help Linux administrators identify potential storage issues, but a virtualized VPS may not expose the underlying physical drive’s health information.

How to Check SSD and NVMe Health on a Linux VPS

Storage problems on a Linux VPS can cause slow disk operations, unexpected I/O errors, application downtime, and—in serious cases—data loss. Regularly checking the storage information available to your operating system can help identify warning signs before they become bigger problems.

Linux provides several tools for inspecting storage devices, including smartctl and nvme-cli. Depending on hardware support and permissions, these utilities can report drive temperature, available spare capacity, endurance usage, media errors, and other health information.

However, a virtualized VPS does not necessarily expose the physical SSD or NVMe device to the guest operating system. You may be able to inspect the virtual disk without being able to access the physical drive’s SMART information.

This guide explains how to check NVMe health on Linux, inspect SSD SMART data, interpret important indicators, and understand the limitations of virtualized environments.

1. Identify Your Linux Storage Devices

Before running health checks, identify which storage devices are visible to your operating system.

Run:

lsblk -o NAME,TYPE,SIZE,ROTA,FSTYPE,MOUNTPOINTS,MODEL

This command lists block devices, their sizes, mount points, and available device information.

For a simpler overview, use:

lsblk -d -o NAME,TYPE,SIZE,ROTA,MODEL

Typical device names include:

  • /dev/sda — commonly a SATA or SCSI disk, or a virtual disk.
  • /dev/vda — commonly a VirtIO virtual disk.
  • /dev/nvme0n1 — an NVMe namespace device.
  • /dev/xvda — a disk name used in some virtualized environments.

These names are examples, not guarantees. A device named /dev/sda is not necessarily a physical SATA SSD, and a virtual NVMe device does not automatically provide access to the underlying physical drive.

Check filesystem usage separately:

df -hT

Filesystem usage and drive health are different measurements. A filesystem can be nearly full while the underlying drive is healthy, or a drive can report health warnings while plenty of storage space remains available.

2. Install smartmontools

The smartctl utility is included in the smartmontools package. It can query supported storage devices for SMART attributes and self-test information.

Ubuntu and Debian

sudo apt update
sudo apt install smartmontools

AlmaLinux, Rocky Linux, and RHEL-compatible systems

sudo dnf install smartmontools

On older systems using YUM:

sudo yum install smartmontools

Verify the installation:

smartctl --version

Installing the package only provides the software. It does not grant access to physical hardware that a hypervisor or hosting provider has hidden from the guest operating system.

3. Check SSD Health with smartctl

If your system exposes a compatible storage device and permits SMART access, run:

sudo smartctl -a /dev/sda

Replace /dev/sda with the correct device identified earlier.

For a compatible SATA SSD, the output may include:

  • SMART overall-health assessment
  • Reallocated sectors
  • Reported uncorrectable errors
  • Temperature
  • Power-on hours
  • Wear-related attributes, when supported
  • SMART self-test history

Some drives use vendor-specific SMART attributes, so the meaning of individual raw values can vary by manufacturer.

Check whether SMART is supported

Run:

sudo smartctl -i /dev/sda

If SMART is supported and accessible, the output may include the device model, firmware version, and SMART support status.

If the command reports that SMART is unavailable, unsupported, or inaccessible, do not immediately conclude that the drive is failing. Possible explanations include:

  • The device is a virtual disk.
  • The hypervisor does not expose SMART information.
  • The device requires a different access method.
  • The current user lacks sufficient permissions.
  • The storage controller does not support the requested operation.

Do not guess device types or force controller-specific options on a production system without confirming the storage configuration.

4. Install nvme-cli and Inspect NVMe Devices

NVMe devices provide a health information log that can report several useful indicators. Linux administrators can query this information using nvme-cli.

Install nvme-cli

On Ubuntu or Debian:

sudo apt update
sudo apt install nvme-cli

On supported AlmaLinux, Rocky Linux, or RHEL-compatible systems:

sudo dnf install nvme-cli

Verify the installation:

nvme version

List available NVMe devices

Run:

sudo nvme list

If accessible NVMe devices are available, the output can include the device path, model, serial number, firmware revision, and namespace information.

An empty result does not prove that the VPS has no NVMe-backed storage. The host may provide a virtual disk without exposing an NVMe controller to the guest.

Read the NVMe SMART log

To check NVMe health on a Linux system that exposes a supported controller, run:

sudo nvme smart-log /dev/nvme0

Use the controller device shown by nvme list. A typical controller path may be /dev/nvme0, while /dev/nvme0n1 represents an accessible namespace.

The command can report:

  • Critical warning flags
  • Composite temperature
  • Available spare capacity
  • Available spare threshold
  • Percentage of endurance used
  • Data units read and written
  • Host read and write commands
  • Power cycles and power-on hours
  • Unsafe shutdowns
  • Media and data integrity errors
  • Error information log entries

The exact output depends on the device, firmware, NVMe implementation, and permissions available to the guest.

5. Understand Important NVMe Health Indicators

The following indicators are particularly useful when reviewing an NVMe health log.

Indicator Meaning What to check
critical_warning Bit flags indicating defined warning conditions Investigate any nonzero value and identify the reported condition
temperature Composite temperature reported by the controller Compare it with the manufacturer’s operating limits
available_spare Remaining spare capacity as a percentage Check whether it is approaching the reported threshold
available_spare_threshold Threshold for available spare capacity A value at or below this threshold is a warning sign
percentage_used Estimated endurance consumed Values near 100% indicate substantial rated endurance usage
media_errors Media and data integrity error count Investigate increasing counts or related I/O errors
num_err_log_entries Number of entries in the NVMe error information log Inspect the error log and correlate entries with symptoms
unsafe_shutdowns Count of unsafe shutdown events Investigate unexpected resets or power interruptions

What does percentage_used mean?

The NVMe percentage_used value estimates how much of the device’s rated endurance has been consumed. It is not a direct measurement of remaining lifespan or a guarantee that the drive will fail at 100%.

A value at or above 100% means the estimated rated endurance has been consumed. It does not necessarily mean that the drive has stopped working.

For SSDs, manufacturer-specific wear indicators may provide additional context. Avoid interpreting raw SMART attributes without checking the relevant manufacturer’s documentation.

What do media_errors mean?

A nonzero media_errors count deserves investigation, especially if it increases over time or appears alongside I/O errors. However, one historical error does not automatically mean the device is currently failing.

Review kernel messages for storage-related symptoms:

sudo journalctl -k --since "24 hours ago"

To filter for common storage-related messages:

sudo journalctl -k --since "24 hours ago" \
  | grep -Ei 'nvme|I/O error|medium error|reset|timeout'

A matching message is evidence to investigate, not definitive proof of a failed SSD. Other hardware, driver, controller, or virtualization problems can produce similar symptoms.

6. Check NVMe Error Logs and Device Details

If the NVMe controller is accessible, inspect its error information log:

sudo nvme error-log /dev/nvme0

The error log may provide additional context for controller-reported errors. The available information and number of returned entries depend on the device and firmware.

Inspect controller information:

sudo nvme id-ctrl /dev/nvme0

Where supported, inspect namespace information:

sudo nvme id-ns /dev/nvme0n1

These commands are useful for identifying device capabilities and configuration. They do not replace the health log, and they may be unavailable when the guest sees only a virtual block device.

If the controller cannot be accessed, avoid repeatedly trying arbitrary device paths. Confirm which devices are exposed and whether the hosting platform supports NVMe passthrough or SMART access.

7. Run SMART Self-Tests When Supported

Some physical drives support built-in SMART self-tests. Before running one, verify that the drive supports the operation and that the selected device is correct.

For a compatible SATA SSD, check available self-test capabilities:

sudo smartctl -c /dev/sda

A short test can be started with:

sudo smartctl -t short /dev/sda

After the indicated test duration, inspect the result:

sudo smartctl -l selftest /dev/sda

For supported devices, a long test can be started with:

sudo smartctl -t long /dev/sda

A long test can take considerably longer, depending on the device. Follow the tool’s reported timing and the drive manufacturer’s guidance.

Do not run these commands blindly on every VPS. A virtual disk may not support self-tests, and a guest may not have access to the underlying physical drive. A guest-level test also cannot substitute for a provider-managed physical storage diagnostic.

8. Why SMART Data May Be Missing on a Virtualized VPS

This is one of the most important limitations when you check NVMe health on Linux.

In a typical virtualized environment, the physical SSD or NVMe drive belongs to the host server. The VPS receives a virtual block device that the hypervisor presents to the guest.

For example, your VPS might show:

NAME   TYPE  SIZE  ROTA
vda    disk   80G     0

The ROTA value of 0 indicates that Linux reports the device as non-rotational. It does not prove that the physical storage device is an SSD, nor does it expose the physical drive’s wear level.

Similarly, a virtual device may return limited device information while withholding the physical controller’s SMART log.

Common virtualization limitations

  • KVM and QEMU: Guests commonly receive virtual block devices such as VirtIO disks. Physical SMART data is not automatically exposed.
  • VMware: The guest may see a virtual SCSI or NVMe device rather than the underlying physical storage hardware.
  • Xen and other virtualization platforms: Device visibility depends on the virtual block-device configuration and host implementation.
  • Cloud VPS platforms: Storage may be backed by networked storage, distributed storage, or shared host devices, so there may not be a single physical drive that maps directly to your VPS.

These are common patterns, not universal rules. Hardware passthrough and specialized configurations can expose additional device information.

What should you do if SMART is unavailable?

If smartctl or nvme-cli cannot access the physical drive’s health data:

  1. Confirm the storage device visible to the VPS.
  2. Check whether the error indicates unsupported functionality, insufficient permissions, or an unavailable device.
  3. Review the guest’s kernel logs for actual I/O errors, timeouts, or repeated device resets.
  4. Contact your hosting provider and ask whether physical SSD/NVMe health monitoring is available.
  5. Keep independent backups even when the VPS reports no storage errors.

The hosting provider may have access to host-level SMART monitoring, drive wear indicators, controller alerts, and hardware replacement procedures that are not visible from the guest.

9. Troubleshoot Common SSD and NVMe Health-Check Problems

Error: SMART support is unavailable

Possible cause: The virtual disk or controller does not expose SMART information to the guest.

Recommended action: Verify the device path and virtualization configuration. Ask your provider whether host-level SMART health checks are available.

Error: Permission denied

Possible cause: The command requires elevated privileges or access to the device is restricted.

Recommended action: Run the appropriate diagnostic with sudo if you have administrative access. If access remains restricted, do not attempt to bypass the hypervisor’s device permissions.

Error: No NVMe controllers detected

Possible cause: The VPS exposes a virtual SCSI, VirtIO, or other block device rather than an NVMe controller.

Recommended action: Check the devices visible to Linux:

lsblk

Then run:

sudo nvme list

If no controller is visible, physical NVMe health information may not be available from the guest.

SMART command exits with a nonzero status

A nonzero smartctl exit status does not always mean the same thing. The utility uses a bitmask to report different conditions, including command errors and health-related findings.

Read the actual output and consult the smartctl documentation rather than treating every nonzero exit code as proof of hardware failure.

High disk latency but no visible SMART warnings

A healthy-looking SMART report does not rule out storage performance problems. High latency can result from host contention, throttling, networked storage, excessive I/O, or other infrastructure issues.

Inspect basic disk statistics with:

iostat -xz 1 5

The iostat utility is provided by the sysstat package on many distributions. Install that package if the command is unavailable.

In virtualized environments, these statistics describe the guest-visible block device. They do not necessarily reveal physical disk utilization or the host’s complete storage performance.

10. Build a Practical SSD Health-Checking Routine

For a VPS that exposes compatible hardware health information, a useful routine is to:

  • Check the NVMe SMART log or SSD SMART attributes periodically.
  • Record changes in endurance usage, available spare capacity, and media errors.
  • Investigate critical warnings and recurring storage-related kernel messages.
  • Monitor filesystem usage separately from hardware health.
  • Keep verified backups and periodically test restoration.
  • Contact the hosting provider when physical hardware information is hidden or guest-visible I/O errors persist.

For example, review filesystem usage:

df -hT

Review recent kernel storage messages:

sudo journalctl -k --since "24 hours ago" \
  | grep -Ei 'nvme|I/O error|medium error|reset|timeout'

On a system with an accessible NVMe controller, run:

sudo nvme smart-log /dev/nvme0

Replace the device path with the actual controller identified on your system. These commands are diagnostic starting points, not a complete automated monitoring system.

Frequently Asked Questions

Can I check physical SSD health from a Linux VPS?

Sometimes, but not always. The hypervisor must expose the necessary device information and permissions. If it does not, your hosting provider must check the underlying physical storage.

Does ROTA=0 mean my VPS uses an NVMe SSD?

No. It indicates that Linux reports the visible block device as non-rotational. It does not identify the physical drive type or prove that the underlying storage is NVMe.

Is a high NVMe percentage_used value an immediate failure warning?

Not by itself. It estimates consumed rated endurance. Review the full health log, manufacturer guidance, critical warnings, media errors, and any actual I/O problems.

What should I do if NVMe health data is unavailable?

Check the visible device paths, review kernel messages, maintain reliable backups, and ask your provider whether host-level storage health monitoring is available.

Conclusion

Checking SSD and NVMe health on Linux can help identify endurance warnings, temperature problems, media errors, and other storage issues. The smartctl utility is useful for compatible SSDs, while nvme-cli provides access to NVMe health logs when the controller is exposed.

The key limitation is that a virtualized VPS may not reveal the physical drive’s SMART data. A missing health report is not proof that the drive is healthy—or that it is failing. Combine the information available inside the guest with kernel diagnostics, reliable backups, and provider-level hardware monitoring.

If your VPS does not expose physical drive health information, ask your hosting provider to confirm how the underlying storage is monitored and how hardware failures are handled.