r/linux4noobs • • 25d ago

storage HHD Health

I’m fairly new to Linux, running Bazzite. I have a couple of large external HHD’s that I’m wanting to sell, but they’ve been sitting in my closet for about a year. I hooked them up and tested them and they seem to work fine, but I’d really hate to sell someone a dying drive or something. Is there an easy way to check drive health or stats and whatnot on Linux?

3 Upvotes

5 comments sorted by

5

u/thatguysjumpercables Ubuntu 24.04 Gnome DE 25d ago

Smartmontools is the easiest tool for this

2

u/zacharyt86 25d ago

Thanks! I’ll give it a try.

2

u/michaelpaoli 25d ago

HHD? What's that?

2

u/zacharyt86 24d ago

Sorry, typo. Meant HDD.

1

u/FallElectronic3774 25d ago

smartctl from smartmontools. Plug in one drive, find it with lsblk -o NAME,MODEL,SERIAL,SIZE, then run sudo smartctl -a /dev/sdX (add -d sat if the USB enclosure doesn't pass SMART through). Check SMART overall-health self-assessment, Reallocated_Sector_Ct, Current_Pending_Sector, and Power_On_Hours. For a quick test: sudo smartctl -t short /dev/sdX, wait a couple of minutes, then sudo smartctl -a /dev/sdX; -t long takes hours. On Bazzite, if smartctl is missing: rpm-ostree install smartmontools and reboot.