View previous topic :: View next topic |
Author |
Message |
Narr n00b


Joined: 05 Jun 2003 Posts: 22 Location: New Zealand
|
Posted: Sun Mar 21, 2004 12:33 am Post subject: Recovering files from XFS lost+found |
|
|
I couldn't find anything in the forums related to XFS
Does anyone know how to recover files from XFS lost+found.
I had trouble deleting a file from an xfs filesystem and also whenIi renamed a file in the same dir it just disapaired. All other dir and files at the same level seemed to be fine
I ran xfs_check and then xfs_repair after that a dir (one that is parent to the dir that had the file in) has disapaired and there is a lot of stuff in lost+found
Is there anyway to recover the files.
Chears Narr _________________ I guess you could call the belief in sharing of knowledge a philosophy, but I just think it's a fact, It's what differentiates science from alchemy or witchcraft. Anybody who doesn't believe in it is just wearing some serious blinders.
Linus Torvalds |
|
Back to top |
|
 |
dvc5 Guru


Joined: 06 Dec 2003 Posts: 433 Location: Sunnyvale, California
|
Posted: Sun Mar 21, 2004 1:07 am Post subject: |
|
|
I had a serious reiserfs crash about 6 months ago and every folder in my root partition was dumped in /lost+found/ by reiserfsck. I believe xfs does the same when you try to recover, and it will organize it by journal tag #. Really all you can do is look in each numbered folder and try to recognize which folder from "/" that it represents.
Your home and root folders should be easy, /etc will have a bunch of .conf files, etc... It took me the better part of a day to finally get everything copied back over, but afterwards the system was fully functional. I did do a "emerge -e world" just to be sure that no important files were left out. _________________ #define NULL rand() /*heh heh heh */
Green Is Good |
|
Back to top |
|
 |
Narr n00b


Joined: 05 Jun 2003 Posts: 22 Location: New Zealand
|
Posted: Sun Mar 21, 2004 1:26 am Post subject: |
|
|
Thanks for the reply lozdvc5.
This will work, although longwinded. If there is an easer way I would love to know.
Cheers Narr _________________ I guess you could call the belief in sharing of knowledge a philosophy, but I just think it's a fact, It's what differentiates science from alchemy or witchcraft. Anybody who doesn't believe in it is just wearing some serious blinders.
Linus Torvalds |
|
Back to top |
|
 |
dvc5 Guru


Joined: 06 Dec 2003 Posts: 433 Location: Sunnyvale, California
|
Posted: Sun Mar 21, 2004 1:40 am Post subject: |
|
|
I'm sure you could write a script or search for one on the net that might automate this process, but it basically just amounts to copying files. And, since each hard drive is "unique" the folder names in /lost+found/ will never be the same on two machines. Maybe the naming scheme that the xfs recovery uses has some specific algorithm that you could utilize, however we're only talking about 10-20 folders to copy anyway.
Update: Just a side note, make sure you use the "cp -a source dest" format for copying. The "-a" (equivilent to -dpPR) flag will handle all permission-preservation, recursive copying, and other attributes so that your root partition will be useful after copying. _________________ #define NULL rand() /*heh heh heh */
Green Is Good |
|
Back to top |
|
 |
|