Re: XFS filesystem recovery from secondary superblocks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So an update! I did another search of /dev/md0 for superblock locations (find all instances of XFSB, find all instances of XAGF that occur 512 bytes after XFSB) and used those as start points to copy the data to /dev/md1. I took the block count from the superblock, (right at 1TB per AG) and copied that block of data to the array, properly aligned.

This seems to have worked rather well! xfs_db now has much fewer errors, and can read SBs and AGFs, and xfs_repair can do something with it.

From here I did two things. I ran xfs_repair -L to purge the log, as I wasn't able to replay it (and some data loss is acceptable), and then I mounted the filesystem. This worked! Though it was now showing 22GB used, all in lost and found. Oops.

I noticed ag 0 reports a lot more free space than any of the others, so I tried copying sb 1 over sb 0 to get things to use the more intact blocks. No such luck yet, but I'm definitely getting some data. When I tried using sb 12, df shows 11T used (about right) but the file list is still very sparse.

So moving onward! Any recommendations from this point? I take it this is where I'd run xfs_irecover?

Aaron



On Tue, Nov 13, 2012 at 7:26 PM, Aaron Goulding <aarongldng@xxxxxxxxx> wrote:
Hmm.. Okay new plan. Running XFSB  and XAGF scans on /dev/md0 instead of /dev/md1, and I'll use that to find the alignment the superblocks are expecting, and see if I have an offset wrong somewhere when I ran the multi-part DD onto /dev/md1. Barring this, I'll resort to xfs_irecover. I think you've given me a lot of information to go on though, so thank you greatly.

-Aaron



On Sun, Nov 11, 2012 at 2:39 PM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
On Sat, Nov 10, 2012 at 11:08:23PM -0800, Aaron Goulding wrote:
> As I guessed, xfs_repair didn't work. xfs_db does now load with warnings,
> but I fear I don't know enough about that to properly use that tool. I've
> done a search for xfs_irepair but I'm finding very little from that. Where
> is that tool located? I'm understanding a full restore is very unlikely at
> this point, but if I can get anything, I'll consider this project a success
> and a learning experience. :)

xfs_irecover:

http://oss.sgi.com/archives/xfs/2008-12/msg01782.html

current location:

http://inai.de/projects/hxtools/

You might need to hack it to recovery full files (ISTR is ignore
files larger than a certain size), but tools lke this are your best
bet now.

Cheers,

Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx


_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs

[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux