All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Andrew Ryder <tireman@shaw.ca>
Cc: xfs@oss.sgi.com
Subject: Re: xfs_repair fails after trying to format log cycle?
Date: Mon, 28 Mar 2016 04:55:43 -0400	[thread overview]
Message-ID: <20160328085541.GA27040@bfoster.bfoster> (raw)
In-Reply-To: <56F6DE67.60403@shaw.ca>

On Sat, Mar 26, 2016 at 03:09:27PM -0400, Andrew Ryder wrote:
> Hello,
> 
> I have an mdadm array with a xfs v5 filesystem on it and its begun to give
> me issues when trying to mount it as well as complete xfs_repair. Not sure
> if anyone might be able to shed some light on what is going on or how to
> correct the issue?
> 
> When I try and mount the fs, it complains with:
> 
> [  388.479847] XFS (md2): Mounting V5 Filesystem
> [  388.494686] XFS (md2): metadata I/O error: block 0x15d6d39c0
> ("xlog_bread_noalign") error 5 numblks 8192
> [  388.495013] XFS (md2): failed to find log head
> [  388.495018] XFS (md2): log mount/recovery failed: error -5
> [  388.495090] XFS (md2): log mount failed
> 

So a read I/O error from the kernel...

> 
> This is where its not making any sense for me, If I try and run "xfs_repair
> /dev/md2" it fails with:
> 
> Phase 1 - find and verify superblock...
>         - reporting progress in intervals of 15 minutes
> Phase 2 - using internal log
>         - zero log...
> xfs_repair: read failed: Input/output error
> failed to find log head
> zero_log: cannot find log head/tail (xlog_find_tail=-5)
> 
> fatal error -- ERROR: The log head and/or tail cannot be discovered. Attempt
> to mount the
> filesystem to replay the log or use the -L option to destroy the log and
> attempt a repair.
> 

... similar read error from xfsprogs...

> 
> But if I run "xfs_repair -L /dev/md2" which gives:
> 
> Phase 1 - find and verify superblock...
>         - reporting progress in intervals of 15 minutes
> Phase 2 - using internal log
>         - zero log...
> xfs_repair: read failed: Input/output error
> failed to find log head
> zero_log: cannot find log head/tail (xlog_find_tail=-5)
> xfs_repair: libxfs_device_zero write failed: Input/output error
> 

... and it looks like it fails to write as well when trying to zero the
log...

> then try and re-run "xfs_repair /dev/md2" it starts traversing the
> filesystem all the way to "Phase 7" then errors with:
> 
> Phase 7 - verify and correct link counts...
>         - 14:36:55: verify and correct link counts - 33 of 33 allocation
> groups done
> Maximum metadata LSN (64:2230592) is ahead of log (0:0).
> Format log to cycle 67.
> xfs_repair: libxfs_device_zero write failed: Input/output error
> 
> 
> Yet at this point I can now mount the filesystem..
> 

... and this is effectively a repeat of the write error as we try to
format the log with a correct LSN based on the metadata LSN tracked by
the repair process. Your kernel is old enough that runtime probably
won't complain either way (note that 3.19 might be considered a fairly
early kernel for using CRC support). Perhaps the first write attempt
zeroed enough of the log before it failed that log recovery wasn't
required, and thus these problematic I/Os were avoided.

What's the history of this fs? Has it been working for some time, just
recently formatted? What lead to the need for log recovery? What's the
mdadm --detail info, member device size, total array size, xfs_info of
the filesystem, etc..?

Does xfs_repair run clean at this point? If so, does 'xfs_repair -L'
still reproduce the write error (note that I'm assuming you have a clean
log such that this command will not cause data loss). If so, an strace
of the repair process might be interesting...

Brian

> 
> Checking the drives with smartctl shows no errors nor does 'dmesg' show any
> hardware i/o or controller related errors...
> 
> I've tried scrubbing the array and no bad sectors are found either..
> 
> I'm running kernel 3.19.8 with xfsprogs 4.5.
> 
> Thanks,
> Andrew
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

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

  reply	other threads:[~2016-03-28  8:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-26 19:09 xfs_repair fails after trying to format log cycle? Andrew Ryder
2016-03-28  8:55 ` Brian Foster [this message]
2016-04-12  5:53   ` Andrew Ryder
2016-04-12 14:05     ` Brian Foster
2016-04-12 20:16       ` Andrew Ryder
2016-04-13  3:02         ` Andrew Ryder
2016-04-13  4:51           ` Dave Chinner
2016-06-04  2:28             ` Andrew Ryder
2016-06-06 15:33               ` Emmanuel Florac
2016-06-06 19:19                 ` Andrew Ryder
2016-06-06 19:37                   ` Andrew Ryder
2016-04-13 12:12         ` Brian Foster
2016-04-13 22:34           ` Andrew Ryder
2016-04-14  4:32             ` Andrew Ryder
2016-04-15  4:24             ` Andrew Ryder
2016-04-15  4:24               ` Andrew Ryder
2016-04-14  3:33           ` Andrew Ryder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160328085541.GA27040@bfoster.bfoster \
    --to=bfoster@redhat.com \
    --cc=tireman@shaw.ca \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.