When a machine crashes under Unix,
files in a directory can become detached from that directory. When
this happens, those orphaned files are saved in a directory called
lost+found. Because filenames are saved only in
directories, orphaned files are nameless. Consequently, Unix stores
them in lost+found using their
inode numbers as their names.
To illustrate, consider finding these four files in
lost+found after a crash:
#1528 #1200 #3124 #3125
Two of these are qf files, and two are
df files. Beginning with V8.7
sendmail, the qf files
contain a record of the inode numbers for their corresponding
df files. That information is stored in the
I line:
Imajor/minor/ino
Here, the major and
minor are the major and minor device
numbers for the disk device that the df file was
stored on. The ino is the inode number for
the df file. In our
lost+found example the following command could
be run to pair up the orphaned files:
% grep "^I.*/.*/" *
#1200:I123/45/3124
#1325:I123/45/1528
This shows that the qf file
#1200 has the df file
#3124 and that the qf file
#1325 has the df file
#1528.
The sendmail program does not check the inode
number in the I line against the actual inode
number of the df file. Instead, the
I line is generated afresh each time the
qf file is processed.
When df, qf, and
xf subdirectories are used, and when those
subdirectories are on separate disks, a crash of one disk can leave
the df or qf file intact, and
the other in lost+found.