How to check Hard Drive and SSD Health on Linux with smartctl

Configurare noua (How To)

Situatie

SMART data can warn you that a drive is failing before you lose data. The smartctl tool reads it directly from the drive.

Requirements: a Linux system and sudo privileges.

Solutie

  1. Open a terminal and install the tool:
sudo apt install smartmontools

(on Fedora/RHEL: sudo dnf install smartmontools)

  1. List your drives to find the device name:
lsblk -d -o NAME,SIZE,MODEL
  1. Run a quick health check (replace sda with your drive, or use nvme0 for NVMe SSDs):
sudo smartctl -H /dev/sda

PASSED means the drive does not currently report a failure.

  1. View the full SMART report:
sudo smartctl -a /dev/sda
  1. On SATA drives, check these attributes: Reallocated_Sector_Ct, Current_Pending_Sector and Offline_Uncorrectable. Any raw value above 0 is a warning sign. On NVMe drives, check Percentage Used, Available Spare and Media and Data Integrity Errors.
  2. Start a short self-test (takes about 2 minutes):
sudo smartctl -t short /dev/sda
  1. After it finishes, read the result:
sudo smartctl -l selftest /dev/sda

Note: a drive can pass the -H check and still be failing. If any warning attribute is non-zero, back up your data immediately.

Tip solutie

Permanent

Voteaza

(0 din 0 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?