LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-01-2011, 06:11 AM   #1
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Rep: Reputation: 46
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)
 
Old 04-01-2011, 06:17 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
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.
 
Old 04-01-2011, 06:17 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
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
 
Old 04-01-2011, 06:22 AM   #4
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
Thanks. I rebooted a server and it went into an automated fsck, but there is no forcefsck on / so i wasnt sure what happened.
 
Old 04-01-2011, 06:34 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
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.
 
Old 04-01-2011, 06:38 AM   #6
ongte
Member
 
Registered: Jun 2009
Location: Penang, Malaysia
Distribution: Mageia, CentOS, Ubuntu
Posts: 468

Rep: Reputation: 72
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.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"fsck died with exit status 6" , what to do after forcefsck ? frenchn00b Debian 3 06-19-2010 10:39 AM
apt-get remove kolf-kde4 will remove kde4? michielv Linux - Software 1 02-10-2009 07:02 AM
Remove Evolution - remove everything?! samjh Debian 4 01-13-2009 07:26 AM
# yum remove dbus - trying to remove the whole system... atnonis Fedora 4 11-23-2007 07:31 AM
apt-get remove chrony doesn't remove all? asgerhallas Debian 3 06-05-2007 06:37 AM


All times are GMT -5. The time now is 06:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration