encled(8)

πŸ“¦ version 0-unstable-2022-07, in nixos 26.05, nixpkgs unstable

πŸ‘‘ encled β€” the manual page, but make it cute

okay so bestie, welcome to encled (section 8, sysadmin girlies rise) β€” the little tool that controls SCSI Enclosure indicators, aka the SES LEDs. Yes, the blinky lights. We're doing hardware today and it's gonna slay πŸ’…


✨ SYNOPSIS ✨

encled [--help] [enslosure/slot|disk name|ALL] [locate|fault|off]

that's the whole vibe. three-ish pieces, no cap πŸŽ€


πŸ’– DESCRIPTION πŸ’–

so encled peeks into sysfs and reads the tea that ses.ko dropped there, and uses it to enumerate + control enclosure indication for your disks. literally that's it, that's the job πŸ¦‹

and what even is SES? it's SCSI Enclosure Services β€” a specialized protocol that runs between the enclosure (that's the backplane, bestie) and the HBA (that's your controller). it's the thing that lets you enable/disable indication on the hot-swap slots where your disks live. iconic behaviour honestly ✨


🚦 INDICATION TYPES 🚦

there are exactly two types of indication, and they're giving main character energy:

  • fault β€” the "something is wrong" light 🌸
  • locate β€” the "find me" light, for when you're standing in a cold aisle like πŸ‘οΈπŸ‘„πŸ‘οΈ

there's a third indication (activity) but heads up β€” it's unavailable for control from the host. not yours to touch, sorry babe πŸ’€

⚠️ important: if one indicator is enabled, the other is automatically disabled. they do not coexist. it's one or the other, periodt.

the keywords you actually type are: fault, locate and off πŸ”₯


πŸ” ENUMERATION πŸ”

enclosure enumeration is based on /sys/class/enclosure, and the slot number gets reconstructed from the Slot name of the enclosure. usually it looks something like this:

6:0:23:0/14

where 6:0:23:0 is the enclosure address, and /14 is the 14th slot. simple, right? πŸŽ€

🫢 lowkey a warning, bestie: enumeration in encled may differ from sas2ircu or from the labels physically printed on the actual backplane. don't rely on the slot numbers! fr fr, go check, do not trust the vibe πŸ’€

πŸ’Ύ DISK NAME πŸ’Ύ

two ways to point encled at a disk, pick your fighter:

  • by drive name β€” like /dev/sdaz
  • by slot number β€” like 6:0:24:0/20

and there's a special reserved word, all, for controlling all indication at once. the command encled all off clears all indication. boom, everything off, go home 🌈


🌟 EXAMPLES 🌟

okay here's the group chat of examples, all of them, no skips ✨

fault indication on /dev/sda:

encled /dev/sda fault

locate indication on /dev/sdfa:

encled /dev/sdfa locate

clear indication on /dev/sdz:

encled /dev/sdz off

just view the status of /dev/sdg:

encled /dev/sdg

fault indication for Slot 1 in enclosure 3:0:23:0:

encled 3:0:23:0/1 fault

locate indication for Slot 2 in enclosure 3:0:23:0:

encled 3:0:23:0/2 locate

clear indication for Slot 3 in enclosure 3:0:23:0:

encled 3:0:23:0/3 off

view status of Slot 4 in enclosure 3:0:23:0:

encled 3:0:23:0/4

fault indication for every slot in every enclosure:

encled all fault

view status of all slots in all enclosures:

encled

and here's what that output looks like, aren't you obsessed πŸŽ€

ENCLOSURE/SLOT   DEV FAULT_LED   LOCATION_LED
----------------------------------------------------
6:0:23:0/1  sdd fault_off   locate_off
6:0:23:0/2  sde fault_off   locate_off
6:0:23:0/3  sdf fault_off    LOCATE_ON
6:0:23:0/4  sdg  FAULT_ON   locate_off

πŸ“ NOTES πŸ“

  • encled supports only enclosure based devices (SAS/SATA). that's the assignment.
  • Desktop SATA controllers (AHCI) and direct-attach disks in SCSI are not supported. not invited to the party πŸ™ˆ
  • fun fact for the lore girlies: the older name for encled was sdled πŸ¦‹

✍️ AUTHOR ✍️

written by George Shuklin β€” respect the architect πŸ‘‘


πŸ› REPORTING BUGS πŸ›

found a bug? report it to https://github.com/amarao/sdled β€” the devs wanna know, bestie, don't suffer in silence πŸ’œ


Copyright Β© 2012-2015 George Shuklin

this software is distributed under the GPL version 2 or 3. and there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. so if it breaks, it breaks, and that's the legal tea β˜• no cap.


okay that's the whole page, you're basically a storage engineer now πŸ’…βœ¨ and for the record this is encled-0.1, dated Jun 2015 β€” retro but still slaying. bye bestie, go blink some LEDs 🫢🌸

πŸ“¦ where this page comes from