Tracking a fleet of drives in Linux

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Scott Laird

Well-Known Member
Aug 30, 2014
459
289
63
I have ~160 drives online at home. Not as many as a few people here, but still *way* more than most, and more than I can keep track of without help. So things keep happening that *really* show that I need better organization. For instance, I've replaced drives in zpools, forgotten to remove them from the enclosure, and then 6 months later asked myself "where did this unused drive come from?" and tried to put it back into production. Oops.

I've been slowly building up a tool for managing my pile of drives on Linux over the past few years, and it's finally reached the point where it's (probably) useful for others. It IDs drives, figures out how they're used (ZFS plus bare mounts now, but can be extended for LVM/mdadm/btrfs pretty quickly), keeps track of lifecycles in a database and over the network, maps drives to enclosures, tracks kernel errors, SMART status, IO performance, SAS topology, and can flag drives that it thinks are nearing the end of their life. Somewhere along the way, it also gained the ability to catalog DIMMs (including serial numbers and ECC errors) and SFP/QSFP modules (also with serial numbers, to stop me from re-using probably-bad QSFPs *again*). At this point, I'm running it on on almost every Linux system I have, including 3 Mellanox switches that I have running (patched) VyOS.

The code is on GH (GitHub - scottlaird/drivelist: Tooling for managing large numbers of drives (20+) under Linux), Apache 2.0 licensed.

There's also a demo snapshot at drivelist where you can see what it collects and how it's useful.

If you look at this and say "dear lord, you need help", then (a) you're probably right, and (b) it's not the tool for you :). On the other hand, if this looks like it'll solve one of your problems, then feel free to give it a try. It's in Go, uses SQLite for storage, and has as few dependencies as possible. There are .debs on GH that work with Debian and Ubuntu, or it's pretty trivial to compile.
 
  • Like
Reactions: TRACKER and itronin