Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp16476289ybl; Wed, 1 Jan 2020 06:18:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxRSVy8fN8RPu+skTwS88UZ6uzprBuo6cQgiRB+D7W3hEPNwgRzB4OleY9i2Ilndgp7iK9f X-Received: by 2002:aca:ba46:: with SMTP id k67mr1883685oif.38.1577888296058; Wed, 01 Jan 2020 06:18:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577888296; cv=none; d=google.com; s=arc-20160816; b=QaZ8fz5hcdYJ6V7lQy75LizFuxUo6fuYltefyZdne7Yxjq1g+NK/LJmNSfYY/o/fBF x2UWpfZQad7CakaYZzmx8a6QBDLG2yy+epx2Xs3yABC516tGNbcUsmR7qkHB9HxsKLu6 PtsxVlLoMSibjr7X6lfBoGP4MDAJ3EFzeVZRUh34q0oA6g2U9wiNWcwqwuoxJx82yrP/ j8bgfNyF4LmPqnDk8ojb9C1oJ+PBaFRA4rxnSlao1RHdvf3+YVquY6vZ2FjZFhwxUnok aGcu0Fc6HxKjWRUgzd6caBVhsGkBHDQTiin5C/FgP3Y1xaJKNLxx7QWc2jL7lrppF7IJ kZdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=d4MMKFkp5zdDMH9yb+9TfFUKF/8yRVmnhjGrx7Gnapo=; b=x/pW0Dnkg/dWX1NdsMtWfqUBgWMEC+w6ViA7Npe1PXXee6ElmbVXUHOBA5/0dyj1ci GcDT88xzcP/5a0h3YKQlZ1vISOhgXnm3Tein8Zx+ILV6RAXqiNqU1KDnX4gE6h8PaBHK B17YIjQm4f2bnKlslsdeFLIUtLxjy3SKmC2QRxOdojnNMNYaPSe2qMR95zoO08yXLbEQ e7/sCQ0y85+3chivKnPtDmNQJrmihkkbNwtUPZEddYV3avLbMjpf7N/DVA7ROkVIuOkv Ej1YTDh18qUsJlMQHWN96id9PhiqRAwmXL7e2vLeQ7+o46Y1WgAXRe2fOweNslKRbMyt +cwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l204si25458477oig.31.2020.01.01.06.17.56; Wed, 01 Jan 2020 06:18:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725809AbgAAORw (ORCPT + 99 others); Wed, 1 Jan 2020 09:17:52 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:57067 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725783AbgAAORv (ORCPT ); Wed, 1 Jan 2020 09:17:51 -0500 Received: from callcc.thunk.org (pool-72-93-95-157.bstnma.fios.verizon.net [72.93.95.157]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 001EHm3d022802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 1 Jan 2020 09:17:48 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id 19DDC420485; Wed, 1 Jan 2020 09:17:48 -0500 (EST) Date: Wed, 1 Jan 2020 09:17:48 -0500 From: "Theodore Y. Ts'o" To: Mikhail Gavrilov Cc: linux-ext4@vger.kernel.org Subject: Re: [bugreport] Ext4 automatically checked at each boot Message-ID: <20200101141748.GA191637@mit.edu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Jan 01, 2020 at 03:58:25PM +0500, Mikhail Gavrilov wrote: > Hi folks. > > Strange things happen with my ext4 lately: > - At each boot, the file system is checked. > - When I launch fsck manually it didn't found any issue. > - But tune2fs report that last checked and mount time is Sun Dec 15, > but this is incorrect. The problem is casued by the fact that the mount time is incorrect, which indicates that the system time was incorrect at the time when the file system was mounted and when it fsck was run. Since the last write time was in the future, this triggered "time is insane" check. This is inconsistent with your report that started happening when you switched to a new motherboard. That's because the real time clock is not reporting the correct time when the system is booted. Later on, in the boot cycle, after the root file system is checked and remounted read-write, the system time is getting set from an internet time server. This then causes the last write time to be ahead of the last mount time, and "in the future" with respect to the real time clock. Normally, the hardware clock's time gets set to match system time when it is set from network time, or when the system is getting shut down cleanly, but your init scripts aren't doing this properly --- or you normally shut down your system by just flipping the power switch, and not letting the shutdown sequence run correctly. The other possibilty is the real time clock on your system is just completly busted (although normally when that happens, the last mount time would be in the 1970's.) Running "/sbin/hwclock -w" as root may fix things; as is figuring out why this isn't run automatically by your boot scripts. Another workaround is to add to /etc/e2fsck.conf the following: [options] broken_system_lock = true This will disable e2fsck's time checks. Cheers, - Ted