this post was submitted on 21 May 2025
218 points (97.8% liked)
Programmer Humor
23417 readers
2040 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Broke:
/dev/sd*
Woke:
/dev/disk/by-id/*
Bespoke: finding the correct device's SCSI host, detaching everything, then reattaching only the one host to make sure it's always
/dev/sda
. (edit) In software. SATA devices also show up as SCSI hosts because they use the same kernel driver.I've had to use all three methods. Fucking around in
/sys
feels like I'm wielding a power stolen from the gods.The SCSI solution requires making sure that you have the right terminator connector because of course there's more than one standard .. ask me how I know .. I think the Wikipedia article on SCSI says it best:
Source: https://en.m.wikipedia.org/wiki/SCSI_connector
Only if you're working with SCSI hardware. On Linux, SATA (and probably PATA) devices use the same kernel driver as SCSI, and appear on the system as SCSI hosts. You can find them in
/sys/class/scsi_disk
or by runninglsblk -o NAME,HCTL
.