[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [rhelv6-list] fsck -n always showing errors

From ‘man fsck’:


       -N     Don't execute, just show what would be done.




       Options  to  different  filesystem-specific  fsck's  are not standardized.  If in doubt, please consult the man

       pages of the filesystem-specific checker.  Although not guaranteed, the following options are supported by most

       file system checkers:



       -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.


From ‘man e2fsck’:


       -n     Open  the filesystem read-only, and assume an answer of 'no' to all questions.  Allows e2fsck to be used

              non-interactively.  This option may not be specified at the same time as the -p or -y options.




From: rhelv6-list-bounces redhat com [mailto:rhelv6-list-bounces redhat com] On Behalf Of francis picabia
Sent: Friday, December 22, 2017 7:05 AM
To: Red Hat Enterprise Linux 6 (Santiago) discussion mailing-list <rhelv6-list redhat com>
Subject: [**EXTERNAL**] Re: [rhelv6-list] fsck -n always showing errors



On Thu, Dec 21, 2017 at 2:48 PM, Tim Mooney <Tim Mooney ndsu edu> wrote:

In regard to: rhelv6-list Digest, Vol 76, Issue 1, rhelv6-list-request redh :

This isn't something we routinely look at, but after
a couple of VMware systems showing scsi errors, I noticed almost
every Redhat 6 system will show some disk errors from
something like fsck -n / or same on /var

# fsck -n /
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
Warning!  /dev/sda1 is mounted.

There's your problem.  Don't run fsck on a mounted filesystem.  Even
with -n, it just shows you false positives.

Do some web searching for

        fsck on a mounted filesystem

to understand why.


Well, I think they make the -n/-N flag in fsck for some purpose other than don't do it.

It is designed to be run on a system to check it without modifying.

My conclusion is it is only useful for seeing an error such as orphaned

inodes which are persistent across multiple runs of fsck -n

If there are other checksums and such that don't seem correct, that would be expected

on a live filesystem.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]