SUMMARY: Recovering files from lost+found directory

From: Bob Barkhymer <barkhymr_at_nosc.mil>
Date: Wed Nov 10 2004 - 07:37:47 EST
Original Problem:

We have a E480 Server attached to a 3310 Array with Solaris 8 installed.
Recently when moving data there was an I/O error and the system hung. Upon
reboot we got the message that the RAID dir was in bad state and to run
fsck. Well, to make a long story short after doing this a few times and
still not coming up clean I ran a format > analyze > read which seemed to
fix the errors and now comes up clean. Now when I cd into the RAID it looks
like we have managed to disconnect all my files and folders from their
inodes. . The result is now one lost+found directory with a bunch of files
and folders preceded by hash marks...
Is there any way to recover the data structures [files and folders] back to
how they should be? Or at least move them back?

Thanks to the following who replied.

Terry Moore
The Hatter
Dan Lowe
Russell Page

Solution:

In this case, the easiest thing to do was to newfs the RAID and reload the
application. Normally, you can just move the files out of lost+found and
relink and or place them where they were. But due to the large amount of
files this would have been too time consuming. Although as always your best
bet is to have a good backup.

Russell's post describes it well:

Your files haven't been disconnected from their inodes - files are inodes.
They have been disconnected from their directory entries. To recover your
files you need to identify their contents and work out what their names
were. You then use mv(1) to rename them to their original names.
ls -l will give you a lot of useful information about the files (when last
modified, owner, group etc).
If you are lucky directories may still have all of their contents intact, so

work down through the tree under lost+found, doing the directories first.
Use the file(1) to try to determine what sort of data is stored in each
file. Anything that comes up as "ascii", "text," "script" etc can be viewed
with view(1) or more(1) to see its contents.
strings(1) will find and print ascii text embedded in binary files.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Wed Nov 10 07:40:48 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:39 EST