Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Oct 2017 18:10:59 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 223243] daily 404.status-zfs needs to report status using '-v' flag
Message-ID:  <bug-223243-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D223243

            Bug ID: 223243
           Summary: daily 404.status-zfs needs to report status using '-v'
                    flag
           Product: Base System
           Version: 11.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Keywords: easy, patch
          Severity: Affects Many People
          Priority: ---
         Component: misc
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: bobf@mrp3.com

the 404.status-zfs script in /etc/periodic/daily needs to use the '-v' flag
when reporting the status via 'zpool status'.  This way, if there are errors
affecting specific files, these errors will be reported along with the I/O =
and
checksum error count.

Sometimes after a zpool scrub a file that previously had errors in it stops
being in the list.  And it has been my experience that this "fixed" file may
have corrupt data in it [I have seen one such example], if the scrub "fixes"
the problem but the error in the file remains.

Having a log of these potentially corrupt files in /var/mail/root [or where=
ver
it ends up] would help to diagnose problems that have crept in without noti=
ce,
by leaving a kind of audit trail, as long as the daily zfs status includes =
the
'-v' flag.

Otherwise the only information you have is "an error happened". And that's =
less
than helpful.

I made a simple fix in my own version of the script:

@@ -24,17 +24,19 @@
                ;;
            *)
                ;;
        esac
        sout=3D`zpool status -x`
-       echo "$sout"
+       #echo "$sout"
        # zpool status -x always exits with 0, so we have to interpret its
        # output to see what's going on.
        if [ "$sout" =3D "all pools are healthy" \
            -o "$sout" =3D "no pools available" ]; then
+               echo "$sout"
                rc=3D0
        else
+               zpool status -v
                rc=3D1
        fi
        ;;

     *)

it's not perfect, but does a 'zpool status -v' whenever it detects errors. =
 A
better solution may exist, but this one appears to work.  [if it doesn't, t=
hen
you might fix it so it does]

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-223243-8>