[TriLUG] e2fsck under cron gets retcode=8 operational error

Igor Partola igor at igorpartola.com
Tue Sep 18 17:45:11 EDT 2012


>
>
> Now I see why all the people, who were getting error code 8 with fsck,
> were getting them inside cron or on bootup with no terminal.
>
>
The reason I suggested this is because a couple of days ago I was reading
the documentation for sh.py (http://amoffat.github.com/sh/index.html) which
specifically mentions attaching a tty to a subprocess where it requires it.
I also remembered that some programs have different behavior depending on
whether they are writing to stdout or a file (I believe nohup does this).
It is bizarre how many problems can be fixed by reading completely
unrelated documentation.

Also, check out the -C option to fsck (http://linux.die.net/man/8/fsck)
which will write the progress info to a file, which I was reading about
last night.

I think the behavior is not really crippled. fsck is saying that "in this
mode, I might need to ask you a question later, which may lead to
distructive changes. I cannot do this without a tty, therefore I'll fail
explicitly." This forces you to deliberately say "repair the filesystem
automatically" rather than relying on the automatic vs interactive behavior
to be implied by the presence of a tty. Of course, like I said, I don't
know enough about fsck or filesystems to say whether this approach is
justified, so this is just my 2 cents.

Igor



More information about the TriLUG mailing list