Shutdown FreeNAS from another machine running Network UPS Tools.

Status
Not open for further replies.

panz

Guru
Joined
May 24, 2013
Messages
556
I can't place the FreeNAS box near my APC Smart UPS SU1000 (serial port), so I'm not able to connect it to the FreeNAS box for unattended shutdown in the event of a power failure.

Otherwise, the UPS is placed in the same room with a pfSense machine running NUT (Network UPS tools). It works very well (via serial cable).

How could I send the shutdown command - via Ethernet - from the pfSense machine to the FreeNAS box?
 

panz

Guru
Joined
May 24, 2013
Messages
556
I was trying this solution, but I fear to mess something on the pfSense side (same problem as FreeNAS: whatever is not available on the GUI is at risk of breaking something). :)
 

panz

Guru
Joined
May 24, 2013
Messages
556
Setup NUT in slave mode on the FreeNAS box and link it to NUT running in master mode on the pfSense box: http://doc.freenas.org/index.php/UPS

I posted the question on pfSense forum, receiving a interesting answer that I didn't understand :)

https://forum.pfsense.org/index.php/topic,71087.msg393554.html#msg393554

"Since that system is FreeNAS perhaps you have another option:

mount a NAS share on pfSense, have nut touch a flag file that triggers FreeNAS to shut down when present. (e.g. a cron job with a script that checks every minute, if it's seen, rm the file and issue a shutdown -p)"
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
I've been indicating this is a bit of a deficiency for some time now. In a normal rack of gear setup, it would be very unusual for each server to have its own UPS. It also deals poorly with environments with redundancy, etc.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
"Since that system is FreeNAS perhaps you have another option:

mount a NAS share on pfSense, have nut touch a flag file that triggers FreeNAS to shut down when present. (e.g. a cron job with a script that checks every minute, if it's seen, rm the file and issue a shutdown -p)"
I guess this also involves editing files on pfSense (you need to hook a script somewhere that will touch the file on shutdown). You indicated that you are afraid to "make a mess with scripts", however I don't think there's another option. So, when you do edit files on pfSense do it properly and configure NUT to be accessible via network, there's no need for workarounds with cron jobs and flag files.
I've been indicating this is a bit of a deficiency for some time now. In a normal rack of gear setup, it would be very unusual for each server to have its own UPS. It also deals poorly with environments with redundancy, etc.
Deficiency in FreeNAS or pfSense?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
Take your pick. Though I haven't looked at pfSense lately.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Take your pick. Though I haven't looked at pfSense lately.
The pfSense GUI settings for NUT seem to be a bit limited, but I'm not sure what is the problem with FreeNAS. I can start the FreeNAS NUT in slave mode, point it to an IP running another NUT instance and FreeNAS will shutdown when the master NUT initiates a shutdown.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
Okay, well that's much better than it used to be. :)
 

panz

Guru
Joined
May 24, 2013
Messages
556
"Mess don't your pfSense, Luke; GUI powerful FreeNAS is" ;)
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
Can I please unsee the Star Wars references... ugh
 

panz

Guru
Joined
May 24, 2013
Messages
556
I was jocking on myself, because English is not my mother language and I write in English very bad; so, sometimes, I speak like Yoda. Sorry :)
 
Status
Not open for further replies.
Top