Adventures in TrueNAS SCALE on QNAP Hardware

HarryMuscle

Contributor
Joined
Nov 15, 2021
Messages
161
Just wanted to share in case it helps with your setup ... not sure which chip your unit uses for monitoring and controlling the fans but if TrueNAS Scale currently can't monitor or control the fans this driver might help: https://github.com/Stonyx/QNAP-EC

Thanks,
Harry
 

MikeLowry

Dabbler
Joined
Nov 20, 2021
Messages
27
The QNAP 470 Pro has an Apacer 512 MB SLC eUSB DOM. Specs are typically 5v, 2x5 pin header, 2.54 mm pitch, horizontal (90D STD)
Apacer eUSB DOM data sheet and ICP Electronics LCD Manual are here: https://github.com/elvisimprsntr/QnapFreeLCD

To remove the Apacer eUSB DOM, you will likely need to partially disassemble the NAS, apply a heat gun to the non-conductive white staking compound and pinch the plastic stand off tabs. A hair dryer might suffice, if you don't have a heat gun.

View attachment 50919

Might be able to remove the DOM without to much disassembly.

View attachment 50921


SLC eUSB DOMs are hard to come by and can be expensive. You will need a minimum of 16GB capacity.


Another less expensive alternative is to connect an external USB3 SSD enclosure. I ran CORE and SCALE on USB3 Crucial X8's until I was able to source 16GB SLC eUSB DOMs here in the US. Not sure about availability in AUS

If you want to kick the tires on SCALE, you can temporality install SCALE on a USB flash drive. Not recommend for a permanent installation.
Thanks @elvisimprsntr - I installed TN SCALE on Samsung SSD T3 for now - all is working well.
I had to install CORE to create the RaidZ2 pool from the GUI - then export/disconnect the pool. Installed SCALE and imported then upgraded the pool.

TN SCALE GUI would error when attempting to create the pool. The JIRA (while closed) is still in the RC version I am using: https://jira.ixsystems.com/browse/NAS-110846

Only issue now is the fan is running at full speed - how do I get it to automatic?
Attempted this: https://github.com/Stonyx/QNAP-EC but could not get it working. There is no fan control in the BIOS.

Cheers
 

MikeLowry

Dabbler
Joined
Nov 20, 2021
Messages
27
Just wanted to share in case it helps with your setup ... not sure which chip your unit uses for monitoring and controlling the fans but if TrueNAS Scale currently can't monitor or control the fans this driver might help: https://github.com/Stonyx/QNAP-EC

Thanks,
Harry
Hi @HarryMuscle,

I attempted the driver on my TS-470 Pro last night but had a few errors - are you able to assist with getting it working?

Cheers
 

MikeLowry

Dabbler
Joined
Nov 20, 2021
Messages
27
Hi @HarryMuscle,

I attempted the driver on my TS-470 Pro last night but had a few errors - are you able to assist with getting it working?

Cheers

@HarryMuscle .. Please see output below:

sudo make install
rm -f qnap-ec
make -C /lib/modules/5.10.70+truenas/build M=/tmp/qnap-ec clean
make[1]: Entering directory '/usr/src/linux-headers-5.10.70+truenas'
make[1]: Leaving directory '/usr/src/linux-headers-5.10.70+truenas'
cc -o qnap-ec qnap-ec-helper.c -Wall -O2 -export-dynamic -ldl
make -C /lib/modules/5.10.70+truenas/build M=/tmp/qnap-ec MODULE_CFLAGS= modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.70+truenas'
CC [M] /tmp/qnap-ec/qnap-ec.o
MODPOST /tmp/qnap-ec/Module.symvers
CC [M] /tmp/qnap-ec/qnap-ec.mod.o
LD [M] /tmp/qnap-ec/qnap-ec.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.10.70+truenas'
/bin/install --owner=root --group=root --mode=644 libuLinux_hal.so \
/usr/local/lib/libuLinux_hal.so
/bin/install --strip --owner=root --group=root --mode=755 qnap-ec \
/usr/local/sbin/qnap-ec
make -C /lib/modules/5.10.70+truenas/build M=/tmp/qnap-ec modules_install
make[1]: Entering directory '/usr/src/linux-headers-5.10.70+truenas'
INSTALL /tmp/qnap-ec/qnap-ec.ko
DEPMOD 5.10.70+truenas
Warning: modules_install: missing 'System.map' file. Skipping depmod.
make[1]: Leaving directory '/usr/src/linux-headers-5.10.70+truenas'
/sbin/depmod --quick
/sbin/modprobe qnap-ec
modprobe: ERROR: could not insert 'qnap_ec': No such device
make: [Makefile:90: install] Error 1 (ignored)
 

HarryMuscle

Contributor
Joined
Nov 15, 2021
Messages
161
@HarryMuscle .. Please see output below:
Glad to help. Thanks for posting the output. According to the last line, the module won't load because it's not able to identify the IT8528 chip as being present in the system. That means one of a few possibilities are happening. The TS-470 just doesn't use that chip (or any other compatible chip), or it does use that chip but it communicates using a different set of memory addresses, or it uses a chip that will work with the driver but it's not the IT-8528 chip (the driver uses a closed source QNAP library so we don't know exactly which chips it works with). You can override the checking for the IT-8528 chip by using this command to load the driver:

modprobe qnap-ec check-for-chip=no

However, there is some minor risk associated with doing that. If the system has some other device at the same memory address as where the fan monitoring and control chip resides the QNAP library might inadvertently communicate with it causing an unknown outcome. In all our testing that hasn't happened even on systems that don't have a compatible chip but I just wanted to throw that out there so you're fully informed.

If that above command is successful it should finish in less than a second. If the QNAP library is unable to communicate with a compatible chip it will probably take a good minute or two for it to time out.

Hope this info helps. If there's anything else feel free to ask.

Thanks,
Harry
 

N00P

Cadet
Joined
Dec 8, 2021
Messages
1
On my TS-670 (pro), i was able to load the module f71882fg. That enables quite some temp, volt and rpm sensors.

sensors-detect added coretemp and f71882fg to /etc/modules

f71869a-isa-0a20
Adapter: ISA adapter
+3.3V: 3.28 V
in1: 840.00 mV
in2: 1.59 V
in3: 1.53 V
in4: 1.53 V
in5: 1.53 V
in6: 1.59 V
3VSB: 3.36 V
Vbat: 3.44 V
fan1: 0 RPM ALARM
fan2: 1355 RPM
fan3: 813 RPM
temp1: +41.0°C (high = +100.0°C, hyst = +96.0°C)
(crit = +100.0°C, hyst = +96.0°C) sensor = thermistor
temp2: +37.0°C (high = +100.0°C, hyst = +96.0°C)
(crit = +100.0°C, hyst = +96.0°C) sensor = thermistor
temp3: +32.0°C (high = +70.0°C, hyst = +68.0°C)
(crit = +85.0°C, hyst = +83.0°C) sensor = thermistor


/sys/class/hwmon/hwmon1/device/pwm3 seems to be the one next to the nic
/sys/class/hwmon/hwmon1/device/pwm2 seems to be the one next to the psu


INTERVAL=10
DEVPATH=hwmon1=devices/platform/f71882fg.2592
DEVNAME=hwmon1=f71869a
FCTEMPS=hwmon1/device/pwm3=hwmon1/device/temp3_input hwmon1/device/pwm2=hwmon1/device/temp2_input
FCFANS=hwmon1/device/pwm3=hwmon1/device/fan3_input hwmon1/device/pwm2=hwmon1/device/fan2_input
MINTEMP=hwmon1/device/pwm3=30 hwmon1/device/pwm2=30
MAXTEMP=hwmon1/device/pwm3=60 hwmon1/device/pwm2=60
MINSTART=hwmon1/device/pwm3=60 hwmon1/device/pwm2=60
MINSTOP=hwmon1/device/pwm3=32 hwmon1/device/pwm2=32

I don't know where the temp sensors are physically located and if pwm2|3 correlates to temp2|3_input. I don't care to be honest as long the system is a bit quieter.

Also not sure what and where temp1 is.
 

MikeLowry

Dabbler
Joined
Nov 20, 2021
Messages
27
The QNAP 470 Pro has an Apacer 512 MB SLC eUSB DOM. Specs are typically 5v, 2x5 pin header, 2.54 mm pitch, horizontal (90D STD)
Apacer eUSB DOM data sheet and ICP Electronics LCD Manual are here: https://github.com/elvisimprsntr/QnapFreeLCD

To remove the Apacer eUSB DOM, you will likely need to partially disassemble the NAS, apply a heat gun to the non-conductive white staking compound and pinch the plastic stand off tabs. A hair dryer might suffice, if you don't have a heat gun.

View attachment 50919

Might be able to remove the DOM without to much disassembly.

View attachment 50921


SLC eUSB DOMs are hard to come by and can be expensive. You will need a minimum of 16GB capacity.


Another less expensive alternative is to connect an external USB3 SSD enclosure. I ran CORE and SCALE on USB3 Crucial X8's until I was able to source 16GB SLC eUSB DOMs here in the US. Not sure about availability in AUS

If you want to kick the tires on SCALE, you can temporality install SCALE on a USB flash drive. Not recommend for a permanent installation.
Hi @elvisimprsntr ,

Will this DOM work on the TS 470 Pro?
Swissbit U-48 Industrial USB flash drive

The specs look like what you specified for the 470:
The QNAP 470 Pro has an Apacer 512 MB eUSB DOM. Specs are typically 5v, 2x5 pin header, 2.54 mm pitch, horizontal (90D STD)

Cheers
M
 
Joined
Jun 2, 2019
Messages
591
Will this DOM work on the TS 470 Pro?
Swissbit U-48 Industrial USB flash drive

In theory they should work, assuming you can find them.
According to the data sheet the "J" connector option is for the 2.54mm pitch connector

Screen Shot 2021-12-25 at 6.28.20 AM.png


Screen Shot 2021-12-25 at 6.21.47 AM.png
 

MikeLowry

Dabbler
Joined
Nov 20, 2021
Messages
27
On my TS-670 (pro), i was able to load the module f71882fg. That enables quite some temp, volt and rpm sensors.

sensors-detect added coretemp and f71882fg to /etc/modules

f71869a-isa-0a20
Adapter: ISA adapter
+3.3V: 3.28 V
in1: 840.00 mV
in2: 1.59 V
in3: 1.53 V
in4: 1.53 V
in5: 1.53 V
in6: 1.59 V
3VSB: 3.36 V
Vbat: 3.44 V
fan1: 0 RPM ALARM
fan2: 1355 RPM
fan3: 813 RPM
temp1: +41.0°C (high = +100.0°C, hyst = +96.0°C)
(crit = +100.0°C, hyst = +96.0°C) sensor = thermistor
temp2: +37.0°C (high = +100.0°C, hyst = +96.0°C)
(crit = +100.0°C, hyst = +96.0°C) sensor = thermistor
temp3: +32.0°C (high = +70.0°C, hyst = +68.0°C)
(crit = +85.0°C, hyst = +83.0°C) sensor = thermistor


/sys/class/hwmon/hwmon1/device/pwm3 seems to be the one next to the nic
/sys/class/hwmon/hwmon1/device/pwm2 seems to be the one next to the psu


INTERVAL=10
DEVPATH=hwmon1=devices/platform/f71882fg.2592
DEVNAME=hwmon1=f71869a
FCTEMPS=hwmon1/device/pwm3=hwmon1/device/temp3_input hwmon1/device/pwm2=hwmon1/device/temp2_input
FCFANS=hwmon1/device/pwm3=hwmon1/device/fan3_input hwmon1/device/pwm2=hwmon1/device/fan2_input
MINTEMP=hwmon1/device/pwm3=30 hwmon1/device/pwm2=30
MAXTEMP=hwmon1/device/pwm3=60 hwmon1/device/pwm2=60
MINSTART=hwmon1/device/pwm3=60 hwmon1/device/pwm2=60
MINSTOP=hwmon1/device/pwm3=32 hwmon1/device/pwm2=32

I don't know where the temp sensors are physically located and if pwm2|3 correlates to temp2|3_input. I don't care to be honest as long the system is a bit quieter.

Also not sure what and where temp1 is.
Hi @N00P ,

sensors-detect added the same modules to /etc/modules

I get the below message when I run pwmconfig to setup fancontrol

/sbin/pwmconfig: There are no pwm-capable sensor modules installed

Any help is appreciated.

M
 

MikeLowry

Dabbler
Joined
Nov 20, 2021
Messages
27
Hi @N00P ,

sensors-detect added the same modules to /etc/modules

I get the below message when I run pwmconfig to setup fancontrol

/sbin/pwmconfig: There are no pwm-capable sensor modules installed

Any help is appreciated.

M
@N00P

Needed to do:

sudo modprobe f71882fg

to get pwmconfig to work

INTERVAL=10
DEVPATH=hwmon2=devices/platform/f71882fg.2592
DEVNAME=hwmon2=f71869a
FCTEMPS= hwmon2/device/pwm2=hwmon2/device/temp3_input
FCFANS= hwmon2/device/pwm2=hwmon2/device/fan2_input
MINTEMP= hwmon2/device/pwm2=35
MAXTEMP= hwmon2/device/pwm2=60
MINSTART= hwmon2/device/pwm2=60
MINSTOP= hwmon2/device/pwm2=35
MAXPWM= hwmon2/device/pwm2=105
 

MikeLowry

Dabbler
Joined
Nov 20, 2021
Messages
27
Hi All,

Anyone used this script on SCALE to display information on QNAP LCD?

https://github.com/mpeirone/QnapLcdInfo

Edit... I installed and run the ./lcdInfo.py manually - it works really well. Also blanks the display after timeout. Navigation buttons work on QNAP front panel.

How do I get the script to run automatically on reboot?
 
Last edited:
Joined
Jun 2, 2019
Messages
591
Hi All,

Anyone used this script on SCALE to display information on QNAP LCD?

https://github.com/mpeirone/QnapLcdInfo

Edit... I installed and run the ./lcdInfo.py manually - it works really well. Also blanks the display after timeout. Navigation buttons work on QNAP front panel.

How do I get the script to run automatically on reboot?
Looks like that script was written for Debian 11 and not TrueNAS, thus will likely not work out of the box.

I created some basic scripts that run on CORE or SCALE.


Put the scripts somewhere on your data pool. add execute permissions (chmod a+x)

The LCD pre/post/shutdown scripts can be added to System, Advanced, Init/Shutdown Scripts

Screen Shot 2021-12-27 at 3.52.33 AM.png
 
Last edited:

MikeLowry

Dabbler
Joined
Nov 20, 2021
Messages
27
Looks like that script was written for Debian 11 and not TrueNAS, thus will likely not work out of the box.

I created some basic scripts that run on CORE or SCALE.


Put the scripts somewhere on your data pool. add execute permissions (chmod a+x)

The LCD pre/post/shutdown script can be added to System, Advanced, Init/Shutdown Scripts

View attachment 51817
Put the scripts somewhere on your data pool
Do I just upload the script to a share or /mnt/....?
 
Joined
Jun 2, 2019
Messages
591
Joined
Jun 2, 2019
Messages
591

Chris3773

Dabbler
Joined
Nov 14, 2021
Messages
17
I was able to get TrueNAS SCALE working on a QNAP TS-873A without any problems. I did have to install a temp GPU so I could install but was able to remove after setup was compete.

I wasn't able to get a larger eUSB DOM in time for my build but using an internal USB header to port cable, I was able to install on an USB drive. It's not the best case and may add a mirror or replace with an eUSB DOM in the future.
 

Astraea

Dabbler
Joined
Sep 7, 2019
Messages
28
I converted 2 QNAP Devices and used Mirrored USB drives for the OS disks, not Ideal but works until I replace the devices with custom-built boxes.

As for the script, I have a share mounted to: /mnt/DataPool01/Scripts that is owned by root and the group of wheel. I then created a directory called QnapFreeLCD and have all the script files in there. In my Tasks section inder Init/Shutdown Scripts I have the following entries:

1) SCRIPT LCD Post Init POSTINIT yes -> Script: /mnt/DataPool01/Scripts/QnapFreeLCD/lcd_postinit.sh
2) SCRIPT LCD Pre Init PREINIT yes -> Script: /mnt/DataPool01/Scripts/QnapFreeLCD/lcd_preinit.sh
3) SCRIPT LCD Shutdown SHUTDOWN yes -> Script: /mnt/DataPool01/Scripts/QnapFreeLCD/lcd_shutdown.sh
 

MikeLowry

Dabbler
Joined
Nov 20, 2021
Messages
27
Hi @elvisimprsntr ,

I installed the new 16GB eUSB DOM and installed the latest ISO- TrueNAS-SCALE-22.02-RC.2. All installed good with the config restore showing the Datasets.

The only issue is the system boots too fast and cannot import boot-pool

I tried the solution here https://www.truenas.com/community/threads/fails-to-boot-cant-import-boot-pool.87487/ but the update-grub does not save the truenas.cfg on reboot. update-initrd is also not found when I try the other option.

There is a JIRA here: https://jira.ixsystems.com/browse/NAS-108200

Did you experience this? Is there a solution?

Cheers
M
 
Top