From owner-freebsd-questions@FreeBSD.ORG Mon Jul 26 10:03:34 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 6A77316A4CE for ; Mon, 26 Jul 2004 10:03:34 +0000 (GMT) Received: from lorna.circlesquared.com (host217-45-219-85.in-addr.btopenworld.com [217.45.219.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87D0243D5F for ; Mon, 26 Jul 2004 10:03:29 +0000 (GMT) (envelope-from peter@circlesquared.com) Received: from circlesquared.com (localhost.circlesquared.com [127.0.0.1]) i6QA3D3f024339; Mon, 26 Jul 2004 11:03:15 +0100 (BST) (envelope-from peter@circlesquared.com) Message-ID: <4104D6E0.3020202@circlesquared.com> Date: Mon, 26 Jul 2004 11:03:12 +0100 From: Peter Risdon User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040611 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Matthew Seaman References: <4104CAF2.1030801@circlesquared.com> <20040726095910.GD61141@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <20040726095910.GD61141@happy-idiot-talk.infracaninophile.co.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 10:03:34 -0000 Matthew Seaman wrote: > 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 > belong. Great - just what I needed to know. Thanks very much. Peter. > > Cheers, > > Matthew >