Prepare server for expected power loss

dschout

New Member
Hello,

I've Googled a bit and haven't found a very clear answer ... I have a server that needs to run without human intervention. It is connected to a UPS with a USB link so I can use monitoring programs to tell when power has been lost and when battery backup is about to run out. My server BIOS is setup to automatically boot the computer after power loss once power is restored.

The issue is I don't want to halt the system when batteries are "almost" depleted because if power comes back on after halting, but before power to the server is lost (i.e. before batteries are totally depleted) then the system will just sit in halt state forever unless there is manual intervention.

But I also want to sync disks and generally prepare for anticipated power loss.

So the quetion is: is there a good way to "harden" a running server for expected power loss without halting it? My system is really only running one user level program that I can shutdown with scripts, so that is solved. But I am concerned about root filesystem corruption. Is running "sync" when battery is at say, 1%, enough?

I hope my question is clear.

One "hardware" alternative is to use wake on LAN ... but AFAIK this will require opening ports that I would much prefer to keep closed.

Thanks!
 


JulienCC

Active Member
Hi,

The best thing would be for your UPS to have a way of powering up your machine.

But if you don't, you have two options :
  • let if fall, don't even care with powerloss. Most linux filesystems are journalized and won't be hurt by a sudden power loss. If you don't use RAID drive you will be safe
  • put the system in a failsafe state (stop everything using harddrives or sensitive hardware) when you get the low power notice then start everything when power is back
One "hardware" alternative is to use wake on LAN ... but AFAIK this will require opening ports that I would much prefer to keep closed.
If your UPS can send WOL then use it. As I said you need a way for your UPS to wake up your machine. If your plan was to manually send WOL from the outside well I agree this is not the best idea.
 

Members online


Latest posts

Top