Keeping a server online as much as possible means that one needs to manage several things. Good examples include maintaining network connectivity, ensuring all server components are functioning correctly and maintaining power to a server. In facilities such as Tier 1 data centers, keeping network connectivity and power feeds operating are both primary concerns. In the SMB and home server settings, power is likely to be more of an issue than in a reliable data center, but there are a few tricks that one can use to keep the server powered on as much as possible, beyond simply utilizing a UPS unit and a backup generator.
This guide assumes that power has gone out at a location and the server has shut down as a result of the power loss event. The first method has been covered a few times on STH. Assuming one has a server with IPMI 2.0, one can remotely control the power state of the server using either a IPMI application or a web-based interface. For an example of what this looks like (using the Supermicro X9SCM-F reviewed recently):
One can use this control feature to power on a server that is in an off state, however, this requires manually administering servers. Even using IPMI tools were one can send the power on command to multiple servers at once still requires intervention.
Perhaps a better way is to set the BIOS to turn on the server whenever it gets power. Most server motherboards have a restore to last state feature which works well. What that means is that if the server was on and running, only to experience an abrupt loss of power, the server will turn on when power is restored. Likewise, if the server was off when power was lost, it will remain off when power is reapplied.
Now there is a major caveat to this if a UPS has sent a shutdown signal to the server, and the machine is able to safely power down during the outage, it will likely not come up when power is re-applied. There is another option that a lot of people are unaware of though, the Restore on AC Power Loss – Power On option.
What this option does is to power on the server whenever the power goes from not available to available. The plus side to using this setting is that servers will automatically come online shortly after power is applied. This is very helpful for things like servers acting as firewalls or routers since one likely wants those to be on all the time, and the servers being offline can have a negative impact on the ability to remotely access the site. On the other hand, there are a few disadvantages to “Power On” as a setting. First and foremost, a machine that was intentionally turned and kept off will power on after a power failure. Another negative is that if one is working on a rackmount enclosure with power supply switches in the rear, plugging a power cable in or turning on a PSU switch can mean that the server turns on prior to the box being pushed and locked into place, possibly endangering rotating drives when that occurs.
Using the Restore on AC Power Loss (or similar) setting properly allows an administrator to keep servers online after an outage. Overall, one should look at this option whenever setting up a new system.