Power loss behaviour - is there some basic action?
Bo Berglund
bo.berglund at gmail.com
Sat Feb 15 18:26:16 UTC 2025
On Sat, 15 Feb 2025 16:17:08 +0000, Colin Law <clanlaw at gmail.com> wrote:
>On Sat, 15 Feb 2025 at 15:35, Bo Berglund <bo.berglund at gmail.com> wrote:
>>
>> 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.
>
>With the BIOS setting, my server laptop does auto start when the power
>is re-applied, even if normally shutdown. However, just in case it
>does not, I have my router configured to send it WOL every 5 minutes.
>If you cannot set that up in the router then do it in the pi. No need
>to check whether the server is running, just do it every 5 mins
>anyway.
>
>Colin L.
OK thanks!
I did not know this was possible.
I have an ASUS RT-AX86U PRO main router and I don't know if it is able to "do
stuff on a schedule" but I can for sure set up one of the 24/7 RPi devices via
crontab so it will send a WOL command every so often.
I did not know that it could be used without ill effects even if the target is
running, though.
That simplifies the task a lot!
Seems to be like sudo mount -a to make sure that a remote mount is connected
even though fstab contains a lot more mounts.
I use this for some RPi media servers to reach the video sources.
Will try this when I can restart the server next and go into its BIOS for
setting up WOL.
So the full solution:
1) Set the NUC13 BIOS to enable the WakeOnLan function
2) Also set it in BIOS to start when power is re-applied
This might only work with real power disruptions, so in that case I might be
better off not enabling the nut functionality for shutting down when power is
about to disappear from the UPS.
3) Configure WOL inside Ubuntu, apparently it has to be re-armed every time it
boots. So I would probably do that from a crontab entry on reboot.
4) Enable a regular WOL call from an RPi4 device for example every 5 minutes or
so to trigger its wakeup if it is not running. Or do it from the router itself.
Is this OK?
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list