What should I do in the event of a power outage?

Alex762

Dabbler
Joined
Jul 31, 2022
Messages
28
Hi all.
I have just set up a TrueNAS system and I was curious about a thing that will eventually happen in the future: since NAS usually are left on all the time, what would happen in case of a sudden power outage? I've been hearing of people getting their system not working anymore in case of a sudden shutdown, and some others even lost data... Should I be worried? Should I consider buying a small UPS or something?
 
Joined
Jun 2, 2019
Messages
591
You need to connect your TrueNAS servers (and another other critical equipment) to a UPS to prevent an abrupt power loss from corrupting the file system, then configure the TrueNAS UPS service monitor and gracefully shutdown before UPS power is completely lost.


Before purchasing a UPS, check the NUT HCL. In general, name brand UPS will have better compatibility.


If you have multiple clients (NAS, workstations, etc.) that are connected to the same UPS, configure one of the clients as a UPS Master, then configure any additional clients as UPS Slaves to remotely monitor the same UPS via LAN.

Make sure to size the UPS to give you at least 30 minutes of run time based on the total number client power draw.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Should I consider buying a small UPS or something?
Yes, and then you should actually do it. But with that said, ZFS is pretty tolerant of hard power-off events. Before my parents got a UPS for their NAS (TrueNAS CORE 12 on a HPE MicroServer Gen8), they had a number of such events with no data loss or other damage.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
While a UPS is a good idea for any server, ZFS was specifically designed to NOT loose data on un-expected power loss. You can loose data in transit, but that would apply to any file system.

All that said, UPSes can also protect against hardware damage from brown outs, and irregular power. Disks being mechanical tend to have a harder time on weird power than say a network card. The network card might not function correctly but is less likely to be permanently damaged when compared to mechanical disks.

One last note, if you have VM storage on TrueNAS, and use synchronous writes, UPSes are good, but "sync=always" is still desirable.
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
As a side note to the ton of great info you received, when choosing a UPS you should look for one that also has pure sine wave.
 
Last edited:
Top