Shutdown and Startup using APC PowerChute, my APC model not in the list of Service

Aristotle

Dabbler
Joined
Dec 27, 2016
Messages
21
I have configured APC PowerChute to shutdown my servers during a power loss after a certain interval and restart after power is restored. I would like to do the same for FreeNAS as well. Right now the ESXI host is perfectly configured to bring down the various VM's during power loss based on their priority and back up when power is restored.

My APC UPS model is a SUA2200RM2U. I do know there is a service available for APC in FreeNAS, but my model number is not on that list.
What is the closes model i can choose for this, or if i can even do that?
As an interim measure, I have tried to trigger the shutdown from a standalone PowerChute controlled on a Windows 10 machine using a script and plink app.

"C:\scripts\plink.exe" -no-antispoof -ssh -2 -pw password root@192.168.1.90 "/sbin/shutdown -p now"

It works fine, but i have to manually start the FreeNAS server when power is restored.
If i use the halt option it reboots fine after power is restored. But with the halt option, i don't see FreeNAS server completely go offline, and ssd on which the logs are moved to is still active..

Please guide. Is halt option ok? Or I can use a different model in the services section under FreeNAS for my ups. (Model number: SUA2200RM2U) which one?
 
Last edited:

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
I would start by choosing any APC model in the NUT compatibility list that uses the usphid-ups driver - and I see that APC ups 2 Smart-UPS USB USB (usbhid-ups) is in the dropdown list in Services, UPS. Test that and see if it works as you expect. Study the information on the various drivers on the NUT for FreeBSD site for more information.
 

Aristotle

Dabbler
Joined
Dec 27, 2016
Messages
21
I would start by choosing any APC model in the NUT compatibility list that uses the usphid-ups driver - and I see that APC ups 2 Smart-UPS USB USB (usbhid-ups) is in the dropdown list in Services, UPS. Test that and see if it works as you expect. Study the information on the various drivers on the NUT for FreeBSD site for more information.

This helps a lot thank you. I'll try this out today and let you know.
By the way about the second part of my question... Is it possible to shutdown the FN server and reboot again when power returns? Right now the server restarts only if it's in halt mode. And when the server is in halt mode I belive that is not as good ad or equal to graceful shutdown. Don't we recommend shutdown of the server rather than halt here for freenas?
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
The UPS will send an "On battery" signal to FreeNAS which will react according to your settings in Services, UPS. What happens thereafter will depend on how your UPS and your server are individually set to respond to restoration of utility power.
 
Top