On Fri, 22 Sep 2000, John Summerfield wrote:

>> >Just went throughh that yesterday, RHL 6.3. I'm not competent to run that 
>> >wretched program in manuam mode, and I doubth that anyone on this list is.
>> 
>> What is so hard about fsck?  Has anyone actually read the
>> manpage?  If not, then I can see it being difficult, but after
>> being bitten once by it, I'd assume a competant admin would do a
>> "man fsck", "man e2fsck".  It really isn't hard at all.
>
>It's extremely difficult to read manpages when your comptuter is half-booted.

No, you misunderstand..  I meant, read it _now_, and print it out
if need be.  Learn to use the command, write out a simple cheat
sheet and stick it to the monitor if need be.  fsck is a fact of
life right now.  No matter how much you may hate it or dislike
the idea of learning how to use it, the options are:  learn to
use it, or format the partition and restart over?  Considering it
takes anywhere from 40 minutes to several hours to reinstall and
reconfigure everything each time, spending 10-30 minutes to learn
how to use fsck and print out the manpage is nothing.  That was
my main point.  I'm just trying to offer help to the real
solution thats all.  Nobody has to follow it..  ;o)

>> >Certainly nobody's going to take the time to give a considered reply to each
>>  
>> >and every of the thousands (maybe tens of thousands) of questions it asked m
>> e. 
>> >I held "y" down and still it took an hour or so.
>> 
>> Nobody would have to if they read the manpage.  ;o)
>> 
>> >I did NOT like the look of what was in lost+found and could not delete it. 
>>
>
>Mike
>Help me. I've read the man page. Just what do you think I missed?

Ok, if you want e2fsck to run without asking you questions, you
can use the following options:

(man e2fsck)

E2FSCK(8)                                               E2FSCK(8)


NAME
       e2fsck - check a Linux second extended file system

SYNOPSIS
       e2fsck  [  -pacnyrdfvstFSV ] [ -b superblock ] [ -B block-
       size ] [ -l|-L bad_blocks_file ] [ -C fd ] device

DESCRIPTION
       e2fsck is used to check a Linux second extended file sys<AD>
       tem.

[SNIP]

       -f     Force checking even if the file system seems clean.
[SNIP]
       -p     Automatically  repair  ("preen")  the  file  system
              without any questions.
[SNIP]
       -y     Assume  an answer of `yes' to all questions; allows
              e2fsck to be used non-interactively.



So something like:  e2fsck -p -y /dev/hda1

That automatically answers yes to all questions and repairs
without questions.  This doesn't mean that the filesystem will be
in a state that is useful when it is done though.  fsck asks you
questions only when it can't determine things 100% on its own.  A
good portion of the time "yes" is the right answer, however in
certain circumstances it can fry stuff too.  The right answer
unfortunately requires that you know the right answer yourself
for each given question.  If you don't, a no answer might be as
good a guess as a yess answer.  In practice, yes seems to be
correct more of the time than no, however it truely depends on
the nature of the disk problems encountered.  "deleted inode has
zero dtime" is usually if not always harmless and "yes" is fine,
however there are more troublesome world-ending types of errors
that basically mean you are screwed either way, so it is often a
"best judgement" call.  I take the when in doubt, hit yes
approach, but I like to see the questions first to try and guage
risk.  The "-y" option should automatically just yes everything
though.

I hope this helps clear up fsck'ing..   One point to be extra
clear on, is that "fsck" itself is just a wrapper program, and it
calls e2fsck for ext2 fs's.  I prefer to manually run e2fsck
myself, or whatever fs specific fsck program rather than the fsck
wrapper itself.  Make sure you read all manpages, and not just
the "fsck" one.

In 5 years of running Linux, only about 3 times have I needed to
run e2fsck manually.  The first time I had no clue, and guessed,
and was lucky.  After rebooting, I read the manpages until I felt
I understood what to do next time better.  I've not had any
problem situations arise since that I couldn't handle, and I'm no
filesystem expert by far.  ;o)  It doesn't hurt to be familiar
with debugfs as well though, but that is a much much bigger jump
indeed.  ;o)

If you've got any other fsck questions, perhaps a specific
problem, fire away and I'll do my best to come up with an
explanation.

Take care!
TTYL

--
         Mike A. Harris  -  Linux advocate  -  Open source advocate
                   Copyright 2000 all rights reserved
                               ----------
[Favorite quotes of Linus Torvalds - Sept 6, 2000]
I'm a bastard. I have absolutely no clue why people can ever think
otherwise. Yet they do. People think I'm a nice guy, and the fact is that
I'm a scheming, conniving bastard who doesn't care for any hurt feelings
or lost hours of work if it just results in what I consider to be a better
system.  And I'm not just saying that. I'm really not a very nice person. 
I can say "I don't care" with a straight face, and really mean it.
        -- Linus Torvalds on linux-kernel mailing list



_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

Reply via email to