public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 214927] re-mount read-write (mount -oremount,rw) of read-only filesystem rejected with EROFS, but block device is not read-only
Date: Wed, 03 Nov 2021 15:13:35 +0000	[thread overview]
Message-ID: <bug-214927-13602-0kDc4tAxpa@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-214927-13602@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=214927

Theodore Tso (tytso@mit.edu) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tytso@mit.edu

--- Comment #3 from Theodore Tso (tytso@mit.edu) ---
In the case when there is a I/O error while trying to write to the journal,
there's nothing that can be done safely other than to force the file system to
be read-only.

When there is a file system which has aborted or otherwise has run into errors,
you have to unmount the file system before it is safe to remount it read/write.
 In fact, the ideal procedure is to umount the file system, run fsck, and then
remount the file system.

In the case of the root file system, you can't unmount the file system, so it
is acceptable to remount it read/only (if that hasn't been done automatically),
run fsck, and then reboot.

The reason for this because while the file system is mounted, there may be file
system corruption which was fixed by fsck, but for which some corruption (for
example, a corrupted refcount) is still present in memory.  So it is not safe
to take a mounted root file system, and modify it using fsck, and then remount
it read/write.   You have to reboot so it can be freshly mounted on the reboot.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

      parent reply	other threads:[~2021-11-03 15:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03  9:49 [Bug 214927] New: re-mount read-write (mount -oremount,rw) of read-only filesystem rejected with EROFS, but block device is nor read-only bugzilla-daemon
2021-11-03  9:49 ` [Bug 214927] re-mount read-write (mount -oremount,rw) of read-only filesystem rejected with EROFS, but block device is not read-only bugzilla-daemon
2021-11-03  9:58 ` bugzilla-daemon
2021-11-03 10:06 ` bugzilla-daemon
2021-11-03 15:13 ` bugzilla-daemon [this message]

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=bug-214927-13602-0kDc4tAxpa@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-ext4@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox