[Nut-upsdev] Asking hard questions about the NUT architecture
Peter Selinger
selinger at mathstat.dal.ca
Tue May 29 22:12:13 UTC 2007
Eric S. Raymond wrote:
>
> Result: You can pull the power plug out of the socket repeatedly on
> a modern Linux or Solaris system without risking your data. UPSes
> are still useful, of course, but they don't really do a cleaner or
> more reliable job of shutdown than the OS itself any more.
Interesting. I just followed your advice and pulled the plug from my
Linux machine, and none of the stuff you described happened. Instead
of receiving and sending signals and making my applications shut down
and save their data, the processor went ... well ... off. As in, no
power.
The file system journaled and was left in a consistent state, as a
modern filesystem should. However, the last few hundred kilobyte of
buffered data had not yet been synched back to disk when the drive
lost power.
On the other hand, last week I experienced a 15-second power failure,
which is typical where we live. My UPS handled the situation as it
should: it supplied power to the system. Perhaps this functionality is
"dumb" as it does not require a USB interface. But it is quite useful!
NUT has several thousand users worldwide. Including in developing
countries. Including people using very old equipment. It even includes
a few people who bought brain-dead equipment (such as a Belkin
F6C1200-UNV) without first checking the compatibility list, and
somehow took it for granted that NUT would support their equipment.
Miraculously, it took only about a week until a NUT developer modified
a driver so that the equipment in question could be supported.
Perhaps it is time that we simplified our code base. I therefore
propose that in the future, we support only a single device, the
Ablerex 625L (it has a USB interface), and a single operating system,
Windows Vista. Each following year, we should select a new officially
supported UPS, and drop support for the previous year's device. Surely
people wouldn't mind. After all, a used UPS can still be used as a car
battery or as a stepping stool. In fact, I think we should be bidding
for sponsorship from UPS manufacturers and then only offer support for
the highest paying vendor. The users of legacy devices would just have
to upgrade their hardware. Or perhaps they will start their own
project on Alioth or somewhere (oops, I think they already have).
OK, back to serious. I agree that installing NUT from sources in the
typical single-user single-machine single-power-supply case is too
complicated. Even installing from a packaged distribution can be a
pain. It would be nice to have an "installer" script a la Acrobat
Reader that prompts a few simple questions, lets the user select their
hardware from a pull-down menu (if it can't be auto-detected), and
takes care of the rest automatically, including some simple testing
and trouble shooting ("Your UPS could not be found. Please check your
cable."). ("The password you entered is not secure. It may not contain
the word 'nut'. Please use at least two upper-case letters, two
digits, and two characters from the Unicode Amharic alphabet").
Actually, such a script cannot be terribly hard to write, as
it just has to implement the procedure already described in the
INSTALL file. Any volunteers?
For complicated, multi-machine multi-UPS master-slave server room
installations, the manual method of following the INSTALL instructions
would still be an option.
-- Peter
More information about the Nut-upsdev
mailing list