fsck: Force a filesystem check on next reboot

I haven’t had to use this too often but I’ve had a few occasions where I had to troubleshoot timing issues in the boot process. Mainly where a service tries to start before the disks are available. We suspected that an fsck was stopping the filesystem from being mounted but the service was started anyways.

In order to test our theories we had to force a fsck on reboot.

Example:

# touch /forcefsck

About Benjamin

Benjamin is a Infrastructure and Software Engineer. On this blog he writes about Linux, Docker, Programming as well as other Systems topics.

Learn more about Linux

If you liked this article, check out Benjamin's book: Red Hat Enterprise Linux Troubleshooting Guide. Where you can learn a lot more about troubleshooting Linux systems. This book is filled with tips and techniques he has learned over years of managing mission critical systems.

Related