xfs
[Top] [All Lists]

Problem recovering XFS filesystem

To: xfs@xxxxxxxxxxx
Subject: Problem recovering XFS filesystem
From: Aaron Williams <aaron.w2@xxxxxxxxx>
Date: Thu, 26 Apr 2012 13:00:06 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=GEcTyLoNcdVAswfbEMYVk3DSoiphZLHkQiRUyJDtmVM=; b=MoelLtOVzSTbvKZVov0MDPA1C8+qlpuJmEplaz3cK7otGUosjr5IEiH9S7hvNj9yt9 oiO8ntzASTCqWSbk+7kvEgI28SOE7F9NByUIhk+ZV8ZVVpx+TxQJzJyxTiWXQJo1CNOU DvKxjqM6AAn4nKWCUVm26ttjC2D+jwJ/ky+EHbTB6OlbJrJ7YyyHqj83J8oJSa2ApDmD BEgU8pRrA051o+/B3E3VtR8snp2FLjbfbC7x/D7Z/NBlN0JS0+iM1jqQd2B7JUZNoEKe 9cbj71NZBZVq72GtAYRPEcL/KJuqqmJMT5ooOiPXNiOamcX7EGs4SxSK6c45ctGQXR0m Yv1A==
Hi,

I had an issue with my RAID system and am having problems trying to recover my XFS filesystem.

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.

I currently have extracted all of the files from the recovered version and now am trying to recover again without blowing away the log.

When I attempt to mount the filesystem I get the error: mount: Structure needs cleaning

The kernel reports:
Apr 26 12:53:41 flash kernel: [388563.491665] XFS (sdd1): Mounting Filesystem
Apr 26 12:53:41 flash kernel: [388563.503667] XFS (sdd1): Starting recovery (logdev: internal)
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
Apr 26 12:53:41 flash kernel: [388563.509540]
Apr 26 12:53:41 flash kernel: [388563.509542] Pid: 29146, comm: mount Tainted: P            3.1.10-22-default #1
Apr 26 12:53:41 flash kernel: [388563.509544] Call Trace:
Apr 26 12:53:41 flash kernel: [388563.509554]  [<ffffffff810042fa>] dump_trace+0x9a/0x270
Apr 26 12:53:41 flash kernel: [388563.509558]  [<ffffffff815266c3>] dump_stack+0x69/0x6f
Apr 26 12:53:41 flash kernel: [388563.509589]  [<ffffffffa005b304>] xfs_free_ag_extent+0x564/0x7c0 [xfs]
Apr 26 12:53:41 flash kernel: [388563.509629]  [<ffffffffa005da7c>] xfs_free_extent+0xec/0x130 [xfs]
Apr 26 12:53:41 flash kernel: [388563.509670]  [<ffffffffa008b900>] xlog_recover_process_efi+0x160/0x1b0 [xfs]
Apr 26 12:53:41 flash kernel: [388563.509733]  [<ffffffffa008cbf1>] xlog_recover_process_efis.isra.8+0x61/0xb0 [xfs]
Apr 26 12:53:41 flash kernel: [388563.509795]  [<ffffffffa00907f0>] xlog_recover_finish+0x20/0xb0 [xfs]
Apr 26 12:53:41 flash kernel: [388563.509859]  [<ffffffffa009337e>] xfs_mountfs+0x43e/0x6b0 [xfs]
Apr 26 12:53:41 flash kernel: [388563.509923]  [<ffffffffa00536cd>] xfs_fs_fill_super+0x1bd/0x270 [xfs]
Apr 26 12:53:41 flash kernel: [388563.509948]  [<ffffffff8114e6a4>] mount_bdev+0x1b4/0x1f0
Apr 26 12:53:41 flash kernel: [388563.509951]  [<ffffffff8114ef55>] mount_fs+0x45/0x1d0
Apr 26 12:53:41 flash kernel: [388563.509955]  [<ffffffff81167656>] vfs_kern_mount+0x66/0xd0
Apr 26 12:53:41 flash kernel: [388563.509958]  [<ffffffff81168a33>] do_kern_mount+0x53/0x120
Apr 26 12:53:41 flash kernel: [388563.509961]  [<ffffffff8116a4e5>] do_mount+0x1a5/0x260
Apr 26 12:53:41 flash kernel: [388563.509964]  [<ffffffff8116a98a>] sys_mount+0x9a/0xf0
Apr 26 12:53:41 flash kernel: [388563.509968]  [<ffffffff81546712>] system_call_fastpath+0x16/0x1b
Apr 26 12:53:41 flash kernel: [388563.509972]  [<00007f8e22dd397a>] 0x7f8e22dd3979
Apr 26 12:53:41 flash kernel: [388563.509977] XFS (sdd1): Failed to recover EFIs
Apr 26 12:53:41 flash kernel: [388563.509979] XFS (sdd1): log mount finish failed

If I run xfs_repair I get the following:

./xfs_repair -v /dev/sdd1
Phase 1 - find and verify superblock...
        - block cache size set to 2282936 entries
Phase 2 - using internal log
        - zero log...
zero_log: head block 6784 tail block 6528
ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed.  Mount the filesystem to replay the log, and unmount it before
re-running xfs_repair.  If you are unable to mount the filesystem, then use
the -L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.

I am running the Linux kernel 3.1.10-22 (openSUSE) and xfsprogs 3.1.8.

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.

-Aaron
<Prev in Thread] Current Thread [Next in Thread>