I've read in several places that during an I/O error to the system log file most Linux distributions go to read-only mode. They followed with a procedure for how to recover from it.

This is all fine, but I'm looking for a way to induce read-only mode to Linux filesystem. Is there a quick and dirty way to cause an I/O error for the system to panic?

  • What's false? That I actually read it or my conclusions? – Simply_Me Jun 23 '15 at 19:56
  • Sorry, I had to qualify that which is why I deleted it. They certainly do not go into RO on I/O error, and I'm very dubious they would specifically because of I/O error on the "system log file" -- which system log file? It would not be a very good feature if it were any system log file, since they do not need to all be on one fs. This is the first I've heard of it, and I think you have misunderstood something you've read, so posting an actual link to a reference (rather than potentially disseminating hearsay) would be nice. – goldilocks Jun 23 '15 at 19:59

Since you didn't specify if actually corrupting the FS is acceptable you may want to look at this Q&A: https://serverfault.com/questions/40302/how-to-corrupt-a-file-system :)

Note: you'd need to corrupt the root filesystem or a swap partition to cause the system to panic, a regular non-critical partition will be just switched to readonly mode but the system can survive without panic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.