Asustor AS6302T And AS5304T fans and leds working under Proxmox #37
Tki2000
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have managed to get gpios for disks from my Asustor AS6302T and AS5304T and make them work under Proxmox.
I use Proxmox as I can assign a NAS VM instance the desired number of disks and manage them separately if I like. I can make backups in almost no time and get the rest of NASes working.
For backups, I only backup the main NAS VM without disks as they are assigned as a passthrough disk from Proxmox. The data on the disks is replicated from within VM to another location. No RAID nor fancy ZFS configurations. Just plain mirrors.
This is a "brief" tutorial to make the it87 chip work with proxmox so we can have fan control, and led signals with AS6302T and AS5304T.
In Proxmox, prepare the development environment:
Now we have to edit file Makefile to reflect Proxmox headers location as they are not where expected:
Find:
KERNEL_MODULES := /lib/modules/$(TARGET)
Replace:
KERNEL_MODULES := /usr/lib/modules/$(TARGET)
I am writting the whole file asustor.c here as I do not have time to make a diff patch. If someone is willing to do, please do. Anyway, it is conflicting with the AS66 detection mechanism as the DMI info returned is the same as the AS53. I have just overridden the AS66 detection to the AS53 gpios. Tried to use another DMI info string as UUID but I could not get working and anyway I could not assure that it is not in other Asustor products. I have found it is common on another PCs and led me to believe it is a generic UUID anyway. So that leaves me without actions for making separate AS66 and AS53 detections.
I tried to separate the most code for the detected devices.
Here is the complete asustor.c code:
Now we can compile it:
If everything went ok, we can load the module at start up in /etc/modules with asustor_it87
Now install the fan control application:
Let the applicaction config the fan parameters
Here is my config file /etc/fancontrol for AS5304 just for reference:
Now we can define custom scripts at Proxmox startup to configure disk LEDs and do some work.
I have found that I can assign the usb-host trigger to work on AS6302, but not on AS5304. Maybe something is wrong or they do not behave the same. Well not completely true as I can assign that trigger to the disk leds but not to the usb led... mmmm
By the way, Proxmox is booting from a M.2 disk attached to a USB-M.2 SATA enclosure, so the disk bays are completely free to be passed to VMs as a real NAS.
set_asustor_leds.bat
set_asustor_disks_leds.bat
set_asustor_disks_leds_error.bat
Make the bat files executable with chmod +x *.bat
Yes, I use .bat extension to differentiate the custom made script files on a Linux system. With that extension I can do a whole search for custom made scripts on a system in a blink, and backup them all.
Now we can manage the disks leds by executing the script files periodically or at bootup time.
For example:
We can call a script from crontab at boot time for configuring the leds.
We can call a script every 24 hours to call the error leds check.
So you can get the idea for making the leds come to life.
I hope that it could be of use to anyone.
Beta Was this translation helpful? Give feedback.
All reactions