xfs
[Top] [All Lists]

Re: mount prob: "log inconsistent or not a log"

To: Jonathan.Detert@xxxxxxxx
Subject: Re: mount prob: "log inconsistent or not a log"
From: Timothy Shimmin <tes@xxxxxxx>
Date: Thu, 20 Dec 2007 11:53:39 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20071220000144.GQ19770@xxxxxxxx>
References: <20071220000144.GQ19770@xxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird 2.0.0.9 (Macintosh/20071031)
Hi Jonathan,

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

Jonathan.Detert@xxxxxxxx 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


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