Skip to contentSkip to conversation

XFS restored to lost and found

DISCUSSION Nick Hollingsworth 2 participants 3 messages Apr 20, 2012 – Apr 21, 2012 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi all,

So I've managed to corrupt an XFS files system running on software RAID. How exactly I'm not sure....it may have been when using CentOS rescue when trying to get the system to boot.

Using xfs_repair with various options I've managed to get the FS to a state where it'll mount but there are no directories only inode numbers in the lost and found directory.

Is there any way to remap these back to directories? Any ideas how I may have gotten into this mess?

Thanks.

Nick

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw
Quoted 9 lines · Nick Hollingsworth

Hi all,

So I've managed to corrupt an XFS files system running on software RAID. How exactly I'm not sure....it may have been when using CentOS rescue when trying to get the system to boot.

Using xfs_repair with various options I've managed to get the FS to a state where it'll mount but there are no directories only inode numbers in the lost and found directory.

Sounds like the root directory got corrupted/overwritten by something and so the entire directory heirarchy got moved into lost+found. The inode numbers are used because the names are held in the directory blocks and they couldn't be found.

Quoted 1 line

Is there any way to remap these back to directories?

You'll need to examine the contents of every directory and file in lost+found to work out where they cames from. if you are lucky, it'll only be the root directory entries that are in lost_found and the rest of the directories heirarchy will still be intact....

Quoted 1 line

Any ideas how I may have gotten into this mess?

No. It's too late to try an diagnose now, too.

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 24 lines · Nick Hollingsworth
Quoted 15 lines · Dave Chinner
Quoted 9 lines · Nick Hollingsworth

Hi all,

So I've managed to corrupt an XFS files system running on software RAID. How exactly I'm not sure....it may have been when using CentOS rescue when trying to get the system to boot.

Using xfs_repair with various options I've managed to get the FS to a state where it'll mount but there are no directories only inode numbers in the lost and found directory.

Sounds like the root directory got corrupted/overwritten by something and so the entire directory heirarchy got moved into lost+found. The inode numbers are used because the names are held in the directory blocks and they couldn't be found.

Quoted 5 lines
Quoted 1 line

Is there any way to remap these back to directories?

You'll need to examine the contents of every directory and file in lost+found to work out where they cames from. if you are lucky, it'll only be the root directory entries that are in lost_found and the rest of the directories heirarchy will still be intact....

Quoted 5 lines

I examined a few of the directories and could find some intact sub directories & files. Is this now a matter of manually recreating the original directories and moving lost+found pieces back into it as best I can or is there a more sophisticated way to put it back together?

Yes, a manual process, unfortunately. There are recovery tools out there that can help identify types of files (e.g. images, videos, etc) and reconstruct file names based on information within the specific format. Google will help you find them....

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs