Heavywun
Cadet
- Joined
- Jul 26, 2023
- Messages
- 4
Link: Flashstor fan control on GitHub
I am looking for a more 'iX-acceptable' method of implementing fan control on my Asustor Flashstor 12 Pro (a pure NVMe drive NAS device).
BACKGROUND: Asustor have left some of their NAS devices open to installing alternative operating systems and RAID/Storage solutions. They have published a video guide covering installing TrueNAS-SCALE on the Flashstor devices.
THE PROBLEM: There is no native support for Asustor's temperature monitoring and fan control hardware under TrueNAS-SCALE, so the fan defaults to a low 1500-odd rpm and things get toasty.
MY CURRENT SOLUTION: Relies on compiling and installing a custom kmod to monitor NVMe and system temperatures and control fan speed. I then use two scripts to implement fan control. The first script runs as a post-init script to check if the kmod exists (in case of an update or upgrade), compiles and installs it if necessary, and then runs a second script in the background to adjust fan speed in response to temp changes.
MY CONCERN: is the kernel module component of this solution. What happens if/when iX disable
The code for my post-init dash script is below, so you have an idea of what I currently do to enable temp monitoring and fan control on the flashstor. There's a more detailed explanation in the readme of the GitHub repository above, as well as the longer temp monitoring script.
Any guidance and suggestions would be greatly appreciated.
I am looking for a more 'iX-acceptable' method of implementing fan control on my Asustor Flashstor 12 Pro (a pure NVMe drive NAS device).
BACKGROUND: Asustor have left some of their NAS devices open to installing alternative operating systems and RAID/Storage solutions. They have published a video guide covering installing TrueNAS-SCALE on the Flashstor devices.
THE PROBLEM: There is no native support for Asustor's temperature monitoring and fan control hardware under TrueNAS-SCALE, so the fan defaults to a low 1500-odd rpm and things get toasty.
MY CURRENT SOLUTION: Relies on compiling and installing a custom kmod to monitor NVMe and system temperatures and control fan speed. I then use two scripts to implement fan control. The first script runs as a post-init script to check if the kmod exists (in case of an update or upgrade), compiles and installs it if necessary, and then runs a second script in the background to adjust fan speed in response to temp changes.
MY CONCERN: is the kernel module component of this solution. What happens if/when iX disable
make and make install ? Does anyone have any suggestions for an alternative method that I could explore that would avoid tinkering under the hood of TrueNAS-SCALE? The code for my post-init dash script is below, so you have an idea of what I currently do to enable temp monitoring and fan control on the flashstor. There's a more detailed explanation in the readme of the GitHub repository above, as well as the longer temp monitoring script.
Any guidance and suggestions would be greatly appreciated.
Code:
#!/bin/sh
# Asustor Flashstor kernel module check/compile script for TrueNAS-SCALE
# Checks to see if the necessary it87 kmod exists, installs it if not, and runs the fan control script
# Add this as a post-init script so that it runs on every boot
# Check if the kmod exists and is installed
if ! modinfo asustor-it87 >/dev/null 2>&1; then
echo "asustor-it87 kmod not found or not installed. Compiling and installing..."
# Clone the repository
git clone https://github.com/mafredri/asustor-platform-driver
cd asustor-platform-driver
# Checkout the it87 branch
git checkout it87
# Compile the kmod
sudo make
# Install the kmod
sudo make install
# Update module dependencies
sudo depmod -a
# Load the module
sudo modprobe -a asustor_it87
echo "asustor-it87 kmod compiled, installed, and loaded successfully."
else
# Load the module
sudo modprobe -a asustor_it87
echo "asustor-it87 kmod is already installed."
fi
# Run the fan control script
nohup /home/admin/temp_monitor.sh >/dev/null 2>&1 &