Lost+Found, ext3 and data loss

Jonas Norlander jonorland at gmail.com
Sun Dec 13 18:01:44 UTC 2009


2009/12/13 Laurent Humblet <mailinglists at invisibleray.com>:
> Hi,

> happened was that the Data/Backup partition I had got a 'lost+found'
> folder with all #?????? files (??? being replaced with various
> alphanumerical chars).

The numbers are the inode number of files which are allocated but not
referenced (not attached to any directory).

> After reading a bit about it, I found that it's a comon practice for
> fsck to move files around in lost+found when something is broken in the HD.
>
> Here are my questions:
> - is there any chance for me to recover the HD as it was _before_ fsck?

You wouldn't do that even if it was possible as your filesystem was
inconsistent for some reason (Failing harddrive or unclean shutdown?).

> - is there any chance for me to recover parts of the filenames
> automatically?

None that I know of.

> - what should I be doing now to recover my data with the greatest of ease?

You can use the file command on the files in /lost+found to see what
kind of file it is and try to open it with a program that handles that
kind of files and hope its not corrupted.

> - why is fsck moving files around into lost+found on such a case and by
> doing so, writing on a hard drive that could be corrupted?

I don't think fsck is "moving" the files.

> - in the future, if such a solution happen, what are the best steps for
> me to take to avoid having fsck moving all the files around and by doing
> so, risking to loose the entire filesystem?
>

I'm sure the people writing filesystems and its tools know better then
we what is the right way to do so I wouldn't try to change anything.

Some links:
http://www.oreilly.com/catalog/morelnxsvrhks/chapter/hack96.pdf
http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/lostfound.html
http://www.itworld.com/rescue-lost-found-files-nlsunix-080508?page=0%2C0

/ Jonas




More information about the kubuntu-users mailing list