Hardware Reference
In-Depth Information
N With most UPS units, the power sockets will be divided between those that are powered in the event of an
outage and those that aren't. All sockets are generally protected against surges.
Note
Given, say, four powered sockets, you have to decide what devices will use it. Naturally, your server should be
a given. That's followed by the home's internal router or switch so that a “shutting down” message can be sent and
processed by the other machines on a UPS. (This is for the computers benefit only, since any human will have noticed
the lights going out and will instantly panic knowing they haven't hit the Save button on their application.) You may
also want to keep the broadband router on the UPS also so that a warning message (via e-mail, for example) can be
sent. This is usually a minor consideration, but if you work remotely with the machine, this will prompt you to ease up
on any processor-heavy tasks so that the UPS can last for longer.
N When the UPS is first installed, test it with the circuit breaker but not by pulling the plug out, which can introduce
a floating ground that is dangerous to electronic equipment.
Note
The discussion of multiple servers reappears here, as it can be beneficial to have a low-power master server on
the UPS, with the media-transcoding machine on its own UPS, to preserve the longevity of the main server and even
finish recording that vital episode of Doctor Who you might have normally missed during the power cut!
If both servers are fairly high power and you have only one UPS, then it is usually worth consolidating both into
one box to limit the power drain on the unit.
You might also consider keeping one powered socket for a monitor, perhaps connected to the second media
server UPS unit. If you keep it turned off, it'll draw very little power from the UPS, but in the event of a problem, you
are able to see the machine running through its shutdown procedure, and you can ensure that its closedown routine
is working effectively. Without this, you will either have to trust the UPS software daemon is working or keep a laptop
handy with a fully charged battery.
N You can ensure your laptop is fully charged by using the crontab to switch on an X10 module for at least an hour
every night.
Tip
Once the hardware UPS is in place, you then need a way to detect that the power has gone and so begin the
shutdown procedure.
Most UPS units come with a USB cable (sometimes with a proprietary connector on one end, so don't lose it!)
that allows a PC to query the state of the unit. Those that don't have one are not generally worth buying. Granted, they
are cheaper, and your data is probably safe with the journaling filesystem you've already installed, but the extra cost
and peace of mind knowing you'll get a clean shutdown is worth it.
N It is possible to mimic the shutdown functionality of a UPS by using heyu to monitor the power lines and, if it
sees two (or more) lights going off at the same time, trigger a shutdown. But this method is liable to false positives and
doesn't work during daylight hours.
Note
Three primary packages are available to handle a UPS, all of which conflict if used together. They are apcupsd ,
nut-hal-drivers , and nut . I'll cover the latter because it is the most recent, flexible, and actively developed.
 
Search WWH ::




Custom Search