Get the disk health status with SMART monitor tools on Debian and Ubuntu Linux

Every current disk includes a built-in monitoring feature known as SMART that keeps track of faults. On Linux, there is a software package called smartmontools that may be used to query the SMART status of the disk to see if it will fail soon.

Table of Contents

Toggle

Installation

apt-get install smartmontools

Usage

First we need to know the internal device name of the harddisks. For the first SATA disk, this is normally /dev/sda, the second is /dev/sdb etc. If you are unsure about the device names of your computer, then you can get them with:

fdisk -l

The command lists the partitions e.g. /dev/sda1. To get the device name, use the partition name without the number, e.g. the device of partition/dev/sda1 is /dev/sda.

Sponsored

To get a summary of the healt status of the disk, run:

smartctl --health /dev/sda

replace /dev/sda with the device name of the harddisk that you want to query.

Sponsored

The output will look similar to this:

~# smartctl --health /dev/sda
smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

To get the full detailed output of all parameters, use this command:

smartctl --all /dev/sda

The post Get the disk health status with SMART monitor tools on Debian and Ubuntu Linux appeared first on FAQforge.

Ubuntu Server Admin

Recent Posts

Software development for the connected car: on the safe side with Anbox Cloud

Today, Android Automotive OS (AAOS) is the preferred operating system for in-vehicle infotainment among major…

24 hours ago

SONiC: The open source network operating system for modern data centers

Software for Open Networking in the Cloud (SONiC) is an open-source network operating system that…

24 hours ago

Ubuntu developer images now available for OrangePi RV2: a low-cost RISC-V SBC

Canonical, the publisher of Ubuntu, is excited to announce the availability of Ubuntu developer images…

3 days ago

Announcing Charmed Kubeflow 1.10

We are thrilled to announce the release of Charmed Kubeflow 1.10, Canonical’s latest update to…

3 days ago

Ubuntu Weekly Newsletter Issue 886

Welcome to the Ubuntu Weekly Newsletter, Issue 886 for the week of March 30 –…

4 days ago

The future of Kubernetes networking: Cilium and other CNIs with Canonical Kubernetes

Choosing the right Container Network Interface (CNI) for Kubernetes is critical to achieving optimal performance,…

1 week ago