Problem
Filesystems experience corruption due to many different causes,
necessitating repair. Often, default flags on repair utilities
will not catch all the problems. Cause
Filesystem corruption can be caused by the following:
Panic/Hang Power Problems or Hardware failure Improper termination of a running kernel A Poorly written or faulty device driver
There are other possible causes of filesystem corruption. The ones mentioned here are the more common ones.
Solution
Because many different problems can arise from filesystem
corruption, there are a number of utilities designed to repair
filesystems. The following sequence of utilities work well when
the following conditions are met:1. They are run in single-user mode. 2. They are run in sequence. 3. They are run on a regular basis -- usually once a month unless error conditions or circumstances indicate they should be run sooner.
They should be run whenever, during a boot, the following message is displayed on the console:
fsstat: root file system needs checking. OK to check the root file system (/dev/root)? (y/n)
Answer no, and bring the system up into System Maintenance (single-user) mode.
Run the following in sequence:a) To check the filesystem:/etc/fsck -ofull <Enter>Important Note: Except for the root filesystem, fsck must be run on an unmounted filesystem.
b) To check for files in the trusted computer base (tcb) that were caught in the process of being updated when the system went down and for files that may have been removed, run:
/etc/tcbck <Enter>c) To check the consistency of the authentication database, run:
/tcb/bin/authck -a -v <Enter>d) To check the system files against the authentication database:
/tcb/bin/integrity -em > /tmp/integ.rpt <Enter>e) and to fix any problems:/etc/fixmog -v <Enter>f) In addition, for SCO OpenServer Releases it is important, through
scoadmin(ADM) or custom(ADM), to run:Software Manager ==> Software ==>
Verify System ==> Normal System State (thorough)
Verify System ==> Broken/missing symbolic linksIMPORTANT: DO NOT RUN "Strict database compliance" unless this is a brand new install, as this will remove all configured files in /var/opt/K/SCO/... and put the system into a fresh install configuration.
All the size and cksum discrepancies are with /var/opt/K file - the
volatile files that are expected to be or allowed to be site
modified. These size and cksum issues are not reflected in
a "quick" verification, see fixperm.NOTE:
------------------------------------------------------------------To check other filesystems (non-root):------------------------------------------------------------------The two methods of running fsck on non-root filesystems are through the GUI or from the command line.
Important Note: All non-root filesystems must be unmounted before they are checked.
The following information is for the GUI environment:
Double click on the "System Administration" folder to open it. Double click on the "Filesystems" folder to open it. Double click on the "Filesystem Manager" icon to start it. You will now see the filesystems that are on the system (mounted and unmounted).
If a filesystem is mounted it will have a symbol to the left of the
filesystem name (an example would be /dev/root) which will have the
symbol. If the filesystem you want to check is mounted you can
unmount it by clicking on "Mount" -> "Unmount".Once the filesystem(s) you want to check is unmounted, highlight the filesystem you want to check and click on:
"Mount" -> "Check and Repair" -> "Selected Filesystems"You will be presented with a new window. You will be able to
run a "Full Check" or "Fast Check". If the filesystem is being
checked, select "Full Check". You can also choose to "Automatic
Repair" or "Do Not Repair". See the "help" screen to determine
if you want the system to automatically attempt to repair problems
it finds or if you want to be prompted to repair all files it
wants to repair.The following instructions are for the command prompt environment:
Check to see if the filesystems (non-root) you want to check
are mounted. To do this, type:# mount <enter>The results will be all of the filesystems that are currently
mounted on the system. If a filesystem that you want to check
is mounted you will need to umount it first as follows:# umount /dev/<filesystem_name>Once the filesystem is unmounted run the following:
# /etc/fsck -ofull /dev/<filesystem_name>If you want to have the system automatically attempt to repair any problems, enter:
# /etc/fsck -ofull /dev/<filesystem_name> -yPlease The output file generated by integrity listed above can be used to
Note: verify fixes and to keep track of error patterns which may be
indicative of areas that need attention.If there has been corruption resolved by these utilities, it is
also advisable to perform a complete system backup as soon after
completing these procedures as possible to insure a pristine
backup. The filesystem corruption may have propagated to existing
backups and, if it is due to deteriorating hardware, a new backup
may be necessary when hardware is replaced. A pristine backup will
eliminate reintroducing corruption on new hardware.To check the inodes on a server, use "ncheck", eg:
# ncheck /dev/rrootSee /etc/default/filesys See also
ta104907, "What are some of the basic utilities to verify system integrity?"
For SCO UNIX System V/386 Release 3.2 Version 4.x see:
ta105410,"Filesystem Repair Utilities for SCO UNIX Release 3.2 Version 4.2."