From owner-freebsd-bugs@freebsd.org Wed Oct 25 18:10:59 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22E29E50C34 for ; Wed, 25 Oct 2017 18:10:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02BE577CC1 for ; Wed, 25 Oct 2017 18:10:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v9PIAwe6052897 for ; Wed, 25 Oct 2017 18:10:58 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 223243] daily 404.status-zfs needs to report status using '-v' flag Date: Wed, 25 Oct 2017 18:10:59 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 11.0-RELEASE X-Bugzilla-Keywords: easy, patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: bobf@mrp3.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Oct 2017 18:10:59 -0000 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.=