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.
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:
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.
Thanks for the informative response, bigrigdriver.
Now all I have to do is check the other posts for making a boot disk ;)
|All times are GMT -5. The time now is 06:12 PM.|