Skip to contentSkip to conversation

Lost+found

DISCUSSION Jeffrey Sandel 7 participants 7 messages Apr 8, 2008 – Apr 11, 2008

lore
Share & tools
lore
#0 lore raw

Recently I ran xfs_repair due to a firmware upgrade on an unmounted disk. The repair recovered the data but moved it to the lost+found directory.

How do I recover file names and ownership?

Thanks!

Jeffrey Sandel

#1 lore raw
Quoted 5 lines · Jeffrey Sandel

Recently I ran xfs_repair due to a firmware upgrade on an unmounted disk. The repair recovered the data but moved it to the lost+found directory.

How do I recover file names and ownership?

The only real options you have AFAIK is the file command to try and identify what type of file it is and just manually inspecting the files.

Then, you might be able to derive its filename and where it came from.

Regards,
Barry.

#2 lore raw
Quoted 8 lines · Barry Naujok
Quoted 5 lines · Jeffrey Sandel

Recently I ran xfs_repair due to a firmware upgrade on an unmounted disk. The repair recovered the data but moved it to the lost+found directory.

How do I recover file names and ownership?

Quoted 8 lines

The only real options you have AFAIK is the file command to try and identify what type of file it is and just manually inspecting the files.

Then, you might be able to derive its filename and where it came from.

Regards,
Barry.

Is there any chance this process could ever be improved so that the files are restored back to their original locations or there is something that keeps track of where they were located?

Justin.

#3 lore raw
Quoted 16 lines · Justin Piszcz
Quoted 13 lines · Barry Naujok
Quoted 5 lines · Jeffrey Sandel

Recently I ran xfs_repair due to a firmware upgrade on an unmounted disk. The repair recovered the data but moved it to the lost+found directory.

How do I recover file names and ownership?

The only real options you have AFAIK is the file command to try and identify what type of file it is and just manually inspecting the files.

Then, you might be able to derive its filename and where it came from.

Quoted 7 lines
Quoted 3 lines

Regards,
Barry.

Is there any chance this process could ever be improved so that the files are restored back to their original locations or there is something that keeps track of where they were located?

The whole reason they're in lost+found is because they are "orphaned" - allocated & in use but not referenced by any directory... so the best xfs_repair can do is rename to lost+found with the inode number.

Crosses my mind that one could probably write a generic tool which could work with a package manager db to check file md5sums in /lost+found, if the files happen to be system files installed via a package.... but if they're files from your homedir or whatnot, it's tougher.

-Eric

#4 lore raw
Quoted 3 lines · Eric Sandeen

The whole reason they're in lost+found is because they are "orphaned" - allocated & in use but not referenced by any directory... so the best xfs_repair can do is rename to lost+found with the inode number.

At least until we get parent pointers. Niv, any updates?

#5 lore raw
Quoted 6 lines · Christoph Hellwig
Quoted 3 lines · Eric Sandeen

The whole reason they're in lost+found is because they are "orphaned" - allocated & in use but not referenced by any directory... so the best xfs_repair can do is rename to lost+found with the inode number.

At least until we get parent pointers. Niv, any updates?

I was lost in DMAPI land for a while, I'll resume work on PP next week, patches up for review soonish after I fix some issues.

Cheers,

Signature · 1 line
Niv Sardi
#6 lore raw
In reply to Eric Sandeen

Le Wed, 09 Apr 2008 08:11:13 -0500
Eric Sandeen <[email protected]> écrivait:

Quoted 4 lines

Crosses my mind that one could probably write a generic tool which could work with a package manager db to check file md5sums in /lost+found, if the files happen to be system files installed via a package....

Yup, I've done something similar when I used a PC with a bugged via chipset which regularly broke apart filesystems under heavy load... I used a tool named afick to index the whole disks (it stores md5 of everything in a small db) and with some tinkering I was able to restore everything from lost+found each time some filesystem went belly up (once a month...)

Signature · 3 lines
----------------------------------------
Emmanuel Florac     |   Intellique
----------------------------------------