Tips and tricks for Debian on QNAP TS-21x/TS-22x
Here are some tips and tricks about running Debian on the QNAP TS-21x/TS-22x.
Automatic fan control
Debian ships a program called
qcontrol which can be used to control the
fan, LEDs and buttons on QNAP devices. You can edit the
/etc/qcontrol.conf configuration file to change the behaviour of
qcontrol, for example how the fans are regulated depending on the
temperature or which commands to run when a button is pressed.
qcontrol on fanless QNAP systems
On QNAP systems without fan (i.e. HS-210), fan errors will be reported by qcontrol because it tries to regulate the fan and fails.
To avoid these errors, edit the qcontrol config file
has_fan = true
has_fan = false
sudo systemctl restart qcontrol.service qcontrold.service
You can tell your QNAP device to power on at a specific time using the
wakealarm system. For example, if you want your QNAP to power on in 5
minutes, issue the following commands and turn off your device:
echo 0 | sudo tee /sys/class/rtc/rtc0/wakealarm echo `date '+%s' -d '+ 5 minutes'` | sudo tee /sys/class/rtc/rtc0/wakealarm
You can check whether a wakealarm has been configured with:
Automatic power on
QNAP machines can turn on automatically when power is applied if the device was not powered down correctly. This is helpful when your power goes down. In order to enable this feature, run the following command:
sudo qcontrol --direct autopower on
Disk order on the QNAP TS-219P
One note for Debian users on the TS-219P (this note does not apply to TS-210 and TS-219): when you use the QNAP firmware, the disk on the left is HDD1 whereas the disk on the right is HDD2. However, on Debian it is the other way around (HDD1 is on the right, HDD2 is on the left). This doesn't really matter since Debian uses unique IDs (UUIDs) to refer to partitions, but don't be surprised when the "HDD2" light goes on when you access the first disk.