I am not talking about tweaking fstab or about the use of the "mount" program... I was thinking of tune4fs, btrfstune and the like : I'd like to know if you've heard of any filesystem being able to declare itself as "read-only by default" to the host system.
I know the read-only attribute is defined and applied on the OS side, but for instance, BTRFS has a "read-only" attribute for snapshots. I could use that (and I might) but I'm not sure this would work and if a more stable FS could do the same, it'd be better.
Regards
EDIT
I know about chmod a-w, of course. But I am not sure chmoding would help to prevent data loss upon power loss.
lvchange -p r
). If the underlying block device is read-only, the filesystem has no choice but to become read-only./dev/sda1
) as opposed to the whole block device (like/dev/sda
): it's the same disk blocks, just shifted over by an offset equal to the offset of the start of the partition.