Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Apr 2026 06:06:29 +0000
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc:        Po Han Chen <hypery11@gmail.com>
Subject:   git: 92378e0405a8 - main - periodic/daily: show verbose zpool status when errors are detected
Message-ID:  <69e07c65.3c2ea.d0a245b@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=92378e0405a8caf77372cd1028970b1f7c7cf364

commit 92378e0405a8caf77372cd1028970b1f7c7cf364
Author:     Po Han Chen <hypery11@gmail.com>
AuthorDate: 2026-03-23 05:00:29 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2026-04-16 06:05:21 +0000

    periodic/daily: show verbose zpool status when errors are detected
    
    When zpool status -x reports errors, the output only shows basic error
    counts without identifying which files are affected. Replace the
    unconditional echo of the brief status with verbose output (zpool
    status -v) in the error path so administrators can see exactly which
    files have been damaged.
    
    The healthy/no-pools path still shows the brief status.
    
    PR: 223243
    Signed-off-by: Po Han Chen <hypery11@gmail.com>
    Reviewed by: imp, jlduran, asomers
    Pull Request: https://github.com/freebsd/freebsd-src/pull/2089
---
 usr.sbin/periodic/etc/daily/404.status-zfs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/usr.sbin/periodic/etc/daily/404.status-zfs b/usr.sbin/periodic/etc/daily/404.status-zfs
index 052f794c0bbc..64b67a2dc008 100755
--- a/usr.sbin/periodic/etc/daily/404.status-zfs
+++ b/usr.sbin/periodic/etc/daily/404.status-zfs
@@ -25,13 +25,15 @@ case "$daily_status_zfs_enable" in
 		;;
 	esac
 	sout=`zpool status -x`
-	echo "$sout"
 	# zpool status -x always exits with 0, so we have to interpret its
 	# output to see what's going on.
 	if [ "$sout" = "all pools are healthy" \
 	    -o "$sout" = "no pools available" ]; then
+		echo "$sout"
 		rc=0
 	else
+		# Show verbose status so we can see which files are affected
+		zpool status -v
 		rc=1
 	fi
 	;;


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e07c65.3c2ea.d0a245b>