LED signalling function of flash drive connected as /srv/

Because sometimes a flash drive in the /srv/ position fails and it is necessary to occasionally question its status … /foris/config/main/storage/ . It would be more convenient if it were possible for the LED at the User position to signal its connection … and optimally the LED flickering off when writing in progress.

TOS 5.1.10, branch hbs

How to set rainbow and LED configuration to USER 2 position to signal a functional (connected) flash drive and by turning off the light in progress writing to the disk. So far, all I’ve done is get the LED signaling a resued flash drive.

/etc/config/rainbow

config led 'usr2'
	option color '310431'
	option status 'auto'

===

/etc/config/system

config led
	option sysfs 'omnia-led:user2'
	option name 'srv'
	option default '1'
	option trigger 'usbdev'
	option dev '2-1'

i have two usb drives (one is for “srv” and second as “backup storage”) and both are assigned to user2-led, which is off and flashes when there is write/read. Some time ago (many TOS updates back), there was trigger for writes or reads available, now there is just “usbdev”.

Here is my setup …

config led
    option name 'USB1'
    option trigger 'usbdev'
    option dev '3-1'
    option default '0'
    option sysfs 'omnia-led:user2'

config led
        option name 'USB2'
        option trigger 'usbdev'
        option dev '5-1'
        option default '0'
        option sysfs 'omnia-led:user2'

and rainbow

config led 'usr2'
        option status 'auto'
        option color '8303CC'

And when the /srv/ disconnects (USB HW is bad /srv/ … is not on USB )you don’t recognize anything - or yes (by the frequency of writes ?)

You know “IT Crowd” right? :slight_smile: So “Flash, flash, wait a while …double flash” :smiley:

1 Like

It doesn’t work for me. As long as I had a flash drive with a light on it, I saw the entry as soon as 20 sec. Now I’ve been looking for two minutes and I can’t see anything…

Rainbow: User2, auto
LED config: omnia-led:usr2, Default state off (zero), USB device 2-1 (Generic USN storage)

I’m going to have to do better. :slight_smile:

this occurs time to time to me as well, it depends if i change “system” and later “rainbow” or vice versa or change and apply both at once.I have to wait a bit or i just restart one or the other service again (usually that helps , so i do not care much when it does not on first try ; but sure i can confuse …:smiley:

This topic was automatically closed after 60 days. New replies are no longer allowed.