aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo Han Chen <hypery11@gmail.com>2026-03-23 05:00:29 +0000
committerWarner Losh <imp@FreeBSD.org>2026-04-16 06:05:21 +0000
commit92378e0405a8caf77372cd1028970b1f7c7cf364 (patch)
treed72467eb0bfbeb5891438a62ad3371f5161c9b5c
parente0b22342f52b22b1762b09ab16bbc520cf0f2882 (diff)
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
-rwxr-xr-xusr.sbin/periodic/etc/daily/404.status-zfs4
1 files changed, 3 insertions, 1 deletions
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
;;