From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:53618 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750984AbeCGFfg (ORCPT ); Wed, 7 Mar 2018 00:35:36 -0500 Subject: Re: ext4 confusion To: "Theodore Y. Ts'o" Cc: linux-ext4@vger.kernel.org, Linux FS Devel References: <9fcee669-1ab3-7beb-a9e8-77fd22dc71c9@infradead.org> <20180306223421.GA7204@thunk.org> <20180307045812.GB7507@thunk.org> From: Randy Dunlap Message-ID: <3aaa09d5-aed6-84e2-97a7-e1dd85d6f72e@infradead.org> Date: Tue, 6 Mar 2018 21:35:34 -0800 MIME-Version: 1.0 In-Reply-To: <20180307045812.GB7507@thunk.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 03/06/2018 08:58 PM, Theodore Y. Ts'o wrote: > On Tue, Mar 06, 2018 at 03:34:25PM -0800, Randy Dunlap wrote: >> >> My custom kernel does not use an initramfs at all. > > OK, so if you are not using an initramfs at all, it's *normal* for the > file system to be mounted read-only, since it's not safe to run fsck > on the file system unless it is mounted read-only. So the standard > init scripts (at least in the good old days pre-systemd) expected that > you use the ro option to make sure the root file system is mounted > read-only, and then the init scripts would check the file system if it > was needed, and then the init scripts would remount the file sytsem > read-write afterwards. > > As I mentioned, with many modern distro's this is now done in > initramfs, and with Debian it will actually run the fsck *before* the > root file system is even mounted, and then it can just mount it > read/write. Obviously, if that is what initramfs does, then the init > scripts (or the magic systemd units in the brave new systemd world) > don't need to remount the file system read/write. > > To be honest, there is a huge amount of magic these days in the > initramfs and systemd scripts. I do know that Debian stable supports > using a read-only mount and its systemd setup does the right thing, > because that's how kvm-xfstests works. But with some of the other > distro's (Red Hat Enterprse Linux especially), it's been magic, and > trying to figure out how it works is something I gave up on a long > time ago. I was just amazed that it managed to boot over fiber > channel, and I was glad I never had to debug on the freaking thing > worked. :-/ OK. Thanks, Ted. -- ~Randy