public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Timothy Shimmin <tes@sgi.com>
To: Jonathan.Detert@msoe.edu
Cc: xfs@oss.sgi.com
Subject: Re: mount prob: "log inconsistent or not a log"
Date: Thu, 20 Dec 2007 11:53:39 +1100	[thread overview]
Message-ID: <4769BD13.5040303@sgi.com> (raw)
In-Reply-To: <20071220000144.GQ19770@msoe.edu>

Hi Jonathan,

I'm not giving a high level view but
in regards to the log message about the xfs log :)

Jonathan.Detert@msoe.edu wrote:
> This is what /var/log/messages has to say about the mount attempt:
> -=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Dec 19 17:42:30 quartz kernel: [ 9701.960000] XFS mounting filesystem sdb
> Dec 19 17:42:30 quartz kernel: [ 9701.960000] XFS: Log inconsistent or not a log (last==0, first!=1)
> Dec 19 17:42:30 quartz kernel: [ 9701.960000] XFS: empty log check failed
> Dec 19 17:42:30 quartz kernel: [ 9701.960000] XFS: log mount/recovery failed: error 22
> Dec 19 17:42:30 quartz kernel: [ 9701.960000] XFS: log mount failed
> -=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> 
Every 512 bytes of the log is stamped with the cycle#.
The cycle# is effectively the number of times the log has wrapped
around. The cycle# is at the start of each sector or near the
start for a log record. The cycle# is used to find where the log
was last written to (the head of the log).
What the message is saying is that the first sector of the log has a
cycle# which is not 1 and the last sector has a cycle# of zero.
Looking at the code (xlog_find_zeroed), the first sector cycle#
is not zero either.
=> first sector cycle# >1
=> last  sectir cycle# == 0
Now this can't really happen.
If the last cycle# is zero then the first cycle# should be 1
(or possibly 0 on irix).

An "xfs_logprint -d /dev/sdb" will show what the cycle#s are
and where the log records are. It might give an idea of the
extent of the corruption.

--Tim

  reply	other threads:[~2007-12-20  0:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-20  0:01 mount prob: "log inconsistent or not a log" Jonathan.Detert
2007-12-20  0:53 ` Timothy Shimmin [this message]
2007-12-20  1:16   ` Jonathan C. Detert
2007-12-20  4:44     ` Timothy Shimmin
2007-12-20  5:04       ` Jonathan C. Detert
2007-12-20  5:45         ` Timothy Shimmin
2007-12-20 19:54         ` Jonathan C. Detert
2007-12-20  1:18   ` Jonathan C. Detert
2007-12-20  1:54     ` David Chinner
2007-12-20  2:44       ` Jonathan C. Detert
2007-12-20 17:55         ` Jonathan C. Detert
2007-12-21  0:47           ` Timothy Shimmin
2007-12-21  1:55             ` Jonathan C. Detert
2007-12-21  6:40               ` Timothy Shimmin
2007-12-21 23:19                 ` Jonathan C. Detert

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=4769BD13.5040303@sgi.com \
    --to=tes@sgi.com \
    --cc=Jonathan.Detert@msoe.edu \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox