Hi,<br><br>I had an issue with my RAID system and am having problems trying to recover my XFS filesystem.<br><br>First of all, I made a copy of it to another device (using dd) and I was able to recover that image with some data loss by blowing away the log. I would like to try and recover it properly, however.<br>
<br>I currently have extracted all of the files from the recovered version and now am trying to recover again without blowing away the log.<br><br>When I attempt to mount the filesystem I get the error: mount: Structure needs cleaning<br>
<br>The kernel reports:<br>Apr 26 12:53:41 flash kernel: [388563.491665] XFS (sdd1): Mounting Filesystem<br>Apr 26 12:53:41 flash kernel: [388563.503667] XFS (sdd1): Starting recovery (logdev: internal)<br>Apr 26 12:53:41 flash kernel: [388563.509539] XFS: Internal error XFS_WANT_CORRUPTED_GOTO at line 1530 of file /home/abuild/rpmbuild/BUILD/kernel-default-3.1.10/linux-3.1/fs/xfs/xfs_alloc.c. Caller 0xffffffffa005da7c<br>
Apr 26 12:53:41 flash kernel: [388563.509540] <br>Apr 26 12:53:41 flash kernel: [388563.509542] Pid: 29146, comm: mount Tainted: P 3.1.10-22-default #1<br>Apr 26 12:53:41 flash kernel: [388563.509544] Call Trace:<br>
Apr 26 12:53:41 flash kernel: [388563.509554] [<ffffffff810042fa>] dump_trace+0x9a/0x270<br>Apr 26 12:53:41 flash kernel: [388563.509558] [<ffffffff815266c3>] dump_stack+0x69/0x6f<br>Apr 26 12:53:41 flash kernel: [388563.509589] [<ffffffffa005b304>] xfs_free_ag_extent+0x564/0x7c0 [xfs]<br>
Apr 26 12:53:41 flash kernel: [388563.509629] [<ffffffffa005da7c>] xfs_free_extent+0xec/0x130 [xfs]<br>Apr 26 12:53:41 flash kernel: [388563.509670] [<ffffffffa008b900>] xlog_recover_process_efi+0x160/0x1b0 [xfs]<br>
Apr 26 12:53:41 flash kernel: [388563.509733] [<ffffffffa008cbf1>] xlog_recover_process_efis.isra.8+0x61/0xb0 [xfs]<br>Apr 26 12:53:41 flash kernel: [388563.509795] [<ffffffffa00907f0>] xlog_recover_finish+0x20/0xb0 [xfs]<br>
Apr 26 12:53:41 flash kernel: [388563.509859] [<ffffffffa009337e>] xfs_mountfs+0x43e/0x6b0 [xfs]<br>Apr 26 12:53:41 flash kernel: [388563.509923] [<ffffffffa00536cd>] xfs_fs_fill_super+0x1bd/0x270 [xfs]<br>Apr 26 12:53:41 flash kernel: [388563.509948] [<ffffffff8114e6a4>] mount_bdev+0x1b4/0x1f0<br>
Apr 26 12:53:41 flash kernel: [388563.509951] [<ffffffff8114ef55>] mount_fs+0x45/0x1d0<br>Apr 26 12:53:41 flash kernel: [388563.509955] [<ffffffff81167656>] vfs_kern_mount+0x66/0xd0<br>Apr 26 12:53:41 flash kernel: [388563.509958] [<ffffffff81168a33>] do_kern_mount+0x53/0x120<br>
Apr 26 12:53:41 flash kernel: [388563.509961] [<ffffffff8116a4e5>] do_mount+0x1a5/0x260<br>Apr 26 12:53:41 flash kernel: [388563.509964] [<ffffffff8116a98a>] sys_mount+0x9a/0xf0<br>Apr 26 12:53:41 flash kernel: [388563.509968] [<ffffffff81546712>] system_call_fastpath+0x16/0x1b<br>
Apr 26 12:53:41 flash kernel: [388563.509972] [<00007f8e22dd397a>] 0x7f8e22dd3979<br>Apr 26 12:53:41 flash kernel: [388563.509977] XFS (sdd1): Failed to recover EFIs<br>Apr 26 12:53:41 flash kernel: [388563.509979] XFS (sdd1): log mount finish failed<br>
<br>If I run xfs_repair I get the following:<br><br>./xfs_repair -v /dev/sdd1 <br>Phase 1 - find and verify superblock...<br> - block cache size set to 2282936 entries<br>Phase 2 - using internal log<br> - zero log...<br>
zero_log: head block 6784 tail block 6528<br>ERROR: The filesystem has valuable metadata changes in a log which needs to<br>be replayed. Mount the filesystem to replay the log, and unmount it before<br>re-running xfs_repair. If you are unable to mount the filesystem, then use<br>
the -L option to destroy the log and attempt a repair.<br>Note that destroying the log may cause corruption -- please attempt a mount<br>of the filesystem before doing this.<br><br>I am running the Linux kernel 3.1.10-22 (openSUSE) and xfsprogs 3.1.8.<br>
<br>When I did the repair I had to blow away the log and I had to use xfs_db to fix some cases where blocks were claimed by multiple files. There was a brief period where the corruption was occurring and the files were generally things that are not important. I used xfs_db to identify the files and deleted the files. After several passes using xfs_repair, xfs_db and deleting the files I was able to recover the filesystem.<br>
<br>-Aaron<br>