Avoid fsck on reboot

The system utility fsck is a tool for checking the consistency of a file system in Linux. All Linux distributions include a version of fsck.
Generally, fsck is run automatically at boot time when the operating system detects that a file system is in an inconsistent state, indicating a non-graceful shutdown, such as a crash or power loss. As the command must be tailored specifically to the design of the file system, the exact behavior of various fsck implementations will vary. Typically, fsck utilities provide options for either interactively repairing damaged file systems (the user must decide how to fix specific problems), automatically deciding how to fix specific problems (so the user doesn't have to answer any questions), or reviewing the problems that need to be resolved on a file system without actually fixing them.

Most of the VPS (Virtual Private Servers) will force a fsck during reboot and that will lead to serious downtime as sometimes it might take up to 30 minutes until the server boot properly  and assuming there are no errors on the hard drive.

In order to avoid this, just run the following command:
/sbin/shutdown -rf now

Be aware that the above command will not shutdown the server, instead it will reboot the server without prompting for fsck.

Posted on: 06/01/2010

If you want to leave a comment please Login or Register