Hello all,
I’ll begin by saying that I am a complete beginner. I have just built my first home server and successfully installed TrueNAS. Everything is working great except for the fans ramping up and down repeatedly. I have done some research and found that it is because of the fan rpm being set too high. I have tried to use IPMIutil to manually edit the values, but when I try “ipmiutil sensor -N (my IP) -U (my username) -P (my password) -g fan -c” I get a return of rv = -2, meaning it has failed to connect to BMC. What do I do about this? Are there better, more beginner friendly ways to fix my issue? I have never used the command prompt in Windows before, and understand very little of the technical jargon I see in other forum posts.
Thanks in advance.
What motherboard? Any chance you can set your own curves in bios?
I am using a Supermicro x11ssh-f. Unfortunately I can only set general fan settings in bios, like “optimized” or “standard”. I tried switching between the options, nothing has helped with fan ramping.
I remembering that for me setting specific, advanced fan options & % speed at ° temp had to be done on the ipmi of the motherboard itself
You need to update the fan thresholds to prevent the Supermicro detecting fan failures when an incorrect threshold is tripped.
ipmitool
is built into TrueNAS scale these days.
This is great. However, I do not understand some of the instructions. I had looked into this yesterday but did not understand where I was supposed to enter “~# kldload ipmi.ko”. I have tried in the TrueNAS shell but it’s telling me it doesn’t recognize “~#”. Sorry if there is an obvious solution.
#
is the prompt. You type what comes AFTER that.
That’s for FreeBSD/TN CORE, so probably not applicable. Also you do not really need the kernel interface to IPMI. ipmitool can communicate with the BMC over IP.
Here’s the script I use on CORE and SCALE alike with Supermicro mainboards and IPMI:
#!/bin/sh
hosts="foo bar"
foo_host="192.168.0.100"
foo_user="ADMIN"
foo_password="PASSWORD"
foo_cpu_speed="70"
foo_chassis_speed="100"
bar_host="192.168.0.101"
bar_user="ADMIN"
bar_password="PASSWORD"
bar_cpu_speed="70"
bar_chassis_speed="100"
# ---------- end of configuration section ----------
IPMITOOL="/usr/bin/ipmitool"
PAUSE="5"
FAN_MODE="1"
for curhost in ${hosts}
do
eval host="\$${curhost}_host"
eval user="\$${curhost}_user"
eval password="\$${curhost}_password"
eval cpu_speed="\$${curhost}_cpu_speed"
eval chassis_speed="\$${curhost}_chassis_speed"
${IPMITOOL} -H ${host} -U ${user} -P ${password} raw 0x30 0x45 0x01 ${FAN_MODE} >/dev/null
sleep ${PAUSE}
${IPMITOOL} -H ${host} -U ${user} -P ${password} raw 0x30 0x70 0x66 0x01 0 ${chassis_speed} >/dev/null
${IPMITOOL} -H ${host} -U ${user} -P ${password} raw 0x30 0x70 0x66 0x01 1 ${cpu_speed} >/dev/null
done
foo_host
is the IP address of the IPMI interface. Adjust the speed values until you are satisfied with the noise and the resulting temperatures.
You can run this on any host with ipmitool installed and a network connection and set the speed on multiple target hosts.
But then it makes sense - in case you have multiple systems - to run it on each system individually with an @reboot
crontab entry.
HTH,
Patrick
Thanks for your reply. How do I go about learning to use scripts? I tried looking myself and found that I was lacking the basic knowledge to follow what I found.
A script is just a text file with some code in it. Log in to your TrueNAS via SSH and become root. Pick a place where to store the scripts and create a dataset for them, e.g.
zfs create mypool/scripts
Go to that dataset and use a text editor to create a text file, copy & paste the code from my posting into that text file, save. E.g.
cd /mnt/mypool/scripts
vi set-fan-speed
Make the script executable
chmod 755 set-fan-speed
To run the script
/mnt/mypool/scripts/set-fan-speed
Of course when creating the script in the editor you need to change the list of hosts, the IP addresses, the passwords, matching your systems.
And you probably don’t want to use the “vi” editor. It’s all I have been using for 35 years. But there must be another one that is easier to use on the TN.
Thank you very much! I’ll try this out later today and see if I can get it to work.
While I am waiting to test, here are some additional questions. I tried googling, but I am still confused.
- From your code, which variables do what? I understand the ones you already mentioned, but what about
cpu_speed
andchassis_speed
?
1a. Do these variables range from 1-100? - Do I change anything below the config section?
- If I only have one server, should I just delete
bar_host="192.168.0.101" bar_user="ADMIN" bar_password="PASSWORD" bar_cpu_speed="70" bar_chassis_speed="100"
? - What does
TN
stand for? - Do I need to install ipmitool onto the server running TrueNAS or my main PC?
- Is all of this done through the TrueNAS shell?
Thanks again for helping a noob out.
All of this is done in a shell logged in to TrueNAS via SSH and having switched to the root user by e.g sudo -s
.
TN stands for TrueNAS on this forum.
The numbers are percentages with 100 for full speed.
cpu_speed is the speed of the CPU fan, chassis_speed the speed of the chassis fans.
ipmitool is already installed on TrueNAS.
If you have only one host, delete all the lines with “bar_”. Then again, if your host list is just
hosts="foo"
any additional entries with e.g. “bar_”, “baz_”, … will simply be ignored.
As a bonus the editor you might want to use instead of “vi” is probably “nano”. Don’t know if there are even more different ones installed. But nano should be ok from what I read.
Okay. I have followed the steps outlined above, however I am now getting an error in the shell: “Unable to establish LAN session” and “Unable to establish IPMI v1.5 / RMCP session”. I have both my server’s IPMI port and an addon internet card (in the server) plugged into a switch that my PC is also connected to. I am able to IPMI into my server from my PC as well. What am I doing wrong?
Is IPMI enabled on the ethernet ports you’re trying to connect to it? On my DELL servers for example, I need to explicitly enable IPMI on ethernet ports.
Yes, I have an ethernet cable running from the IPMI port of my Supermicro x11ssh-f. Like I mentioned, I currently have the server open on my PC through Supermicro’s IPMI interface.
Can you ping the IPMI address from the TrueNAS shell? Also did you adjust the variables for host (IP address), username and password in the script to match your IPMI?
You can try to establish a session from outside of the script by just invoking ipmitool, e.g.:
ipmitool -H {host} -U {user} -P {password} lan print
Use the real values, of course.
Last you can try to force IPMI 2.0 protocol:
ipmitool -I lanplus -H {host} -U {user} -P {password} lan print
It’s working! I set the IP in the script to my TrueNAS IP, not my IPMI IP. Fixed it and everything is good. Thanks so much for your help!
Great! Now go to the UI, System > Advanced Settings > Init/Shutdown Scripts, and configure that script as a post init script and TrueNAS will start it whenever the system boots.