Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
I noticed that fsck -n shows "Warning: skipping journal recovery because doing a read-only filesystem check." I think this is related to why it's not reliable. I'd love to get some links to a better explanation, though. –  UrkoM Nov 26 '10 at 4:10
    
I could try to pull up some good links tomorrow, or maybe a kernel hacker can get them quick for you. But generally, even on windows (yes even on windows) doing checks on a mounted file system is bad news! –  RolandiXor Nov 26 '10 at 4:53
    
This seems like a good link: linux-archive.org/ubuntu-user/… I searched before asking, but obviously not with the right wording. –  UrkoM Nov 26 '10 at 5:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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