Turn the Identify (locate) and Fault LEDs of disk slots on and off, on any Linux box with an SES enclosure - built with TrueNAS SCALE in mind.
It walks every SES enclosure on the host, maps each disk to its physical slot by SAS address, and shows the slot status together with the IDENT and FAULT LED state - including empty slots. Pick a slot to toggle its locate LED, or drive it from a one-shot command.
Browser simulation - no hardware is touched. Try
0, f1, x, r, or click an
ON/off cell.
lsscsi -g.aes) page and each disk's
sas_address in sysfs.es) page.sg_ses --index=<type>,<idx> --set|--clear=ident|fault.Array device slot and Device slot
element types automatically.It never writes to disks and does nothing destructive beyond changing an LED. LED control depends entirely on the backplane's SES support - if the hardware can't do it, neither can this.
The LED you switch on to physically find a drive - "which bay is
sdf?". Usually blue or white, steady or blinking.
Marks a slot as failed. Sometimes driven automatically (e.g. a ZFS failure); you can also set it by hand to flag a disk for replacement. Typically red or amber.
list,
--help, --version run unprivileged)sg3-utils (sg_ses), util-linux
(lsblk), lsscsi, awkOne self-contained script - no install, no clone. Download just the script
into any folder and run it with bash. TrueNAS SCALE ships all
dependencies out of the box (there is no apt-get there, and
/usr is read-only) - just download and run. On plain
Debian/Ubuntu, install them first:
sudo apt-get install -y sg3-utils util-linux lsscsi.
curl -fsSLO https://raw.githubusercontent.com/nmuellerdo/ses-led-control/main/bin/ses-led-control sudo bash ses-led-control bash ses-led-control list sudo bash ses-led-control ident on sg3:7 bash ses-led-control --dry-run fault on /dev/sdf
Download the script, run it: interactive menu, table only, switch one LED,
or preview with --dry-run.
Every switching command takes a target, which can be a block device
(/dev/sdf or sdf), a disk serial number, or an
enclosure slot (sgN:slot, e.g. sg3:7).