4 ms·
Filesystems aren't read-only with mount ro
- purpleidea 5y agoThis is a pretty interesting thread about how filesystems aren't necessarily read-only, even when you want them to be. Make sure to also see this insightful comment here: https://twitter.com/mgeb/status/1384262575961960456 https://twitter.com/mgeb/status/1384262575961960456 > For xfs we had corner cases where even with all necessary read-only flags it would still modify the FS on mount. I wouldn't count on all the corner cases being clean, eg. does the FS code really honor the R/O flag when hitting a checksum error, or does it try to repair it?
- LinuxBender 5y agoIf your filesystem is on top of lvm you can force it to be truly read-only. There are other flags required if /etc is on a read-only fs. lvchange -pr vg00/www mount -o remount,ro /var/www
- pabs3 5y agoHmm, I think it would be better to remount ro and only then do the lvchange.
- LinuxBender 5y agoYes, even better mount it ro from fstab.