From owner-freebsd-fs@FreeBSD.ORG Fri Jun 11 12:04:40 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D5F41065676 for ; Fri, 11 Jun 2010 12:04:40 +0000 (UTC) (envelope-from freebsd-fs@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id D8F0D8FC14 for ; Fri, 11 Jun 2010 12:04:39 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1ON2yU-0001Bx-Fi for freebsd-fs@freebsd.org; Fri, 11 Jun 2010 14:04:38 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Jun 2010 14:04:38 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Jun 2010 14:04:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-fs@freebsd.org connect(): No such file or directory From: Ivan Voras Date: Fri, 11 Jun 2010 14:04:24 +0200 Lines: 28 Message-ID: References: <20100610162629.38992mazf0sfdqg0@webmail.leidinger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100518 Thunderbird/3.0.4 In-Reply-To: <20100610162629.38992mazf0sfdqg0@webmail.leidinger.net> X-Enigmail-Version: 1.0.1 Subject: Re: CFT: periodic scrubbing of ZFS pools X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2010 12:04:40 -0000 On 06/10/10 16:26, Alexander Leidinger wrote: > Hi, > > as there seems to be interest in a periodic script to scrub zpools, I > modified my monthly-POC into a daily script with parameters for which > pools to scrub, how many days between scrubs (even different per pool, > if required), and several error checks (non-existing pool specified, > scrub in progress). > > You can find it at > http://www.Leidinger.net/FreeBSD/current-patches/600.scrub-zfs > > Please put it into /etc/periodic/daily and test it. Possible > periodic.conf variables are: > daily_scrub_zfs_enable="YES" > daily_scrub_zfs_pools="name1 name2 name3" # all if unset or empty > daily scrub_zfs_default_threshold="" # default: 30 > daily_scrub_zfs__threshold="" > > If there is no specific threshold for a pool (= days between scrubs), > the default threshold is used. Fairly good and useful, but could you add a small check of "zpool status" information before scrubbing that would a) complain LOUDLY AND VISIBLY if a previous scrub failed and b) skip issuing a new scrub command if there is such an error, to avoid stressing possibly broken hardware?