Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jul 2004 10:59:10 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Peter Risdon <peter@circlesquared.com>
Cc:        FreeBSD Question List <freebsd-questions@freebsd.org>
Subject:   Re: lost and found
Message-ID:  <20040726095910.GD61141@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <4104CAF2.1030801@circlesquared.com>
References:  <4104CAF2.1030801@circlesquared.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--fOHHtNG4YXGJ0yqR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=20
> documentation about dealing with, even recovering, files in lost and=20
> 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
belong.

	Cheers,

	Matthew

--=20
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

--fOHHtNG4YXGJ0yqR
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFBBNXuiD657aJF7eIRAlzlAJ9GApGb+5n50azBI7JbTJnTAVUw6wCdHD5Q
/TiCtpdo+MNYmsAfN5c9E6k=
=Oe2U
-----END PGP SIGNATURE-----

--fOHHtNG4YXGJ0yqR--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040726095910.GD61141>