From owner-freebsd-fs@FreeBSD.ORG Fri Jun 11 15:20:42 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 48F301065677; Fri, 11 Jun 2010 15:20:42 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id C89408FC17; Fri, 11 Jun 2010 15:20:41 +0000 (UTC) Received: from outgoing.leidinger.net (pD954FC95.dip.t-dialin.net [217.84.252.149]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 8EE4F84400A; Fri, 11 Jun 2010 17:20:37 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 3FE81521B; Fri, 11 Jun 2010 17:20:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1276269634; bh=fqWjhwATLlDUTnUUymky33S3bCX3IngdN484M52/M1A=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=MwAKfWquhD0EcPouOe5m3/y0UQ2sOPpv9U6nXXa3Cq67IBDMm5l/Zg0z3q6rXvxlr aKxZFUBWl9o3fOsDrz4VJJB+gShqvyZKl+yZh2KJdxpU7DIKz6ZgKAyQoWsVV+lzpD LJPaMPPnld6ZZTyXq74Zj1CJqWJDH1dy/upExwSoV5Jl67GiAnyMLu1D0dX8iP1JIN A+nyx4CxAgRODuUEiRNOdjJpO/jvHbsQRS5EbR5OtW74mKtRu1paRrOIOA+sH3d5Rb idHMim9w/tz/d+G5FXQVtqwpD/zakgONiE5hAjPlDkKuVFXzU1aWMNiyzeE1KSku6s tepOC0ClbGuwA== Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id o5BFKXeI022633; Fri, 11 Jun 2010 17:20:33 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 11 Jun 2010 17:20:33 +0200 Message-ID: <20100611172033.42001s90ahe57oe8@webmail.leidinger.net> Date: Fri, 11 Jun 2010 17:20:33 +0200 From: Alexander Leidinger To: Ivan Voras References: <20100610162629.38992mazf0sfdqg0@webmail.leidinger.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 8EE4F84400A.A78D4 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.023, required 6, autolearn=disabled, ALL_TRUSTED -1.00, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10, TW_ZF 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1276874438.51835@75x/WBkoEbA9pDIrtOCYzA X-EBL-Spam-Status: No Cc: freebsd-fs@freebsd.org 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 15:20:42 -0000 Quoting Ivan Voras (from Fri, 11 Jun 2010 14:04:24 +0200): > 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? Can you please provide an example of such a failed scrub? Things I fixed so far: - use the creation time of the pool if no scrub was done before - rename the script via s/600/800/ (this is a I/O intensive task and we want to have this done late in the periodic run, so that other stuff is not slowed down too much) Bye, Alexander. -- Winning isn't everything, but losing isn't anything. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137