[email protected]Support 24/7 · Billing 09:00 – 00:00LinkedInXFacebook
NexonHost
Netherlands Dedicated ServersAmsterdam · Equinix AM6Germany Dedicated ServersFrankfurt · Equinix FR4Romania Dedicated ServersBucharest · VoxilityAustria Dedicated ServersVienna · Interxion VIEBulgaria Dedicated ServersSofia · TelepointFrance Dedicated ServersParis · Interxion PAR — Marseille · Digital Realty MRS3Ireland Dedicated ServersDublin · Equinix DB2Italy Dedicated ServersMilan · Irideos AvalonPoland Dedicated ServersWarsawSpain Dedicated ServersMadrid · Equinix MD2United States Dedicated ServersAshburn · Equinix DC
All articles
Getting startedFebruary 21, 2023

How to Install Smartctl on Ubuntu 20.04 – Monitor the health of your hard disks

How to Install Smartctl on Ubuntu 20.04 – Monitor the health of your hard disks

As mentioned above, the smartctl command belongs to the smartmontools utilities that we can install from the official repositories of Ubuntu 20.04. To achieve this, open a terminal or SSH session.

Then, you can update the system

sudo apt update

sudo apt upgrade

Now you can install all the tools with the command

sudo apt install smartmontools

Then we have the commando available for us to use.

 

Using the Smartctl command on Ubuntu and check the health of the hard drive

The first thing we have to do is to run the command as root user. Either you do the commands as root user or using sudo.

To use it, you have to run this command

sudo smartctl -i [disk]

So, you have to replace [disk] with the path of the hard disk. For example:

sudo smartctl -i /dev/sda

From this screen output, pay attention to the last two that indicate if SMART support is enabled.

SMART support is: Available – device has SMART capability.

SMART support is: Enabled

In case the support is not enabled, you have to enable it with the following command:

sudo smartctl -s on -d ata /dev/sda

Remember to replace /dev/sda/ with the path of your device.

Now we can start a test to the hard disk. This can be long or short, depending on us. For a long test, run.

smartctl -t long /dev/sda

And for a short one

smartctl -t short /dev/sda

The same command will tell us how long we have to wait to verify the test, for example, this is the output I got:

smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.13.0-44-generic] (local build)

Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===

Sending command: “Execute SMART Short self-test routine immediately in off-line mode”.

Drive command “Execute SMART Short self-test routine immediately in off-line mode” successful.

Testing has begun.

Please wait 2 minutes for test to complete.

Test will complete after Wed Jun 1 16:28:30 2022 -04

Use smartctl -X to abort test.

Then, verify the test result with the following command:

sudo smartctl -l selftest /dev/sda

In my case, the disk has no error:

# 1 Short offline Completed without error 00% 1143 –

If there are errors, you can see them, and you will be given some recommendations.

 

Uninstalling the smartctl command

If you no longer want to use it, the best thing to do is to uninstall it from the system. To achieve this, just run.

sudo apt remove smartmontools

And that’s it.

Keep reading
How to configure RAID 10 through iLO(HPE).
March 9, 2023

How to configure RAID 10 through iLO(HPE).

How To Configure RAID 10 Through ILO(HPE). Login to the ILO web console. Navigate to Information > Overview Click Integrated Remote Console to launch the KVM console. In the KVM console, perform a Power Reset. Select System Configuration. Chose Embedded RAID 10: Smart Array P440ar controller.…

Read article
How to configure RAID 6 through iLO(HPE).
March 9, 2023

How to configure RAID 6 through iLO(HPE).

How To Configure RAID 6 Through ILO(HPE). Login to the ILO web console. Navigate to Information > Overview Click Integrated Remote Console to launch the KVM console. In the KVM console, perform a Power Reset. Select System Configuration. Chose Embedded RAID 6: Smart Array P440ar controller.…

Read article
How to configure RAID 1 through iLO(HPE).
March 9, 2023

How to configure RAID 1 through iLO(HPE).

How To Configure RAID 1 Through ILO(HPE). Login to the ILO web console. Navigate to Information > Overview Click Integrated Remote Console to launch the KVM console. In the KVM console, perform a Power Reset. Select System Configuration. Chose Embedded RAID 1: Smart Array P440ar controller.…

Read article
Get in Touch

Together, Let’s Build a Faster, Safer Internet.

Build scalable infrastructure with NexonHost — high-performance dedicated servers, VPS hosting, cloud hosting, and DDoS protection across Europe.

Get Started →Contact Us
[email protected]Support 24/7 · Billing 09:00 – 00:00