[systemd-devel] [PATCH] RFC/fsck: Allow to specify the fsck repair option in the cmdline

Holger Freyther holger at freyther.de
Thu May 15 10:36:53 PDT 2014


Lennart Poettering <lennart <at> poettering.net> writes:

the "-y" option to attempt to fix all filesystem errors.
> 
> Hmm, we already unconditionally pass "-a" to fsck, which should have the
> desired effect of non-interactively fixing everything.
> 
> What does your patch add on top of that?

fsck.ext4(8) lists:

       -p     Automatically repair ("preen") the file system.
              This option will cause e2fsck to  automatically
              fix any filesystem problems that can be safely
              fixed without human intervention. 

       -y     Assume  an  answer  of  `yes'  to all questions;
              allows e2fsck to be used non-interactively. This
              option may not be specified at the same time as
              the -n or -p options.


To see the difference you could download this[1], gunzip,
losetup and fsck with -p and -y.

The idea/concern is that we have some remote systems and
they generally do not have a serial console. So in case the
fs is corrupt the question is what to do. Currently the emergency
target would be entered but that will not help our users and
not us at all. The best I could think of is to just try to
fix whatever is broken and see if the system comes back online.
If it doesn't then it needs to be replaced, if it did we
might be lucky.

cheers

  holger



[1] 
http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/plain/tests/f_baddir/image.
gz



More information about the systemd-devel mailing list