On 3/9/25 9:26 AM, Eben King wrote:
The "norecovery" option for mount(8) seems like a dangerous design
choice. "readonly" is supposed to mean "do not write to disk".
Yeah, that's what I thought too.
"readonly" means "don't allow the contents of the filesystem to be
changed," e.g. attempts to alter files by userspace programs are
rejected. It doesn't mean the kernel won't write to the device.
mount(8) even documents this explicitly:
Note that, depending on the filesystem type, state and kernel
behavior, the system may still write to the device. For example,
ext3 and ext4 will replay the journal if the filesystem is dirty. To
prevent this kind of write access, you may want to mount an ext3 or
ext4 filesystem with the ro,noload mount options or set the block
device itself to read-only mode, see the blockdev(8) command.
This doesn't seem like "readonly does the wrong thing" so much as "you
should know what things do before you use them."
--
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers
If you correspond with me on a regular basis, please read this document:
http://www.chrishowie.com/email-preferences/
PGP fingerprint: 2B7A B280 8B12 21CC 260A DF65 6FCE 505A CF83 38F5
------------------------------------------------------------------------
IMPORTANT INFORMATION/DISCLAIMER
This document should be read only by those persons to whom it is
addressed. If you have received this message it was obviously addressed
to you and therefore you can read it.
Additionally, by sending an email to ANY of my addresses or to ANY
mailing lists to which I am subscribed, whether intentionally or
accidentally, you are agreeing that I am "the intended recipient," and
that I may do whatever I wish with the contents of any message received
from you, unless a pre-existing agreement prohibits me from so doing.
This overrides any disclaimer or statement of confidentiality that may
be included on your message.