Shutdown multiple server with one UPS

Status
Not open for further replies.

IceBoosteR

Guru
Joined
Sep 27, 2016
Messages
503
Hi guys,

has anyone run a UPS on FreeNAS as master, and also other servers as clients, which will shutdown when the master goes down?
I am using an APC UPS for half a ear now I guess. So far so good - everything works as it should. After half a minute of power loss, FreeNAS will start/initialte the shutdown. I know want to add clients (other servers) which should follow the shutdown command of the master (When the master initiates shutdown, clients should do it also, or even seconds before). I have seen, that there is the possiblity to use upsmon, but I am wondering if anyone has an example how to configure the client?
(Before I am searching for it and do trial and error for hours...).
Thank you!
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
I have done that with my servers. I'll have to get some screenshots and upload them when I get home.

Sent from my SAMSUNG-SGH-I537 using Tapatalk
 

IceBoosteR

Guru
Joined
Sep 27, 2016
Messages
503
I have done that with my servers. I'll have to get some screenshots and upload them when I get home.

Sent from my SAMSUNG-SGH-I537 using Tapatalk
Hi Chris,

I don't want to stress you, but do you have the screenshots? :)
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
Hi guys,

has anyone run a UPS on FreeNAS as master, and also other servers as clients, which will shutdown when the master goes down?
I am using an APC UPS for half a ear now I guess. So far so good - everything works as it should. After half a minute of power loss, FreeNAS will start/initialte the shutdown. I know want to add clients (other servers) which should follow the shutdown command of the master (When the master initiates shutdown, clients should do it also, or even seconds before). I have seen, that there is the possiblity to use upsmon, but I am wondering if anyone has an example how to configure the client?
(Before I am searching for it and do trial and error for hours...).
Thank you!
I wrote a resource on this subject that may be helpful to you: "Configuring UPS support for single or multiple FreeNAS servers"
 
Last edited:

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Hi Chris,

I don't want to stress you, but do you have the screenshots? :)
Sorry, I was working in my yard all weekend. It is summer here and if I don't battle with the growth, the jungle will take over.
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478

IceBoosteR

Guru
Joined
Sep 27, 2016
Messages
503
Thank you guys. I will have a look into that tomorrow. :)
 

IceBoosteR

Guru
Joined
Sep 27, 2016
Messages
503
I had a look into that. Seems to be straight forward, but unfortunately I have to configure the client on ubuntu, which does not offer me a GUI. Do you guys know where FreeNAS stores the upsd config?
@Spearfoot I was not sure how did you configure your master/slave with those SSH commands. Would it owkr that way as the slave shuts down the master? :O

-Ice
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
The terminology of master and slave is horrible and someone needs to rewrite the software to eliminate that. The point of it is, the system with the UPS attached is called 'master' and shares the UPS status with the other systems that are 'slave' so the slave systems can shutdown when the master signal indicates a power loss. Where the UPS is, that is 'master', because it is the ones telling the others what to do.
 

IceBoosteR

Guru
Joined
Sep 27, 2016
Messages
503
The terminology of master and slave is horrible and someone needs to rewrite the software to eliminate that. The point of it is, the system with the UPS attached is called 'master' and shares the UPS status with the other systems that are 'slave' so the slave systems can shutdown when the master signal indicates a power loss. Where the UPS is, that is 'master', because it is the ones telling the others what to do.
Thank you for carification.
Therefore I can configure the master (FreeNAS) to wait 1 minute after power loss to shutdown "enter shutdowncommand: shutdown -p" and on the slave side I can configure to locally shutdown immediatly after powerloss I understand.
There is no need for SSH as the slaves are receiving the config/status from the master.
Well thanks! :)
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
There is no need for SSH as the slaves are receiving the config/status from the master. :)
Correct.
In my resource, SSH only applies if you are running FreeNAS as a VM under ESXi. In this case, you need to shut down the FreeNAS indirectly, by sending a poweroff command to ESXi, which then initiates shutdown of the FreeNAS VM.

In the more typical case where several FreeNAS servers receive power from the same UPS, one of the FreeNAS servers (the 'master') is attached directly to the UPS (via USB or serial cable) and signals the other servers when it's time to shut down.
 

IceBoosteR

Guru
Joined
Sep 27, 2016
Messages
503
Today I have found some time to configure the UPS.
I was wondering, I only added the IP address to listen to, and my client was able to read the configuration -> without any user to specify.
I found some good documentation, but I did not need them :O
https://zackreed.me/installing-nut-on-ubuntu/
 
Status
Not open for further replies.
Top