There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

Recommended hard drive monitoring (Ubuntu server) options?

I’ve had a home server for years, at first using Windows Server, then Unraid, and now using Ubuntu server. I’ve long known that I should keep a close eye on my spinning rust, but I never really knew the best way to have that monitoring quietly automated in the background, only sending me a message when something bad shows up. If it matters at all (I assume it doesn’t) I am using ZFS on Ubuntu (but not using ZFS as root. It’s mounted in e.g ~/user/storage. My primary drive is an SSD)

What are you all using for hard drive monitoring? What are you using for notifications and (generally) how are you linking those two together?

avidamoeba ,
@avidamoeba@lemmy.ca avatar

Ingredients

  • A 10-line Python script that parses the zpool status and looks for errors
  • A systemd one-shot service that runs it and puts the output into node_exporter
  • A systemd timer that runs the service every 5 minutes
  • A Prometheus container that among other things has an alert for changes in the zpool health data

Result

https://lemmy.ca/pictrs/image/66e4d7f3-f10d-4a2c-99fc-e7d15429fe19.png

Once this is setup, it’s trivial to add other checks like smartmontools, etc. If you add Alertmanager, you can get emails and other alerts sent to you while you’re not looking.

steel_moose ,
@steel_moose@lemmy.world avatar

I just have a shell-script running daily that runs the smartctl short test and checks certain S.M.A.R.T. values and pings healthchecks.io when successful. Easy and seems to do the job.

easeKItMAn ,
@easeKItMAn@lemmy.world avatar

If you want regular automatic hdd checks and don’t need a WebUI I recommend github.com/smartmontools

UFO64 ,

So just as an FYI to those who trust these sorts of things, SMART technology is a self reporting thing. The hard drive is more than capable of lying to the data in that system if it protects the manufacture from responsibility of replacing faulty drives. Whats more, it’s actually pretty rare that SMART reports and issue before the drive just sorta… dies someway or another.

It’s not useless technology, but it’s pretty damn close. I don’t even both with any of my setups. I test it by monitoring if the server has issues reading/writing. SMART wont tell me anything before that will.

Source: Was a firmware engineer on hard drives for 10 years.

easeKItMAn ,
@easeKItMAn@lemmy.world avatar

SMART value monitoring helped me finding faulty drives, not only once. And drives are tested before adding to a production system.
Certainly system drives are separate from data drives. The latter can be perfectly monitored by SMART values.

UFO64 ,

Have done years of enterprise fault analysis, I promise you that SMART will happily tell you there is a problem at the same time you begin to experience data corruption. You might get lucky and catch and altered sector count spike up, or a temperature value go out of family, but in the field those things really suck at predictions.

If you want to know if a drive is healthy, track data corruption at the file system layer.

easeKItMAn ,
@easeKItMAn@lemmy.world avatar

I think you can’t track data corruption either because you will find out only when it occurred. Same is valid for SMART values as you correctly state. I believe it is a mix of using zfs, ECC and SMART monitoring.
phoenixnap.com/blog/data-corruption

Thanks for clarifying the intricacies connected to SMART monitoring.

Shrek ,

Okay, but how do you monitor the issues with reading and writing?

UFO64 ,

If I care about the data? It’s on a file system which reports file corruption.

Otherwise? I don’t trust it at all. I back it up and replace the drive when it dies.

Shrek ,

A file system that reports file corruption. I believe ZFS is one of those? I’m not really familiar with how that works

UFO64 ,

That’s what I use personally, I’ve seen the feature elsewhere too.

vividspecter ,

smartd + email to mailrise which sends notifications to a self hosted gotify instance. I then get notifications through the gotify mobile app and on the web interface.

johnnyfive ,
@johnnyfive@lemmy.world avatar
bear ,

Cheers for this, I just bought a stack of new hard drives myself and this is exactly what I didn’t know I needed.

AbouBenAdhem ,

Does scrutiny recognize zfs pools?

qazwsxedcrfv000 ,
@qazwsxedcrfv000@lemmy.unknownsys.com avatar

Scrutiny uses smartctl --scan to detect devices/drives.

github.com/AnalogJ/scrutiny#getting-started

It will recognize the block devices but not the filesystem construct. That means ZFS pools themselves are out of scope.

MorganCS ,

There’s an app called scrutiny that does exactly what you are looking for

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines