Date: Mon, 26 Jul 2004 11:03:12 +0100 From: Peter Risdon <peter@circlesquared.com> To: Matthew Seaman <m.seaman@infracaninophile.co.uk> Cc: FreeBSD Question List <freebsd-questions@freebsd.org> Subject: Re: lost and found Message-ID: <4104D6E0.3020202@circlesquared.com> In-Reply-To: <20040726095910.GD61141@happy-idiot-talk.infracaninophile.co.uk> References: <4104CAF2.1030801@circlesquared.com> <20040726095910.GD61141@happy-idiot-talk.infracaninophile.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
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 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4104D6E0.3020202>