LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to remove forcefsck from / (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-remove-forcefsck-from-872337/)

anon091 04-01-2011 05:11 AM

how to remove forcefsck from /
 
If there is a focefsck file on /, how do i remove it?

Also, would that file if it exists show up when i simply do a ls, or do i have to do something special to show it (if it exists)

colucix 04-01-2011 05:17 AM

The file /forcefsck is a regular empty file. Since it resides under / only root can remove it. Its purpose is to force the check/repair of the linux filesystem at next reboot. You can create/remove it to enable/disable the checking. Another way to force the filesystem check is by means of the shutdown command:
Code:

shutdown -rF now
Hope this helps.

repo 04-01-2011 05:17 AM

Quote:

If there is a focefsck file on /, how do i remove it?
If the file exist, just remove it with
Code:

rm /forcefsck
Quote:

Also, would that file if it exists show up when i simply do a ls, or do i have to do something special to show it (if it exists)
yes
You can always use the find command

Kind regards

anon091 04-01-2011 05:22 AM

Thanks. I rebooted a server and it went into an automated fsck, but there is no forcefsck on / so i wasnt sure what happened.

colucix 04-01-2011 05:34 AM

The /forcefsck file is removed at the end of the checking, so that you will not find it anymore until some process creates it again. This is controlled by /etc/rc.sysinit.

ongte 04-01-2011 05:38 AM

If errors are found on the filesystem, fsck will run no matter what. fsck will also run automatically after a certain number of mounts by default. You can use tune2fs to increase the number of mounts and/or have it run after a certain number of days.

fsck after 100 mounts:
Quote:

# tune2fs -c 100 /dev/sda2
Set the number to 0 to disable it.


All times are GMT -5. The time now is 07:01 AM.