The 404.status.zfs does not report a broken vdev.
Attatched is a modified 404.status.zfs that work both on a broken vdev and a correct one
# $FreeBSD: src/etc/periodic/daily/404.status-zfs,v 126.96.36.199.6.1 2010/12/21 17:09:25 kensmith Exp $
# made working by peter h IPSec 2012
# If there is a global system configuration file, suck it in.
if [ -r /etc/defaults/periodic.conf ]
case "$daily_status_zfs_enable" in
echo 'Checking status of zfs pools:'
out=`zpool status -x`
# assume fail
# zpool status -x always exits with 0, so we have to interpret its
# output to see what's going on.
if ( echo $out | grep -q "state: DEGRADED" ) ; then
if ( echo $out | grep -q "all pools are healthy" ) ; then
How-To-Repeat: use it on a machine with zfs
11-RELEASE version of 404.status-zfs returns `2` when a problem with ZFS is detected. I think this should return `3` like 406.status-gmirror and 401.status-graid do.
This will make sure the output is sent when using:
Are you sure? It looks to me like it will return rc=1 for a damaged pool.
My comment above has a mistake: 404.status-zfs in 11-RELEASE does indeed return rc=1 (instead of rc=2) when a damaged (or no) pool is detected.
However, people who now set daily_show_success=NO and daily_show_info=NO will not get any notification for broken pools.
Other status periodic scripts, as 406.status-gmirror and 401.status-graid return rc=3 in this case, so the information is not masked in the periodic output.
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017
- Set Status to "Open"