Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The default behavior or many Linux operating systems is to set a file system to read-only if critical information can't be written to disk. If this happens the file system is corrupt and fsck has to be run to fix it. The default behavior can be changed but it is not advisable. If it is changed to "continue" errors can accumulate and corrupt the file system. If it is changed to "panic" the system will halt and fsck will need to be run on the file system before it can be restarted (true?).

How can I detect when the file system has been changed to read-only?

The following command can be run to touch a file in each file find read-only file system in your instance. When run as root it will detect any file systems that are currently read-only:

grep "\sro[\s,]" /proc/mounts