Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to force filesystem check after improper shutdown?

Status
Not open for further replies.

Phaethar

Technical User
Nov 24, 2003
27
US
Hey all,

I'm curious to know if there is a way to get Linux (Fedora) to check the filesystem by default after an improper shutdown. Normally if the systems go down, it will prompt the user to hit Y within 5 seconds of asking to perform the check. If Y isn't hit, it continues on booting normally without checking. We have a lot of systems running unattended, and I'd like to find out if there is a way to force it to run that check if for whatever reason one of those systems goes down. If I could just bypass that prompt to hit Y and have it start the scan, that would be perfect. I only need it to do this though after an improper shutdown, so I don't really want to set it up to scan after every reboot. Is there a way or an option I can enable to make this work?

Thanks.

 
I am running ext3 on all of these systems. They are all running ordered mode journaling, and I know they should pick up and recover from that should anything happen. As an extra precaution though, since it does ask about checking the integrity of the filesystem after being shutdown improperly, I thought it would be nice to have it run that scan by default, if there was an easy way to do it. Just trying to avoid any possible problems in the future.

Thanks.
 
There may be some system setting that will do what you want, but I don't know.

Without that knowledge, you might try having your init sequence create some file somewhere and your shutdown sequence delete it.

Also have your init sequence look for the existence of that file and run fsck if it finds it.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top