Freenas UPS shutdown

Status
Not open for further replies.

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
I have a few questions on ups configuration, in decreasing order of Freenas specificity. Context is an N54L Microserver, 8GB RAM, one zpool RAIDZ2 with 4 1TB drives. Little use except for CIFS shares for backups and AFP shares for Apple Time Machine backups. Firstly, what is a reasonably safe time to give the machine to shutdown? Does it depend if it is doing snapshots or scrubs at the time, and can it shutdown gracefully in a short time even then?

Secondly, when CIFS and AFP are shutdown do they give clients any sensible information about what is happening.

Lastly, does anyone know what sort of impact at the time, and later when service is resumed, on a Time Machine backup?

Obviously the first question is useful to know when configuring NUT, and the others are more curiosity.

Many thanks,

Roger
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
1) This depends on how many jails you have running but 2 minutes should be a lot of time.
2) No
3) I can't answer that one.

I have my UPS configured to UPS Reaches Low Battery, which in my opinion is the best setting. If you do set it up with a timer and how long it's been on UPS, then take into account when the UPS battery is old and failing, it may not give you that much time.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
1) This depends on how many jails you have running but 2 minutes should be a lot of time.
2) No
3) I can't answer that one.

I have my UPS configured to UPS Reaches Low Battery, which in my opinion is the best setting. If you do set it up with a timer and how long it's been on UPS, then take into account when the UPS battery is old and failing, it may not give you that much time.


Thanks. Two minutes is about what I would have guessed was reasonable, it is reassuring that it works in practice. This is the delay between initiating shutdown and the UPS turning off. You could argue that if the UPS can't keep things going long enough to shut down it is no longer useful. More importantly, I get lots of power cuts so don't want to deplete the battery on the first one. I don't know if NUT can be configured to shutdown on low battery if this occurs before a timed shutdown, and, if so, whether it still honours turn off delay?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
If you do get frequent power interruptions and would rather play it safe, configure the UPS setting to shutdown after on battery and a timer of XX seconds.

Now how do you determine XX seconds is the tricky part and it's all personal preference. I'd personally configure FreeNAS to shutdown on low battery, unplug the UPS from the wall and time it. If I got 5 minutes then I'd set it to shutdown on low battery and that should give you enough time to safe the system. If you get more than 5 minutes then you need to figure out how much of a risk you want to take draining your UPS. The problem with setting a timer is if you have many small power outages that last less than your timer value, you can drain the UPS battery and never hit your timer value. Now I've never tested this but one would think that even if you had set a timer value, if the UPS ever posted a low battery alarm that NUT would still force a shutdown. I have not tested this myself.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I have my UPS configured to UPS Reaches Low Battery, which in my opinion is the best setting. If you do set it up with a timer and how long it's been on UPS, then take into account when the UPS battery is old and failing, it may not give you that much time.

Every UPS I have ever owned I have set as a timer, but they all also shutdown if you reach the low battery warning level automatically. So there's nothing gained and nothing lost from doing a low battery setting, but you gain more time to shutdown if you choose to do a timer (and potentially a longer battery lifespan from not fully cycling the batteries).
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
Every UPS I have ever owned I have set as a timer, but they all also shutdown if you reach the low battery warning level automatically. So there's nothing gained and nothing lost from doing a low battery setting, but you gain more time to shutdown if you choose to do a timer (and potentially a longer battery lifespan from not fully cycling the batteries).


I agree. I have a UPS for safe shutdown whenever power is lost for more than a few seconds. I don't use it to maintain availability.

If the consensus is that 2 minutes for the UPS to switch off after calling a shutdown is a conservative setting for my Freenas server I'll go with that.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I do 2 minutes just because I know in my area if I lose power for 2 minutes I've probably lost power for a few hours.
 

panz

Guru
Joined
May 24, 2013
Messages
556
I think that cycling the batteries once or twice a year is a good test (APC manual suggests this).

Here in Italy the main power has a lot of fluctuations, so 2 minutes would not be good. Sometimes power goes off for 15 minutes :mad:

So, I setup the NUT service to commit shutdown & power off when batteries are as low as 20%.
 
Status
Not open for further replies.
Top