LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 01-24-2005, 05:07 PM   #1
clinton
Member
 
Registered: Oct 2003
Location: Vancouver
Distribution: RH Enterprise AS 3
Posts: 47

Rep: Reputation: 15
Running fsck


Hi everyone,

I've seen similar posts to my questions, but I think mine are sufficiently different to warrant this post. So I'll get on with it:

I would like to run fsck on my server, but am unsure how to do it.

I managed to unmount everything but /usr and /var (and maybe /boot). I'm not sure what was using these FS'. How can I track down what is using them and stop them?

I told fsck not to check those FS', and the last thing it says before (apparently) doing nothing (no prompt) is "check aborted." What's happening?

I stopped all the services that I explicitly started/control (eg. httpd, ypbind) but there are things like mpmd that I am unfamiliar with and don't want to touch.

Is there some sort of command to stop all services except those needed to just run the system?

I've also read in numerous places that 'shutdown -rF' will cause an fsck to run. What about the various options that can be supplied? My concern here is that the fsck on boot is just a cursory look at the filesystems rather than a detailed look.

I've also read about booting off a CD to do the check. That still involves a reboot which I would like to avoid. But, can I fsck /root, etc. without using the CD?

Lastly, can fsck auto-fix errors? Will it log its results anywhere? I have some large drives that I would like to check overnight.

Sorry if these questions are dumb, or have been covered, but I want to make sure I can am adequately prepared to do this before I try it again.

Thanks a lot.
 
Old 01-24-2005, 05:29 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,689

Rep: Reputation: 286Reputation: 286Reputation: 286
I beleive I can competently address some of your post. Skip down to the part about 'shutdown -rF'.
If you check the man or info pages for shutdown, you will see that it will indeed force fsck before the partitions are mounted. You are not offered much more in the way of options.
On the other hand, booting from cd would be the way to go because you boot the kernel image from the cd, not the installed kernel. Once booted, if you take a look at /etc/fstab, you won't find any of your partitions! You are running from the cd, not the installed os.
Therefore, print a copy of your /etc/fstab. Then reboot from cd. Then edit the running copy of fstab (from cd) to add the partitions you want to run fsck on. They are now identified to the system running from cd, but not mounted. You can safely run fsck on the unmounted partitions (all of them).
Fsck -a will automatically repair a file system, without questions.
Fsck -r will repair interactively; the larger the system, the longer it will take to answer questions.
Fsck doesn't offer the option to log it's activities. However, you may be able to pipe the activity through tee to a named file:
Example:
fsck -a | tee fsck.txt
I've never tried it, so I don't know that it will work. But the tee utility is useful to send terminal output to a file for later inspection.
Finally. Your questions are not dumb. The way to learn is to ask questions. Not asking is dumb.
 
Old 01-25-2005, 07:12 PM   #3
clinton
Member
 
Registered: Oct 2003
Location: Vancouver
Distribution: RH Enterprise AS 3
Posts: 47

Original Poster
Rep: Reputation: 15
Thanks for the informative response, bigrigdriver.

Now all I have to do is check the other posts for making a boot disk

Thanks again!
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to fsck / while system running LinuxGeek Linux - Software 2 07-19-2005 10:43 AM
mount -r while fsck is running? aaccomazzi Linux - Hardware 1 10-20-2004 04:00 PM
automatic fsck on boot. fsck errors. nixel Slackware 1 05-17-2004 07:51 AM
Is there any point in running fsck.ext3? Rundi Linux - General 11 03-12-2004 09:28 AM
running fsck rbrooks Linux - Newbie 1 05-16-2002 04:30 PM


All times are GMT -5. The time now is 05:22 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration