4 ms·
> mounting read only can induce more writes than you expect. Have you got a source for that? I can only find speculation on various sites, but nothing that exp
by viraptor 2y ago
> mounting read only can induce more writes than you expect.
Have you got a source for that? I can only find speculation on various sites, but nothing that explicitly confirms that outstanding journal entries would be written at RO mount time.
- bravetraveler 2y agoNothing readily available, can I be a source? The remaining nugget/memory on this I have is a fairly open ended... "it depends [on the filesystem]". It's been a while since I dove into this earnestly. IIRC there's no single journal mechanism - they all choose to do it (or not) in their own way. Journaling was just one example, too. Let's not ignore other quirks, like how BTRFS conflates volume/filesystem management... and may exhibit behavior impossible with XFS/ext{2,3,4} [under N failure conditions] WRT soft-RAID. By not mounting it, you're avoiding the "kernel/software filter" that adds entropy to an already-rich process. Side note: you caught me in a series of edits for phrasing :D
- deleted 2y ago[deleted]
- mrob 2y agoFrom the util-linux "mount" man page: "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."
- viraptor 2y agoThis seems to be the relevant behaviour from ext4: https://github.com/torvalds/linux/blob/8c06da67d0bd3139a97f301b4aa9c482b9d4f29e/fs/ext4/super.c#L6019 https://github.com/torvalds/linux/blob/8c06da67d0bd3139a97f3...
- tryauuum 2y agoext4 read only mount can still replay journal, see the "noload" mount option