LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-24-2022, 10:07 PM   #1
doumamuzan
Member
 
Registered: May 2021
Posts: 56

Rep: Reputation: Disabled
Question The most common way to check the health of external hard disk?


Because I do not want my external hard disk to suddenly pass away without my knowledge.
 
Old 10-24-2022, 11:13 PM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,877
Blog Entries: 1

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
Whether internal or external, HDDs and SSDs have "Smart" built-in. They can check themselves and provide a comprehensive status and history report. Use smartctl to access that information.
 
1 members found this post helpful.
Old 10-25-2022, 09:23 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,691
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
Even though "SMART" is, of course, an acronym, it is also "damned smart!" Modern disk drives have all sorts of on-board diagnostic capabilities, including the ability to detect and "fail over" bad sectors and the like without involving the operating system. Of course, with the rise of superior "SSD" technology this is now becoming much less important in practice. The output of "smartctl" is quite enlightening.
 
Old 10-25-2022, 10:26 AM   #4
PsychoHermit
Member
 
Registered: Aug 2021
Location: Carson City Nevada
Distribution: Debian Testing
Posts: 138

Rep: Reputation: Disabled
I don't seem to have smarctl and it's not in the Debian testing repository. What package provides smartctl?

Thanks,
--glenn
 
Old 10-25-2022, 10:34 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
smartmontools

Flash drives are not supported as well as some USB enclosures because the USB bridge does not pass the ATA commands.
 
1 members found this post helpful.
Old 10-25-2022, 11:51 AM   #6
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,346

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
Quote:
Originally Posted by PsychoHermit View Post
I don't seem to have smarctl and it's not in the Debian testing repository. What package provides smartctl?

Thanks,
--glenn
I have smartctl on Debian 11. It is in a package called smartmontools. The description of smartmontools is:

"The smartmontools package contains two utility programs (smartctl and smartd)
to control and monitor storage systems using the Self-Monitoring, Analysis and
Reporting Technology System (S.M.A.R.T.) built into most modern ATA and SCSI
hard disks. It is derived from the smartsuite package, and includes support
for ATA/ATAPI-5 disks. It should run on any modern Linux system."

Last edited by jailbait; 10-25-2022 at 11:53 AM.
 
1 members found this post helpful.
Old 10-25-2022, 03:05 PM   #7
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,148
Blog Entries: 21

Rep: Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483
You can also run gparted.

Right click. Unmount
Right click . Check.

I know it it only does a file system check and fix. But. Better than nothing.

My shop computer carries smartctl in AntiX full iso 64bit.

Code:
harry@shop:~apt-cache policy smartmontools
  Installed: (none)
  Candidate: 1.3.5-6
  Version table:
     1.3.5-6 500
        500 http://ftp.us.debian.org/debian bullseye/main amd64 Packages
harry@shop:~
$ locate smartctl
/usr/sbin/smartctl
/usr/share/bash-completion/completions/smartctl
/usr/share/man/man8/smartctl.8.gz
harry@shop:~
Usually it shows up during a live run bootup when ruuning the installer.
Mentioning that your hard drive may fail but they don't know when.
I ignore it because all my gear is old anyways. A nd antiX is known for older computer installs. So the point is moot to me.
Code:
harry@shop:~
$ inxi -b -r
System:
  Host: shop Kernel: 5.10.57-antix.1-amd64-smp arch: x86_64 bits: 64
    Desktop: IceWM v: 3.1.0 Distro: antiX-21_x64-full Grup Yorum 31 October
    2021
Machine:
  Type: Desktop System: LENOVO product: 6075BHU v: ThinkCentre M57
    serial: <superuser required>
  Mobo: LENOVO model: LENOVO serial: <superuser required> BIOS: LENOVO
    v: 2RKT41AUS date: 03/20/2008
CPU:
  Info: dual core Intel Pentium Dual E2160 [MCP] speed (MHz): avg: 1520
    min/max: 1200/1800
Graphics:
  Device-1: Intel 82Q35 Express Integrated Graphics driver: i915 v: kernel
  Display: x11 server: X.Org v: 1.20.11 driver: X: loaded: intel
    unloaded: fbdev,modesetting,vesa dri: i915 gpu: i915
    resolution: 1280x1024~60Hz
  OpenGL: renderer: Mesa DRI Intel Q35 v: 1.4 Mesa 20.3.5
Network:
  Device-1: Intel 82566DM-2 Gigabit Network driver: e1000e
  Device-2: Realtek RTL8191SU 802.11n WLAN Adapter type: USB driver: r8712u
Drives:
  Local Storage: total: 298.09 GiB used: 29.55 GiB (9.9%)
Repos:
  Active apt repos in: /etc/apt/sources.list.d/antix.list
    1: deb http://mirrors.rit.edu/mxlinux/mx-packages/antix/bullseye bullseye main nosystemd nonfree
  No active apt repos in: /etc/apt/sources.list.d/bullseye-backports.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://ftp.us.debian.org/debian/ bullseye-updates main contrib non-free
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://ftp.us.debian.org/debian/ bullseye main contrib non-free
    2: deb http://security.debian.org/ bullseye-security main contrib non-free
  Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
    1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
  No active apt repos in: /etc/apt/sources.list.d/various.list
Info:
  Processes: 145 Uptime: 2h 25m Memory: 3.58 GiB used: 1.17 GiB (32.6%)
  Shell: Bash inxi: 3.3.22
harry@shop:~
Here is just to show it is a local build. In case you are wondering about a .deb.

Code:
harry@shop:~
$ smartctl
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.10.57-antix.1-amd64-smp] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

ERROR: smartctl requires a device name as the final command-line argument.


Use smartctl -h to get a usage summary

harry@shop:~
I only have 1 hard drive on this install so not going to run it. Since you are on Debian. Smart Mon Tools is what you are stuck with.

Last edited by rokytnji; 10-25-2022 at 03:12 PM. Reason: code screwup
 
Old 10-25-2022, 03:16 PM   #8
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,148
Blog Entries: 21

Rep: Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483Reputation: 3483
And like mentioned by sundial. If you supply a link to what kind of hard drive we are discussing.

Maybe someone will point you to a manufacturer tool that is free to use.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Which External Hard disk 1 TB suitable to transfer or copy file from Linux Fedora 8 OS ? The following External Hard Disk wil be suitable RAJIB BNG Linux - Hardware 2 09-23-2017 02:12 AM
LXer: How to check hard disk health on Linux using smartmontools LXer Syndicated Linux News 0 10-15-2014 04:20 PM
LXer: Jamaican Ministry of Health is the first to adopt free and open source health system nationwid LXer Syndicated Linux News 0 11-28-2013 07:02 PM
LXer: Strategy & Management: Issues and innovations: Our health is your health LXer Syndicated Linux News 0 07-13-2006 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration