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

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] rtxn@lemmy.world 19 points 2 days ago* (last edited 2 days ago) (9 children)

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.

[–] vk6flab@lemmy.radio 6 points 2 days ago (1 children)

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:

As with everything SCSI, there are exceptions.

Source: https://en.m.wikipedia.org/wiki/SCSI_connector

[–] rtxn@lemmy.world 4 points 2 days ago* (last edited 2 days ago)

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 running lsblk -o NAME,HCTL.

load more comments (7 replies)