10.0;find_orphans, revision 1.0, 88/01/22
find_orphans -- Locate and catalog uncataloged objects.
usage: find_orphans [-l | -list] [-s | -search]
[ -v | -verify ]
[ volume_pathname ]
DESCRIPTION
find_orphans finds all uncataloged permanent objects in a local
volume. It uses or creates a directory "lost+found" in the root of the
volume and creates entries for all objects not cataloged elsewhere.
find_orphans can operate by itself by using search mode, in which case it
searches the volume for all orphans, or it works with salvol (list mode,
the default), in which case it just catalogs the orphans detected by the
previous run of salvol. Both methods find exactly the same set of
orphans. We recommend that you run find_orphans every time a node is
booted, and on every mounted volume. Below is a description of the two
modes of operation.
The objects cataloged by find_orphans are given sequential names like f1,
f2, etc., and you can move them using /com/mvf or /bin/mv to a directory
of your choice. find_orphans is useful for finding objects that were
being updated during a system crash or that were uncataloged through
program errors.
In list mode (the default), find_orphans catalogs all objects listed in
the file lost+found.list in the root directory of the volume. If the
file does not exist, find_orphans creates it. Note that invol creates the
file when it creates the volume. If the lost+found.list exists, salvol
enters information describing each orphan. List mode is considerably
faster than search mode since there is no need to search the entire
volume. You must have permission to catalog objects in lost+found.
In search mode, you must have read permission to all directories on the
volume. If some directory is not readable, every object under that
directory is cataloged in the lost+found directory. In addition, you must
have permission either to create the lost+found directory or to
catalog objects in lost+found when it already exists. Search mode
should be run only on a quiescent node; that is, one not connected to the
network (use netsvc -n to disable network communications) and not
actively running any processes other than the one performing the
find_orphans operation.
volume_pathname (optional)
Specify the name of the volume to be searched. The volume
must be physically attached to your node; you may not find
orphan objects on volumes elsewhere in the network.
Default if omitted: search node boot volume
OPTIONS
-l[ist] (default)
List mode, catalog objects listed in /lost+found.list.
-s[earch] Search mode, search the volume for orphans.
-v[erify] Verify only; don't catalog any orphans.
EXAMPLES
$ /etc/find_orphans
Cataloging in: /lost+found
39D40FF0.100086CA -> f1
39D40F9D.E00086CA -> f2
39D41026.600086CA -> f3
39D40DA6.D00086CA -> f4
39D40998.200086CA -> f5
39D41042.800086CA -> f6
39D40CB8.E00086CA -> f7
39D41001.300086CA -> f8
39D40F7E.D00086CA -> f9
39D40CCE.F00086CA -> f10
39D40D8B.C00086CA -> f11
39D40E33.100086CA -> f12
39D40A06.700086CA -> f13
39D40F23.900086CA -> f14
39D40E16.000086CA -> f15
39D40F36.A00086CA -> f16
39D41C0A.200086CA -> f17
Number of orphans catalogued: 17
$ ld -a /lost+found
Directory "/lost+found":
sys type blocks current
type uid used length attr rights name
file uasc 1 32 P prwx- f1
file unstruct 0 0 P prwx- f10
file uasc 1 32 P prwx- f11
file unstruct 0 0 P prwx- f12
file unstruct 1 54 P prwx- f13
file uasc 1 32 P prwx- f14
file uasc 1 32 P prwx- f15
file unstruct 0 0 P prwx- f16
file unstruct 0 0 P prwx- f17
file unstruct 0 0 P prwx- f2
file uasc 1 32 P prwx- f3
file unstruct 0 0 P prwx- f4
file coff 1 101376 P prwx- f5
file unstruct 0 0 P prwx- f6
file uasc 1 32 P prwx- f7
file unstruct 0 0 P prwx- f8
file uasc 1 32 P prwx- f9
17 entries, 9 blocks used.