Monday, February 15, 2010

Superblock last mount time is in the future

Got this error>
It recently it started happening that after each reboot fsck chokes complaining about superblock mount time:

Code: Select all
Checking root file system...fsck from util-linux-ng 2.16.1
name-root: Superblock last mount time (Wed Oct 7 18:53:39 2009,
now = Sat Jan 1 00:00:14 2000) is in the future.

name-root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
I thinks the reason is this>
The board is designed not to keep the time. So, there's no battery. It's standard behaviour for the device. And it has behaved always like this.

So, making it remember the time is not much of an option.

Solution
Temporary solution was suggested right away with: fsck
This worked and made a correction to the filesystem

If this is a recuurent problem you can try this:

What I'm solving here is not cause by the time from the last check exceeding some value, but the plain and simple thing is e2fsck not liking superblock last mount time > current time. (And the same goes for superblock last write time.)

But the tip about /etc/e2fsck.conf was in the right direction. :) I don't want buggy_init_scripts = 1 (this options relaxes the superblock last mount/write time check by 24hrs; here I don't want relaxed check, but no check), but digging a bit more I came up with this to be put in /etc/e2fsck.conf:


[problems]

# Superblock last mount time is in the future (PR_0_FUTURE_SB_LAST_MOUNT).
0x000031 = {
preen_ok = true
preen_nomessage = true
}

# Superblock last write time is in the future (PR_0_FUTURE_SB_LAST_WRITE).
0x000032 = {
preen_ok = true
preen_nomessage = true
}
This config then tells e2fsck that the superblock mount and write time issues are ok to be auto-fixed (preen_ok=true) and that I don't want to see e2fsck mentioning it (preen_nomessage=true). More info can be found in e2fsc.conf man page.

The numeric codes (0x000031, 0x000032) are not really in the man page, but you can find them in e2fsck sources (http://e2fsprogs.sourceforge.net/), specifically in e2fsck/super.c (usage) and e2fsck/problem.h (value definition).

So, this solves my problem. One remaining thing is: Why is e2fsck considering this superblock mount/write time such a big issue? If they do, they probably have a reason for it.
source: http://forums.debian.net/viewtopic.php?f=10&t=45797

1 comment:

Gialuca Ghisleni said...

Very good.
This helped me. Thankyou.

Gian

Blog Archive

About Me

Exclusion of liability Regarding StillStupid: The use you make of the guides, tips and downloads that you listed on this web site or on another website to which I refer is entirely at your own risk. In no way can I be held liable for damage or consequential damages of any kind, which occurs as a result of that use.