this post was submitted on 13 Apr 2022
10 points (91.7% liked)
Linux
49469 readers
629 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I thought of something similar, but that again doesn't save me from having to plug in the disks one by one. Don't know what I expected though, because you can't make a hard drive suddenly beep or turn a light on. ^^
I just plug all disks in my server, then run the following script to get the mapping GPTID -> partition -> disk serial:
Then, when a disk fails, I just check with
zpool status
which one is unavailable or completely missing, and see to which serial it corresponds in the previously stored output of the above script.This script is for FreeBSD and assumes you add disks using their GPTID in your ZFS pool (default on TrueNAS), but it can easily be adapted to Linux with a mix of
lsblk --nodeps -o +WWN,SERIAL
and the symlinks in/dev/disk/by-id/
.You can create random read to try to identify a disk (using
badblocks
for instance). If the bad disk is not completely dead, create random read on it and try to "feel" which disk is constantly spinning and creating vibration. If disk is completely dead, do the same on all other disks and feel which one is inactive.But writing down the disk ID -> serial mapping, if the serial is written on the hard drives is a lot easier and more reliable.