HP-UX System Administrator's Guide: Routine Management Tasks
Many HP-UX systems can be equipped with uninterruptible power supplies (UPSs)
to allow you to maintain power to your systems for a short while following the failure
of your computer’s primary power source. If the power failure is brief, systems equipped
with UPSs will not be affected by the power failure at all. If the power failure appears
as though it will last for a long time, you can use the buffer period provided by an
uninterruptible power supply to perform a normal shutdown. See “Normal (Planned)
Shutdown” (page 85).
Computers equipped with HP PowerTrust uninterruptible power supplies can also be
monitored by a special daemon called upsmond, which, when running, always resides
in memory (is not swappable). upsmondcommunicates with the power supplies, and
when power has been off for longer than a pre-configured time period, upsmond will
perform a clean shutdown of your system automatically.
Not all HP-UX systems are equipped with uninterruptible power supplies. If yours is
not, an unclean shutdown is the likely result of a power failure. No memory dump
will be performed, and it is possible that buffers of recent disk changes still reside in
memory, and have not been written to disk by the sync program. See “Unclean
Shutdowns” (page 89) for details.
When a power failure occurs, it is good practice to turn off the power switches to your
computer and its peripherals. This will reduce the chances of a power surge harming
your equipment when the power comes back on. After the power is restored, follow
normal boot procedures. See “A Standard Boot ” (page 39).
Unclean Shutdowns
When a system is properly shut down, all memory-based file system changes are written
to disk and the file systems on disk are marked as being clean. However, if an improper
shutdown (for example, a power failure) occurs, the memory-based information might
not be written to disk and therefore certain file systems will not have their “clean” flag
set (because, in fact, they might have structural problems as a result of the
memory-based information not being written to disk).
When this happens, a special activity occurs during the boot process. The file system
consistency checker (fsck), when checking for clean flags on all file systems represented
in the file /etc/fstab, will detect that file systems exist that do not have clean flags
set. For these file systems, fsck will perform a check/repair operation to locate and fix
any problems that resulted from the improper shutdown. In nearly all cases, fsck can
find and fix all of the structural problems and the file system can then be marked clean.
On rare occasions, the file system corruption is beyond what fsck can automatically
correct. In these cases fsck will terminate with an error message indicating that you
need to use it in an interactive mode to fix the more serious problems. In these cases
data loss is likely. Before using fsck in interactive mode, try to back up any critical
files by moving them to another file system or backing them up to tape, if a backup
copy of them does not already exist.
Shutting Down Systems 89