Equipping my NAS with UPS

Since my NAS/server has been built ~3 years ago, It has probably encountered close to 100 “unscheduled reboots”.

I needed to manually fix ~10 corrupted files, which TrueNAS could not fix.

The easy fix of course being: Don’t pull the power plug idiot!
Mistakes do happen, and a small investment in an Uninterruptable Power Supply will iron future ones out.

My main goal is to get a UPS which:

  • can automatically shutdown the NAS via USB/Serial/???
  • lasts long enough to shutdown VMs and the host safely
  • does not cost an arm and a leg
  • is fanless

Eaton to the rescue

The brand EATON cought my attention, as it appears they only have models where they provided the shutdown protocol.
Reverse Engineering is always an option, but working hand in hand is a lot better.

Since I had a lot to do with their industrial modules in a previous job, my expectations were pretty high. And how well they were met.

After a while searching around, I went with their Ellipse ECO 650 DIN USB.
It has USB (for graceful shutdown) and can surge-protect 10/100 Ethernet (don’t need), supplies a max of 400W to 3 sockets.

load runtime
50% or 200W 9:00 min
70% or 280W 6:00 min

This model also implements a Master/Slave mode, as seen on some advanced power strips. Although this is mostly meant for workstations, it’s a nice addition. When a PC plugged into the master socket turns off/goes into standby, the UPS will disable the Slave sockets (e.g. Monitor, Speakers etc).

Internally it’s very well built. DO NOT TAKE IT APART! IT WILL KILL YOU!

It uses an 8-bit MCU by ST: the ST72F324BK6T6

  • The 500VA / 300W model does not come with USB!
  • The 650VA / 400W model can come with or without USB!
  • models with higher wattage always come with USB! (EATON might change this)

There are cheaper models available, even with USB, but the Ellipse ECO is a solid choice. The 650VA / 400W model is available for as low as 110€.

Configuration

In TrueNAS, go to Services and edit the UPS Service. Enable it and set it to start automatically.

  1. select the proper UPS USB Device Driver (your UPS model)
  2. select the USB port (or auto)
  3. The Server that is connected to the UPS is the Master Server
    • Slave servers can be shutdown by the Master
    • The Master will shutdown as soon as the Slaves are offline
  4. graceful shutdown if power lost or the UPS runs out of battery
  5. UPS service will issue a shutdown if power is still lost after this delay

Behind the scenes this is handled by upsmon, a open source UPS monitoring service. Available for most distros.

Conclusion

It’s nice! I can finally update the BIOS’ on all my Computers. I could also use the UPS as a complicated power button, if I need to switch off the server, but don’t want to login on the web ui. If i were to set the shutdown timer to something >30s, I’d almost be able to move the server around the house while its online.

roman's lab

Technology and Engineering Blog


Data Integrity Supply

By Roman Hayn
8 December 2023

[~] ls
-r-x Homelab