• 0 Posts
  • 4 Comments
Joined 3Y ago
cake
Cake day: Sep 21, 2021

help-circle
rss

I thought of something similar, but that again doesn’t save me from having to plug in the disks one by one.

I just plug all disks in my server, then run the following script to get the mapping GPTID -> partition -> disk serial:

#!/bin/sh

glabel status | awk '/^gptid/ { print $1, $3 }' | while read -r gptid part; do
        disk="/dev/${part%p*}"
        serial="$(smartctl -i "$disk" | awk '/^Serial Number:/ { print $3 }')"
        printf '%s\t%s\t%s\n' "$gptid" "$part" "$serial"
done

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/.

Don’t know what I expected though, because you can’t make a hard drive suddenly beep or turn a light on. ^^

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.


You can get the disk serial with smartctl -i /dev/.... Serial should be written on disk. Keep a mapping of disk ID -> serial.

If serial is not visible without taking all disks apart, it’s a good idea to put a sticker with a copy of it on the side of the disk or disk tray depending on your NAS form factor.


In Orbot, you have a “VPN mode” toggle, when enabling it, it will create an Android VPN connection which “torify” the traffic of all apps you have selected in the “Tor-Enabled Apps” section. You can select all apps, but still need to remember to go add new apps each time you install them (I don’t think there is an automated way to do it).

Unless this changed recently, Android only support a single active VPN connection at a time, so unfortunately this Orbot mode cannot be used in conjunction with a standard VPN.


Direct Rendering Manager != Digital Rights/Restrictions Management