• 0 Posts
  • 5 Comments
Joined 3 years ago
cake
Cake day: June 12th, 2023

help-circle
  • HamsterRage@lemmy.catoSelfhosted@lemmy.worldWhy homelab?
    link
    fedilink
    English
    arrow-up
    8
    ·
    1 day ago

    I think that as you move towards replacing cloud services with self-hosted ones you take on the responsibility of providing the same reliability as the cloud services.

    Just installing a UPS will let you ride through 99% of all power failures because most of them are only a few seconds long. My UPS says that my entire HomeLab, including Internet modems runs at about 100W, and it will last for the better part of an hour.

    The question then becomes about longer outages, that run the UPS dry. There are two issues.

    The first issue is system shutdowns, if they just crash when the battery ends, then you run the risk of data corruption and disk buffers that haven’t flushed. But in truth, this is probably a minor possibility. Your servers were up, but the rest of your house was already down. No feed from the cameras, no events in HomeAssistant, no WiFi, no nothing. This means virtually no activity on your servers for an extended period of time.

    This doesn’t eliminate the possibility of corruption, but it makes it less likely.

    The second issue is getting the servers back up and running when the power returns. This can be a bit more complicated, what if the power is up and down a bit before the UPS has some charge built up?

    Maybe your best just leaving them off for a bit until things have stabilized and the UPS has a charge.

    NUTs deals with both of these issues in an automated fashion. It can shut your services down in a controlled manner so that they don’t crash when the battery dies. It can bring your servers back on line when the power is restored and stable.

    For me, my main concern is for when the power failure goes past he battery life when I’m on vacation. I won’t be able to go and push power buttons on the server. NUTs can get a bit tricky if you are looking for 100% hands-free operation. I can deal with anything when I’m home, but away in problematic.

    I’ve decided to leave NUTs out of the mix for now. All of my servers are configured to turn on when power is restored, and all of the services are configured to start up automatically when the server boots. I’m content to let the UPS drain dry, crash the mostly idle servers when that happens, and then reboot when power is restored.

    There’s a risk, but I think I understand it.