Lost and Found - what is it for?
I'm a bit lost about the Lost and Found directory.
(BTW - new to Linux and Sarge.)
I have tried to find out what it's for and what needs to be done with it
- but without much success. Perhaps some kind soul could give a simple
explanation - or point me to one?
--
Chris
Re: Lost and Found - what is it for?
Chris <nospam@[127.0.0.1]> wrote:[color=blue]
> I'm a bit lost about the Lost and Found directory.
> I have tried to find out what it's for and what needs to be done with it
> - but without much success. Perhaps some kind soul could give a simple
> explanation - or point me to one?[/color]
Many (but not all) filesystem types use it for filesystem recovery.
Most notably when checking the filesystem, if they find stuff which
still exists (e.g. non-zero length file with non-zero link count) but
doesn't have a proper place (exists in no directories), since the
recovery may know the file structure and it's associated data, but
not where it should be located, or what link name(s) it had, the
typical recovery process (fsck) would place it in the lost+found
directory at the root (topmost level) of the particular filesystem in
question. For the applicable types of filesystems, the lost+found
directory should exist, its permissions should not be mucked with
(that could create security issues), and it should not be removed (if
it is removed, care should be taken that it is created to be of
appropriate size). The reason lost+found must exist and be of
appropriate size when doing such recoveries, is that the recovery
process may need a directory to link found stuff into - and if
there's a fair amount of stuff found, it will need enough existing
empty slots in the directory to link things there without growing the
directory (as growing or creating the directory while trying to do a
recovery could potentially destroy data one needs to recover - or at
best would greatly complicate the recovery process - and there's also
risk that the filesystem could be or become full, and again it would
then be impossible or infeasible to reasonably conveniently recover
the data/files).
Other suggestions. Start here:
[url]http://www.catb.org/~esr/faqs/smart-questions.html[/url]
do the basic STFW exercises if you haven't already, e.g.:
[url]http://www.google.com/search?hl=en&q=%22lost%2Bfound%22+filesystem&btnG=Google+Search[/url]
and read at least some of the relevant stuff (if you haven't already)
and ask more specifical questions - e.g. asking what you still don't
understand or where you're getting confused by what (potentially
confusing, conflicting, or incomplete) stuff you've read.
Also, folks aren't going to reply to your e-mail if it's bogus. In
many cases folks might bother to reply via e-mail if they think their
reply might be useful or informative to you, but may not be
sufficiently noteworthy to bother to post on USENET. If your e-mail
is bogus (or bounces) in such cases, you might miss out on useful
replies/information.
Re: Lost and Found - what is it for?
On Tue, 08 Nov 2005 06:39:48 +0000, Chris wrote:
[color=blue]
> I'm a bit lost about the Lost and Found directory.
> (BTW - new to Linux and Sarge.)
>
> I have tried to find out what it's for and what needs to be done with it
> - but without much success. Perhaps some kind soul could give a simple
> explanation - or point me to one?[/color]
You don't have to do anything with it. You can pretty safely ignore it.
The file system will, from time to time, throw lost files in there -
doesn't happen often.