From nobody@FreeBSD.org  Fri May 29 08:05:51 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F08E4106571F
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 29 May 2009 08:05:51 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id C4BA58FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 29 May 2009 08:05:51 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n4T85pP4080705
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 29 May 2009 08:05:51 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n4T85pAK080704;
	Fri, 29 May 2009 08:05:51 GMT
	(envelope-from nobody)
Message-Id: <200905290805.n4T85pAK080704@www.freebsd.org>
Date: Fri, 29 May 2009 08:05:51 GMT
From: Thomas Backman <serenity@exscape.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ZFS clears/hides disk errors on reboot
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         135050
>Category:       kern
>Synopsis:       [zfs] ZFS clears/hides disk errors on reboot
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-fs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 29 08:10:04 UTC 2009
>Closed-Date:    
>Last-Modified:  Sun Jun 14 07:50:01 UTC 2009
>Originator:     Thomas Backman
>Release:        8.0-CURRENT, r192914
>Organization:
exscape
>Environment:
FreeBSD clone.exscape.org 8.0-CURRENT FreeBSD 8.0-CURRENT #4 r192914: Thu May 28 08:56:46 CEST 2009     root@clone.exscape.org:/usr/obj/usr/src/sys/DTRACE  amd64

>Description:
(Not sure if this is kern or bin, but I'll take a shot.)

When a disk is corrupted, "zpool status" hides the fact that there has ever been any corruption if the system is rebooted. In practice, this could lead to silent corruption (that is fixed by ZFS temporarily, while the disk is dying) without the using ever finding out. Quite bad. It should tell the user that there have been problems. zpool history -il shown nothing of interest either.
>How-To-Repeat:
(... create pool etc ...)
[root@clone ~]# dd if=/dev/random of=/dev/ad2 bs=1000k count=5 seek=30
[root@clone ~]# zpool scrub test

(... wait for a while ...)

[root@clone ~]# zpool status -v test
  pool: test
 state: ONLINE
status: One or more devices has experienced an unrecoverable error.  An
	attempt was made to correct the error.  Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
	using 'zpool clear' or replace the device with 'zpool replace'.
   see: http://www.sun.com/msg/ZFS-8000-9P
 scrub: scrub completed after 0h2m with 0 errors on Fri May 29 09:52:50 2009
config:

	NAME        STATE     READ WRITE CKSUM
	test        ONLINE       0     0     0
	  raidz1    ONLINE       0     0     0
	    ad1     ONLINE       0     0     0
	    ad2     ONLINE       0     0    79  4.94M repaired
	    ad3     ONLINE       0     0     0

errors: No known data errors

[root@clone ~]# reboot

[root@clone ~]# zpool status -xv
all pools are healthy
[root@clone ~]# zpool status test
  pool: test
 state: ONLINE
 scrub: none requested
config:

	NAME        STATE     READ WRITE CKSUM
	test        ONLINE       0     0     0
	  raidz1    ONLINE       0     0     0
	    ad1     ONLINE       0     0     0
	    ad2     ONLINE       0     0     0
	    ad3     ONLINE       0     0     0

errors: No known data errors
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Jun 2 02:13:13 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=135050 

From: Thomas Backman <serenity@exscape.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/135050: [zfs] ZFS clears/hides disk errors on reboot
Date: Sun, 14 Jun 2009 09:25:01 +0200

 Apparently, errors like these are actually logged to syslog, and thus  
 not completely hidden at all. By adding a line to your /etc/devd.conf  
 you can even get an email notification automatically the instant an  
 error is logged. Very nice. See this post:
 http://lists.freebsd.org/pipermail/freebsd-current/2009-June/008149.html
 
 Regards,
 Thomas
>Unformatted:
