All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-ext4@vger.kernel.org,
	Linux FS Devel <linux-fsdevel@vger.kernel.org>
Subject: Re: ext4 confusion
Date: Tue, 6 Mar 2018 23:58:12 -0500	[thread overview]
Message-ID: <20180307045812.GB7507@thunk.org> (raw)
In-Reply-To: <ea71777e-fc4b-4b45-c670-61a859b715a8@infradead.org>

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.  :-/

						- Ted

  reply	other threads:[~2018-03-07  4:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06  4:17 ext4 confusion Randy Dunlap
2018-03-06  4:34 ` Eric Sandeen
2018-03-06  4:38   ` Randy Dunlap
2018-03-06  4:40     ` Eric Sandeen
2018-03-06  4:42       ` Randy Dunlap
2018-03-06  4:45         ` Eric Sandeen
2018-03-06  5:12           ` Randy Dunlap
2018-03-06  6:47             ` Dave Chinner
2018-03-06 20:07               ` Randy Dunlap
2018-03-06 22:53                 ` Eric Sandeen
2018-03-06 22:34 ` Theodore Y. Ts'o
2018-03-06 23:34   ` Randy Dunlap
2018-03-07  4:58     ` Theodore Y. Ts'o [this message]
2018-03-07  5:35       ` Randy Dunlap

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=20180307045812.GB7507@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.