How do I get FreeNAS to power back up after being shut down by UPS alert?

Status
Not open for further replies.

glauco

Guru
Joined
Jan 30, 2017
Messages
526
I have just set up a USB connection between my UPS (details in my signature) and my FreeNAS box.
I've set it up to shut down FreeNAS as the UPS battery reaches low.
But if the AC comes back after FreeNAS shutdown but before the UPS battery is completely drained, FreeNAS won't be powered back up automatically.
My motherboard BIOS is set up to always power on as soon as it gets AC, but this isn't helping in this particular case.
Is there something else I can do?
Thank you!
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Some UPS units allow power cycling the outlets remotely. The would trigger the startup. Also some UPS units support wake on LAN and can send a WOL packet when power is restored (assuming the network gear is up)
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
I just looked at the one listed in your sig. I don't see any network functionality.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Is there something else I can do?
I think it would take an additional device to do what you are thinking of doing and I am not sure such a device exists. If I understand your question correctly.
Are you looking for something that can boot the NAS and be completely unattended or do you want something that is remotely triggered by you over the network?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You could consider setting up a Raspberry Pi with the wakeonlan package installed to run a script on startup which issues that WOL packet, then just power the Pi with the same source as your FreeNAS server. (assuming you have one spare or don't mind paying a few bucks for one... I guess ebay has plenty of used ones on offer for peanuts)
 
Joined
Dec 29, 2014
Messages
1,135
I haven't tested it recently, but the network management cards in my APC UPS's allow you to configure a battery percentage to come back on after a low battery shutdown. You would have to configure the servers to turn on on power fail restore too. I would be very careful with that, because you could create a situation where you turn back on without enough power to shutdown gracefully.
 

glauco

Guru
Joined
Jan 30, 2017
Messages
526
Thanks everybody for your responses.
If a power outage happens when I'm away from home and FreeNAS doesn't power back on because AC came back before the UPS battery was completely drained, I'm going to VPN in and power it on by IPMI.
I'm also planning on experimenting with pfSense to wake on LAN FreeNAS every half an hour or so. This I can do because pfSense (as well as the switch and the wireless AP) gets powered down abruptly and gets powered up automatically as it gets AC back.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Thanks everybody for your responses.
If a power outage happens when I'm away from home and FreeNAS doesn't power back on because AC came back before the UPS battery was completely drained, I'm going to VPN in and power it on by IPMI.
I'm also planning on experimenting with pfSense to wake on LAN FreeNAS every half an hour or so. This I can do because pfSense (as well as the switch and the wireless AP) gets powered down abruptly and gets powered up automatically as it gets AC back.
If you do this you could end up waking up FreeNAS just after it gets shut down by the UPS. I your pfSense has a USB port, you could use the NUT package and use that to send WOL... I know it can be done, just have never done it.
 

glauco

Guru
Joined
Jan 30, 2017
Messages
526
If you do this you could end up waking up FreeNAS just after it gets shut down by the UPS. I your pfSense has a USB port, you could use the NUT package and use that to send WOL... I know it can be done, just have never done it.
You're right. The solution I came up with isn't 100% sure to work. I'm going to investigate this NUT package, thank you!
 

glauco

Guru
Joined
Jan 30, 2017
Messages
526
Wow, this Network UPS Tools (NUT) package is really powerful... but I feel like it's too much to learn right now, so at first I thought I would remove the USB cable between the UPS and FreeNAS, turn off the UPS service on FreeNAS and let the machine be shut down abruptly as before. Especially after watching this video where a ZFS file system survives all kinds of tortures.
But then I discovered this "Power Off UPS" option in the service settings and decided I'm going to give it a try!

2VhxigR.png
 
Status
Not open for further replies.
Top