Connection to a APC ups via lan

Status
Not open for further replies.

mactsk

Dabbler
Joined
Sep 12, 2012
Messages
24
I have to build 2 free nas, the setup includes a single 1500 APC ups with network card, the ups serves the local switch and the 2 freenas boxes. i looked into the ups setup but it seems to me that only usb connection is possible.
is there a way to switch off the two freenas boxes using a single ups?

Tnanks

Fabrizio
 

jsylvia007

Explorer
Joined
Oct 4, 2011
Messages
84
Did you ever find an answer to this? I am in the same situation as you are... I have a linux server that is connected to the UPS, and have multiple clients that connect to it. My goal would be to have the FreeNAS connect to that as well. FreeNAS appears to use apcupsd, which is the same thing used in my environment, so I know it's possible. I just don't see way to configure it.
 

Milhouse

Guru
Joined
Jun 1, 2011
Messages
564
FreeNAS doesn't support network UPS where the FreeNAS server(s) are the UPS slave (client). FreeNAS will act as a UPS master, but this isn't of any value in your situation.

It's a long-term outstanding issue.

You can hack in support for UPS slave on previous releases of FreeNAS (see the linked issue which references a thread providing details for FreeNAS 8.0.2) but I haven't gotten around to working out the changes required for 8.3.0 as I'm still in the test phase. It's usually pretty trivial, just a matter of hacking the script that generates the ups.conf.
 

jsylvia007

Explorer
Joined
Oct 4, 2011
Messages
84
I ended up installing the 8.3 Plugin Jail, and adding the the apcupsd package (using make config to enable client-only mode), and then make install clean to get it installed. From there I edited the Jailed apcupsd.conf to match my other clients.

All is well.
 

jsylvia007

Explorer
Joined
Oct 4, 2011
Messages
84
Actually, it appears that not all is well. I'm not sure that the plugin jail is able to successfully call shutdown to the actual freenas. I'm experimenting with ssh commands to call the actual shutdown.

Now my problem is that, from the plugin jail, if I try to ssh out to the main freenas, I get "Host key verification failed."

Any ideas?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
A jail lacks permission to halt the host.

ssh to the host will work, but it sounds like you have a ssh problem. Make sure sshd is running on FreeNAS of course, and check the keys in /etc/ssh/ match what's in the jail - the jailed user's key may be wrong.
 

jsylvia007

Explorer
Joined
Oct 4, 2011
Messages
84
A jail lacks permission to halt the host.

ssh to the host will work, but it sounds like you have a ssh problem. Make sure sshd is running on FreeNAS of course, and check the keys in /etc/ssh/ match what's in the jail - the jailed user's key may be wrong.

I ended up scrapping the whole idea and deleting the jail. On my server I now just have a script that ssh's into the FreeNAS box and executes shutdown in the event of a power failure. Where there is a will, there are 100 ways. :-D

Now I have an issue with my SATA Chipset. There is a FreeBSD driver issue where the drives don't spin-down, and won't let the system power off... Hopefully it's fixed in a new update... If not, I suppose I can look into changing my SATA controller.
 

Milhouse

Guru
Joined
Jun 1, 2011
Messages
564
Probably easier to hack the standard UPS script, adding network UPS support - it's usually just a few lines that need to be changed, reconfiguring the system to monitor the UPS a slave rather than a master.

Not ideal, I grant you, but I'd say better than installing an entire jail plus other software.
 

jsylvia007

Explorer
Joined
Oct 4, 2011
Messages
84
Probably easier to hack the standard UPS script, adding network UPS support - it's usually just a few lines that need to be changed, reconfiguring the system to monitor the UPS a slave rather than a master.

Not ideal, I grant you, but I'd say better than installing an entire jail plus other software.

I went about trying to hack the ups script, but that wouldn't persist through a firmware, and the apcupsd software that I needed was already available in the app database for BSD. So once I installed the jail, I just installed the software. Like I said though, the easier solution turned out to be to just call shutdown from my real server via ssh.
 
Status
Not open for further replies.
Top