On Fri, Apr 20, 2012 at 10:18:27AM -0700, Nick Hollingsworth wrote:
> On 20/04/2012 01:21, Dave Chinner wrote:
> >On Thu, Apr 19, 2012 at 10:30:07PM -0700, Nick Hollingsworth wrote:
> >>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.
> >>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....
> 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
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....