On Mon, Jul 26, 2004 at 10:12:18AM +0100, Peter Risdon wrote:
> I'd be very grateful if someone would steer me towards some 
> documentation about dealing with, even recovering, files in lost and 
> found directories.

There's not a great deal out there, because the lost+found directory
is pretty uncomplicated.  See fsck(8) for the basics, but what happens
is this.  An unclean shutdown can result in corrupted information
being written into a directory structure.  That effectively wipes out
all record of a files' *name*.  However, the exhaustive search of the
filesystem contents done by fsck(8) can still locate the files
*contents*.  Rather than just throwing that data away the files are
preserved by making a directory entry in the 'lost+found' directory.
Unfortunately, since the file name is lost, the system has to make up
it's own name, which it does based on the inode number of the file.
That's a good choice, because it's guarranteed to be unique amongst
all of the files on that filesystem.

Unfortunately there isn't going to be some sort of nice automated
system you can use to restore everything to the way it was before the
crash: if there was, fsck(8) would do that already for you.  You're
going to have to go through all of those orphaned files and by
inspecting the contents try and work out what they were and where they



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

Attachment: pgpcMWb7o94ec.pgp
Description: PGP signature

Reply via email to