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.

What are the conditions that trigger file system check at system startup in Ubuntu 11.10?

share|improve this question
1  
I think the answer is every 30 boots, unless something went wrong at shutdown previously. I don't see an exact dupe after a quick search. –  Tom Brossman Feb 10 '12 at 13:04

1 Answer 1

up vote 7 down vote accepted

There's a few conditions which will trigger a fsck when a filesystem is mounted.

Firstly the maximum mount count, and the check interval. To see these, try:

sudo tune2fs -l /dev/sda1

Replace sda1 with the filesystem you want to check.

You're looking for:

Mount count:              9
Maximum mount count:      29
Last checked:             Tue Nov 15 17:15:10 2011
Check interval:           15552000 (6 months)
Next check after:         Sun May 13 18:15:10 2012

Here you can see my drive has been mounted 9 times since it was last checked, and it will force a check after 29 mounts just to make sure everything is still okay. It will also do one after 6 months even if the maximum mount count hasn't been reached. (these values are also tweakable with tune2fs).

Secondly, if the filesystem is not cleanly unmounted, the next mount attempt will trigger a fsck. This is also in the tune2fs output, look for:

Filesystem state:         clean
share|improve this answer

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.