Power loss behaviour - is there some basic action?
Bo Berglund
bo.berglund at gmail.com
Sat Feb 15 15:34:09 UTC 2025
On Sat, 15 Feb 2025 08:30:24 -0500, Sam Varshavchik <mrsam at courier-mta.com>
wrote:
>Bo Berglund writes:
>
>> Specifically I would like to know if there is something built into the BIOS
>> or
>> Linux kernel that watches for this and uses the last moments of power to
>> protect
>> against damage to files and such.
>
>Nope. But current filesystems like ext4 and btrfs are designed so that they
>can (hopefully) survive such an event and during a reboot they'll recover at
>least to the point of being usable.
That is good to know!
>> Even with a battery backed poower supply (UPS) power will eventually run out
>> on
>> a long power outage...
>
>But hopefully the UPS will be one of the ones that are supported by apcupsd
>or nut, and an orderly shutdown takes place long before that happens.
Thanks for the suggestion!
So I do have an APC ES 700 UPS with between 30 and 60 min capacity (I could not
figure out exactly how much)...
This has protected my systems for a number of years and if the power outage is
short it keeps everything going.
I have connected the following to the UPS:
- the Internet fiber interface
- the ASUS main router
- my Synology NAS
- a network switch
- the old server (a Lenovo IdeaCenter mini-tower)
And it has survived a few short duration outages without disruption.
But last summer there was a couple of longer "planned" maintenance outages by
the electricity company and I was at home for the first of these.
What happened then was that after about an hour the server shut down (via a nut
command from the NAS), but when power returned it did not start up again.
Apparently if the server is "intentionally" shut down then it will *not* start
again when power returns....
I had to crawl under my desk and push the power button on the Lenovo to start
it...
My Raspberry Pi units on the other hand all started up immediately when power
returned.
And the same with the Synology NAS which is the manager of the nut system (the
APC UPS is connected to the NAS). The NAS started up OK when power returned.
As a precaution I taped a white sticker pointing to the Power-ON button on the
server so it could be easily located.
Two weeks afterwards a second power disruption happened for the same "reason"
and this time again everything started up afterwards EXCEPT my server and now I
was not at home...
Luckily I could ask a neighbor, who has our keys, to enter and push the
button...
Now I was thinking that if I do not use the UPS for the new server it could be
set to start after a power outage (there is a setting like that in BIOS).
But the BIOS text also says that the start will follow a power interruption but
not starting if the system was shut down for another reason before power
disappeared.
And this will be problematic if I use nut to shut down following a command from
the UPS...
So:
Should I move the new server off of the UPS but keep the other devices hooked up
so that the server will experience a "power outage" and therefore start when
power returns?
Or is there some other way to handle this situation?
I am thinking about having a task running on one of the RaspberryPi units which
checks that it can ping the server say a minute or two after boot and if
unsuccessful send a Wake-On-LAN command to the server's MAC address.
But I have no experience of Wake-On-Lan before...
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list