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]  [&lt;ffffffff810042fa&gt;] dump_trace+0x9a/0x270<br>Apr 26 12:53:41 flash kernel: [388563.509558]  [&lt;ffffffff815266c3&gt;] dump_stack+0x69/0x6f<br>Apr 26 12:53:41 flash kernel: [388563.509589]  [&lt;ffffffffa005b304&gt;] xfs_free_ag_extent+0x564/0x7c0 [xfs]<br>
Apr 26 12:53:41 flash kernel: [388563.509629]  [&lt;ffffffffa005da7c&gt;] xfs_free_extent+0xec/0x130 [xfs]<br>Apr 26 12:53:41 flash kernel: [388563.509670]  [&lt;ffffffffa008b900&gt;] xlog_recover_process_efi+0x160/0x1b0 [xfs]<br>
Apr 26 12:53:41 flash kernel: [388563.509733]  [&lt;ffffffffa008cbf1&gt;] xlog_recover_process_efis.isra.8+0x61/0xb0 [xfs]<br>Apr 26 12:53:41 flash kernel: [388563.509795]  [&lt;ffffffffa00907f0&gt;] xlog_recover_finish+0x20/0xb0 [xfs]<br>
Apr 26 12:53:41 flash kernel: [388563.509859]  [&lt;ffffffffa009337e&gt;] xfs_mountfs+0x43e/0x6b0 [xfs]<br>Apr 26 12:53:41 flash kernel: [388563.509923]  [&lt;ffffffffa00536cd&gt;] xfs_fs_fill_super+0x1bd/0x270 [xfs]<br>Apr 26 12:53:41 flash kernel: [388563.509948]  [&lt;ffffffff8114e6a4&gt;] mount_bdev+0x1b4/0x1f0<br>
Apr 26 12:53:41 flash kernel: [388563.509951]  [&lt;ffffffff8114ef55&gt;] mount_fs+0x45/0x1d0<br>Apr 26 12:53:41 flash kernel: [388563.509955]  [&lt;ffffffff81167656&gt;] vfs_kern_mount+0x66/0xd0<br>Apr 26 12:53:41 flash kernel: [388563.509958]  [&lt;ffffffff81168a33&gt;] do_kern_mount+0x53/0x120<br>
Apr 26 12:53:41 flash kernel: [388563.509961]  [&lt;ffffffff8116a4e5&gt;] do_mount+0x1a5/0x260<br>Apr 26 12:53:41 flash kernel: [388563.509964]  [&lt;ffffffff8116a98a&gt;] sys_mount+0x9a/0xf0<br>Apr 26 12:53:41 flash kernel: [388563.509968]  [&lt;ffffffff81546712&gt;] system_call_fastpath+0x16/0x1b<br>
Apr 26 12:53:41 flash kernel: [388563.509972]  [&lt;00007f8e22dd397a&gt;] 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>