Forcing fsck On Next Reboot
August 10th, 2009 by greg
My file server appeared to have some filesystem issues. I wanted to check and repair the filesystem but I couldn’t find my system rescue CD on a USB stick. I considered rebooting the machine 30 times to force a check but that didn’t seem like a fun way to spend my time. The filesystem is the root filesystem and it is xfs which meant that I couldn’t use `tune2fs` to set the property to force a fsck.
Today I learned of a very easy way to force a file system check. That is to create a file /forcefsck. The startup scripts in the initial ramdisk will check the filesystem and remove the file.
This entry was posted on Monday, August 10th, 2009 at 7:02 am and is filed under Geek, Tips. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.
