[CentOS] e2fsck run under "read only mode"???

m.roth at 5-cent.us m.roth at 5-cent.us
Thu Mar 22 15:36:29 UTC 2012


mcclnx mcc wrote:
> We have CENTOS 5.5 run on DELL server.   Due to power system crash, server
> been down and up.
> I would like use 'e2fsck" to check file systems.
>
> Does there has way to run "e2fsck" under following conditions:
>
> 1. file systems are all ext3
>
> 2. file systems must mount.
>
> 3. e2fsck only scan file system but NO modify
>
man fsck.ext3
<...>
 -n     Open the filesystem read-only, and assume an answer of  ‘no’ 
to            all  questions.   Allows  e2fsck  to  be used
non-interactively.
              (Note: if the -c, -l, or -L options are specified in
addition to
              the -n option, then the filesystem will be opened
read-write, to
              permit the bad-blocks list to be  updated.   However,  no 
other
              changes will be made to the filesystem.)  This option may
not be
              specified at the same time as the -p or -y options.
<...>

man fsck
<...>
       -n     For some filesystem-specific checkers, the -n option will 
cause
              the fs-specific fsck to avoid attempting to repair any
problems,
              but simply report such problems to stdout.  This is however 
not
              true  for  all  filesystem-specific  checkers.   In 
particular,
              fsck.reiserfs(8) will not report any corruption  if  given 
this
              option.  fsck.minix(8) does not support the -n option at all.

               mark




More information about the CentOS mailing list