Want to check if the reboot you planned is going to trigger a filesystem check? This is how to prepare for that. It is particularly useful on systems with large amounts of data on which a filesystem check can take a long time. Planning in maintenance windows can be critical.
As root, run:
dumpe2fs -h /dev/sda1
To get information the filesystem on
If you don't know which partition or device your filesystem is on, check the output of the command
Here's an example output (on August 25, 2011):
# dumpe2fs -h /dev/cciss/c0d0p3 dumpe2fs 1.41.3 (12-Oct-2008) [...] Filesystem state: clean [...] Mount count: 3 Maximum mount count: 33 Last checked: Tue Feb 15 10:53:25 2011 Check interval: 15552000 (6 months) Next check after: Sun Aug 14 11:53:25 2011 [...]
In the above example you can see it will be checked on the next reboot because of the date
Aug 14 is passed.
Another reason for a trigger is when the maximum mount count is reached.
In order to change the values of the check interval or maximum mount count, please refer to the
See the manpage for an easy explanation on how to tune your filesystem.
It can be really useful to prevent a filesystem check the next reboot in an uplanned, during office hours, emergency maintenance to avoid additional downtime.