From owner-freebsd-questions@FreeBSD.ORG Mon Jul 26 09:59:17 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0343C16A4CE for ; Mon, 26 Jul 2004 09:59:17 +0000 (GMT) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3865D43D4C for ; Mon, 26 Jul 2004 09:59:16 +0000 (GMT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) i6Q9xADV062130 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 26 Jul 2004 10:59:10 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i6Q9xAKt062129; Mon, 26 Jul 2004 10:59:10 +0100 (BST) (envelope-from matthew) Date: Mon, 26 Jul 2004 10:59:10 +0100 From: Matthew Seaman To: Peter Risdon Message-ID: <20040726095910.GD61141@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Peter Risdon , FreeBSD Question List References: <4104CAF2.1030801@circlesquared.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fOHHtNG4YXGJ0yqR" Content-Disposition: inline In-Reply-To: <4104CAF2.1030801@circlesquared.com> User-Agent: Mutt/1.5.6i X-Greylist: Message not sent from an IPv4 address, not delayed by milter-greylist-1.5.3 (smtp.infracaninophile.co.uk [0.0.0.0]); Mon, 26 Jul 2004 10:59:10 +0100 (BST) X-Virus-Scanned: clamd / ClamAV version devel-20040705, clamav-milter version 0.74a on smtp.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk cc: FreeBSD Question List Subject: Re: lost and found X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2004 09:59:17 -0000 --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--