Using the correct Device Tree allows you to control all LEDs on the Synology DS216j NAS.
This service reproduces the Synology's default behavior for LEDs of the disks. The LEDs turn on when the disks are powered on at boot. They then blink during read/write operations. When the hd-idle service puts the disks into standby mode, the LEDs turn off. When the disks resume from standby, the LEDs turn on again.
Visit the Linux Device Hacking forum for detailed instructions and help on installing Debian on your device.
Run this command to install the hd-idle service:
apt install hd-idleOr visit this repository to install it from source.
Before installation, you need to configure the disk names.
The disk names used by the diskstation-ledd service must exactly match the
disk names you use in the /etc/default/hd-idle file. Only then everything will
work correctly, as only accurate disk names can determine the occurrence of the
required events in the hd-idle service's journald.
Edit these variables at the beginning of the ./usr/local/bin/diskstation-ledd.sh file:
# Disks must be defined exactly as they are specified in your "/etc/default/hd-idle" file.
DISK1="/dev/sda"
DISK2="/dev/sdb"Then run these commands to install the diskstation-ledd service:
cp ./etc/systemd/system/diskstation-ledd.service /etc/systemd/system/
cp ./usr/local/bin/diskstation-ledd.sh /usr/local/bin/
systemctl enable diskstation-ledd.service
systemctl start diskstation-ledd.service