Ubuntu – How to check a mounted filesystem for errors in a reliable way


Following this question:
Force fsck.ext4 on reboot, but really "forceful"

Apparently the output of e2fsck -n is not reliable when you use it on a mounted filesystem, so its output should not be trusted.

Is there any way to check for errors in a mounted filesystem? Just check, not fix.
I am more interested in ext4, because that's what I use the most.

Best Answer

  • Because of the way that most Linux file systems work you simply cannot do a safe/useful check on a mounted file system. It's not really safe, and because the system is in use, it can be unreliable. Sadly, sometimes, you have to live with things the way they are until someone does it better ;). Ext4 probably won't pick up this feature (maybe ext5? if it ever happens) but I believe btrfs will, and if it does, you will be able to switch your partitions over when the time comes.