Earlier this year, I wrote an article on how to control the fan speed of your Lenovo SA120 JBOD from within FreeNAS.
It turns out this doesn’t work on the newest FreeNAS 10 ( FreeNAS Corral ), but the reason is simple.
When I went to run the Fan Speed control script, I got an error returned:
login as: root [email protected]'s password: Last login: Fri Mar 17 11:23:53 2017 from 192.168.3.243 Welcome to: FreeNAS-Corral-RELEASE To make configuration changes, type 'cli' and use the CLI command set. Any configuration changes used outside of the FreeNAS CLI are not saved to the configuration database. Welcome to FreeNAS [root@labnas] ~# python fancontrol.py 1 File "fancontrol.py", line 36 print("Enclosure found on " + device); ^ TabError: inconsistent use of tabs and spaces in indentation
I pondered this a bit, but the first thing I thought of was to execute python2 and see if I got a shell…
[root@labnas] ~# python2 Python 2.7.13 (default, Mar 14 2017, 19:29:46) [GCC 4.2.1 Compatible FreeBSD Clang 3.9.1 (tags/RELEASE_391/final 289601)] on freebsd11 Type "help", "copyright", "credits" or "license" for more information. >>> exit Use exit() or Ctrl-D (i.e. EOF) to exit >>>
OK! So, I thought that maybe they upgraded to Python3 — I haven’t really looked at the release notes. I kind of just jumped ship and upgraded. My iSCSI still doesn’t map to my VMWare hosts. Anyways…
I simply ran `python2 fancontrol.py 1` and the jet turbines went silent.
[root@labnas] ~# python2 fancontrol.py 1 Enclosure found on /dev/ses0 Fan 0 speed: 1022 Fan 1 speed: 1080 Fan 2 speed: 1077 Fan 3 speed: 0 Fan 4 speed: 1065 Fan 5 speed: 1095 Reading current configuration... Setting fan 0 to 1 Setting fan 1 to 1 Setting fan 2 to 1 Setting fan 3 to 1 Setting fan 4 to 1 Setting fan 5 to 1 Set fan speeds... Waiting to get fan speeds (ctrl+c to skip) LENOVO ThinkServerSA120 1007 Sending Enclosure Control [0x2] page, with page length=296 bytes Fan 0 speed: 449 Fan 1 speed: 608 Fan 2 speed: 609 Fan 3 speed: 0 Fan 4 speed: 612 Fan 5 speed: 627 [root@labnas] ~#
I hope this helps you. Thanks for reading!
0 Comments