Trying to debug my first ever (home) NAS setup, running TNS 22.02.1. I have a APC BR1500MS2 UPS running the usbhid-ups driver that I'm trying to troubleshoot a specific issue. I think I've inadvertently into a boot loop. The closest thing I've found on the forums like this is this post:
https://www.truenas.com/community/threads/configure-apc-ups-with-truenas.94421/post-653527
My NUT settings are:
Shutdown mode: UPS goes on battery
Shutdown timer: 300 seconds
Shutdown command:
Power off UPS: not checked
The UPS estimated runtime is 30-45 mins. It is brand new. The timer is somewhat arbitrary to avoid shutting down during very brief outages/blinks.
I did a simulated power loss test and it did shutdown after the countdown, as desired. Then it booted itself up again after returning AC power to the UPS without any action on my part. Shortly after this, the UPS would switch back to battery mode despite being plugged into wall AC, which would trigger another shutdown... and then it'd restart itself again... and so on. I understand the restart is probably due to one of the power-on-AC settings in the BIOS, and that this behavior is desirable for uptime reasons; however, I don't want it boot looping during an actual power outage. I also have my modem, router, switch, and raspberry pi on the UPS supporting my small home network.
I think I have 2 options:
If I wanted to do option 2, which parameter is the low battery threshold value and how do I change it? Below is the output of::
Or perhaps the solution is not even within TNS, but motherboard BIOS power settings dependent?
https://www.truenas.com/community/threads/configure-apc-ups-with-truenas.94421/post-653527
My NUT settings are:
Shutdown mode: UPS goes on battery
Shutdown timer: 300 seconds
Shutdown command:
Code:
/sbin/shutdown -P now
Power off UPS: not checked
The UPS estimated runtime is 30-45 mins. It is brand new. The timer is somewhat arbitrary to avoid shutting down during very brief outages/blinks.
I did a simulated power loss test and it did shutdown after the countdown, as desired. Then it booted itself up again after returning AC power to the UPS without any action on my part. Shortly after this, the UPS would switch back to battery mode despite being plugged into wall AC, which would trigger another shutdown... and then it'd restart itself again... and so on. I understand the restart is probably due to one of the power-on-AC settings in the BIOS, and that this behavior is desirable for uptime reasons; however, I don't want it boot looping during an actual power outage. I also have my modem, router, switch, and raspberry pi on the UPS supporting my small home network.
I think I have 2 options:
- Check the "Power off UPS" option and just rely on a manual power on of the UPS upon power restore.
- Change the shutdown mode to "UPS reaches low battery", but set the low battery trigger point to be high, say ~75-90%. I assume this will begin the shutdown process fairly early (~1-5 mins), and that the TNS host will STAY offline until power is restored AND the battery level rises to this threshold again. If the battery level is < the limit, I could see the machine boot-looping until the battery charges above the threshold.
If I wanted to do option 2, which parameter is the low battery threshold value and how do I change it? Below is the output of:
Code:
upsc ups
Code:
Init SSL without certificate database battery.charge: 100 battery.charge.low: 10 battery.charge.warning: 50 battery.date: 2001/09/25 battery.mfr.date: 2021/10/23 battery.runtime: 4113 battery.runtime.low: 120 battery.type: PbAc battery.voltage: 27.3 battery.voltage.nominal: 24.0 device.mfr: American Power Conversion device.model: Back-UPS RS 1500MS2 device.serial: 4B2142P22438 device.type: ups driver.name: usbhid-ups driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: /dev/uhid driver.parameter.synchronous: no driver.version: 2.7.4 driver.version.data: APC HID 0.96 driver.version.internal: 0.41 input.sensitivity: medium input.transfer.high: 144 input.transfer.low: 88 input.voltage: 120.0 input.voltage.nominal: 120 ups.beeper.status: enabled ups.delay.shutdown: 20 ups.firmware: 969.e2 .D ups.firmware.aux: e2 ups.load: 11 ups.mfr: American Power Conversion ups.mfr.date: 2021/10/23 ups.model: Back-UPS RS 1500MS2 ups.productid: 0002 ups.realpower.nominal: 900 ups.serial: 4B2142P22438 ups.status: OL ups.test.result: No test initiated ups.timer.reboot: 0 ups.timer.shutdown: -1 ups.vendorid: 051d
Or perhaps the solution is not even within TNS, but motherboard BIOS power settings dependent?