I am trying to determine if fsck will run on reboot. I run this command dumpe2fs -h /dev/(diskname) and get this result:

Mount count:              13
Maximum mount count:      -1

AFAIK fsck will run if mount count is equal or greater than maximum mount count. In this case maximum mount count is -1 so fsck will never run. Is this normal?


From man tune2fs

-c max-mount-counts

Adjust the number of mounts after which the filesystem will be checked by e2fsck(8). If max-mount-counts is 0 or -1, the number of times the filesystem is mounted will be disregarded by e2fsck(8) and the kernel.

In this case "disregarded" means that yes, fsck will never run for this reason and this is normal. However there is also

-i interval-between-checks[d|m|w]

Adjust the maximal time between two filesystem checks. No suffix or d will interpret the number interval-between-checks as days, m as months, and w as weeks. A value of zero will disable the time-dependent checking.

So fsck may still run for this other reason, depending on whether or not the interval is set.

It is strongly recommended that either -c (mount-count-dependent) or -i (time-dependent) checking be enabled to force periodic full e2fsck(8) checking of the filesystem. Failure to do so may lead to filesystem corruption (due to bad disks, cables, memory, or kernel bugs) going unnoticed, ultimately resulting in data loss or corruption.

  • I checked it again and my Check interval is 0. What you say is a good number for max mount count? – IMB Aug 17 '17 at 11:47
  • @IMB I guess it depends on how you use the filesystem, how often you restart etc. But really I can't give you a good advice because I widely use btrfs, not ext. – Kamil Maciorowski Aug 17 '17 at 11:51
  • I use it as server for multiple websites. I rarely restart, maybe once or twice a year – IMB Aug 17 '17 at 11:58
  • @IMB I think you should ask a separate question about reasonable numbers for tune2fs, then somebody else may help you. Check if Server Fault is a better place for this second question since you're trying to tweak a server (I don't say it is, I say check). – Kamil Maciorowski Aug 17 '17 at 12:21

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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