pfsense behavior on power outages
-
I have two sites that work with UPS. However, this late summer has not be kind to us, with power outages lasting a long time. There are no generators.
I can see in services ->Apcupsd the "Shutdown Behavior" only holds halt and power off. I tried both and router stays off.
The things is I want my router to power back on when there is a power outage, and the UPS runs out causing a non-graceful shutdown. I can shut down the server manually, which is important to me, but the router I'll risk it.
I am at a distance for these sites, and if they die after the UPS battery dies, without a graceful shutdown, then at least the pfsense router will boot back up so I can get in, and my server is setup the same when the UPS powers on when power is restored.
pfsense does a graceful shutdown with halt and power off ( right?? ), because of this, it does not start back up.
Is there any way to do this?
Is my only option to shut off the deamon APC UPS Daemon service? at least this way nothing happens for graceful, all dies but will auto start when power is restored. I do not like this because I will most likely not get my email notifications of power outages...
thanks for advice
-
@gstlouis said in pfsense behavior on power outages:
The things is I want my router to power back on when there is a power outage
That's a setting in the computer pfSense is running on. Also, apcupsd should be telling the computer to shut down. Mine is set to halt. Power off requires the hardware to support it. I haven't tried mine to see if it does.
-
@JKnott
thanks for your comment. So you cannot confirm that "power off" will set the computer to power back on when power is restored?My understanding of both of these are halt and power off are graceful, and that the bios setting APM (AC power management) will only trigger when it is not a graceful shutdown.
When I can test, I will try pulling the UPS plug to see what happens with power off selected...
To your point, I did not find any setting in BIOS to autostart on power fail. So either I didn't find it, or the bios does not support it. Which would super suck. I just feel like I remember this router starting up once when power outage happened.
My BIOS
Vendor: American Megatrends Inc.
Version: 5.6.5 -
@gstlouis said in pfsense behavior on power outages:
thanks for your comment. So you cannot confirm that "power off" will set the computer to power back on when power is restored?
You have to check your BIOS for a setting that says how to handle power restoration.
-
My Qotoms can be set (in bios) to "Turn on" when AC is restored.
ISTR that i had to enable some advanced setting , in order to see those settings.
/Bingo
-
Depending on what the pfSense install is running on, it may not do power off. Official Netgate hardware, most of them will not do power off, but everything should be doing halt. That would be the setting for APCUPSD.
"power off" setting tells the device to power down after halting (I think ACPI stuff) has nothing to do with turning back on.
"halt" == shutdown -h now
"power off" == shutdown -p now
power off requires hardware support.As others say the "turn back on" is a setting in BIOS somewhere, maybe something like "last power state".
-
yes I have. with AMI american megatrends the settings are in the north bridge
https://www.youtube.com/watch?v=0cQ48MiEGQE
It was setup to power on. so I tried last state change
I then unplugged the UPS, waited it for signal a shutdown, then unplugged the battery completely to trigger a full UPS shutdown of all. Once I plugged my UPS back in all the hardware started but the router itself. >:|
I have tried in the pfsense the halt and power off options. halt seems to really freeze up the router needing a hard boot. power off does what it says and shuts down. But the router does not go back online, and BIOS is set to last state change
-
@gstlouis With Apcupsd I believe you want the option checked:
Kill on Power Fail
Hibernate UPS on powerfail.(huh, that is [ x ] without spaces which apparently formats as a checkbox and strips the preceding text. anyway...)
Then the UPS will shut off, and when it turns on everything should have been rebooted.
In your test did you unplug the router power cord from the UPS?
-
@SteveITS
well that's cool. I was wondering what that option was.So if I understand correctly, with this option enabled, the UPS will simply start the shutdown immediately, trigger the router to do shutdown, hibernate (like it is off) and when power is restored it will detect and turn itself back on triggering all the hardware to power on as well?
In my tests, yes, I would unplug the UPS which starts the ONBATT, then around 30% when it triggered the router
shutdown -p
I would disconnect the "cap" in the back of UPS (APC 750) that would disconnect the battery simulating a complete power off. -
@gstlouis said in pfsense behavior on power outages:
thanks for your comment. So you cannot confirm that "power off" will set the computer to power back on when power is restored?
That depends on the computer and has nothing to do with pfSense. Check the CMOS settings.
Here's what it looks like in the computer described in my sig:
-
@gstlouis That is a configuration on the Firewall itself, Auto Power on when Failure, It is a setting in the BIOS, I have configured my Firewalls and Firewalls in other locations to Power on Automatically which is configured in the BIOS.