miskcoo / ugreen_leds_controller

An LED Controller for UGREEN's DX/DXP NAS Series
180 stars 26 forks source link

Added SMART monitoring based on smartctl #5

Closed yooooki closed 5 months ago

yooooki commented 5 months ago

The disk failure reported by smartctl -H will be reflected on leds. Empty slots will have corresponding leds turned off. The sata devices are now mapped to leds based on hctl by default. Also added an option to map devices based on their serial numbers. (serial numbers must be manually configured) Fixed a bug in SMART polling invertal control. Failed disk will be marked and left untouched. The failure date will be recorded.

miskcoo commented 5 months ago

Thanks! I will try this script later.

yooooki commented 5 months ago

Line 64 and line 65 should be

declare -A diskio_data_r
declare -A diskio_data_w

in the new script, otherwise disk leds will keep blinking.

Sorry for the inconvenience.