Managing Systems and Workgroups: A Guide for HP-UX System Administrators

Administering a System: Managing Disks and Files
Managing File Systems
Chapter 6 617
Before doing so, move any critical files on this file system that have not
yet been backed up (and are still intact) to another file system or try
saving them to tape.
When you run fsck interactively, it may need to perform actions that
could cause the loss of data or the removal of a file/file name (such as
when two files claim ownership of the same data blocks). Because of this,
any backups of this file system at this point are likely to fail. This is
another reason you should back up your system regularly!
IMPORTANT Empty the lost+found directory before running fsck again.
Step 9. Run fsck interactively by reexecuting fsck without the -p or -P option.
As fsck encounters errors, it will request permission to perform certain
tasks. If you do not give fsck permission to perform the correction, it will
bypass the operation, leaving the file system unrepaired.
After running interactively, in many cases fsck will request you do a
reboot -n. Failing to do so might re-corrupt your file system. (Note, do
not use reboot -n for normal rebooting activities.)
Step 10. Examine files in the lost+found directory.
Once fsck has repaired the file system, mount the file system and check
its lost+found directory for any entries that might now be present.
These are files, listed by inode number, that have lost their association
with their original directories. Examine these files, determine their
name, and return them to their proper location. To do this,
Use the file command to determine file type.
If they are ASCII text files, you can review them using cat or more to
see what they contain.
If they are some other type, you will have to use a utility such as xd
or od to examine their contents.
Run the commands what or strings to help you find the origin of
your lost+found files.