this post was submitted on 13 Apr 2022
10 points (91.7% liked)
Linux
49469 readers
634 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
A rather more sophisticated way to identify a disk, if it's in an enclosure that has ID LEDs, is to use sg_ses.
The rough process for that is:
lsscsi -g
to get the generic SCSI device (/dev/sgN
) for the enclosure.lsscsi -t
to get the SAS address for a disk. (Not sure whether this will work if it's a SATA enclosure; all of mine are SAS.)sg_ses -p aes /dev/sgN | less
, where/dev/sgN
is the enclosure's generic SCSI device. Look through the output to find the SAS address and, from that, get the index number of the disk.sg_ses --set ident --index I /dev/sgN
, whereI
is the disk index number and/dev/sgN
is the enclosure's device. This will turn on the ID LED for the disk.sg_ses --clear ident --index I /dev/sgN
to turn the LED off.You can also use
fault
instead ofident
to turn on the "drive fault" LED, in case the enclosure has those but not ID LEDs.