From owner-freebsd-fs@FreeBSD.ORG Wed Jun 9 15:10:30 2010 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 347D3106564A for ; Wed, 9 Jun 2010 15:10:30 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 8EC9F8FC2B for ; Wed, 9 Jun 2010 15:10:29 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o59EhwES040479 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 9 Jun 2010 16:43:58 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o59EhtwG005367 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Jun 2010 16:43:55 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o59EhtYe074772; Wed, 9 Jun 2010 16:43:55 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o59EhtIr074771; Wed, 9 Jun 2010 16:43:55 +0200 (CEST) (envelope-from ticso) Date: Wed, 9 Jun 2010 16:43:55 +0200 From: Bernd Walter To: Alexander Leidinger Message-ID: <20100609144355.GL72453@cicely7.cicely.de> References: <20100609162627.11355zjzwnf7nj8k@webmail.leidinger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100609162627.11355zjzwnf7nj8k@webmail.leidinger.net> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de Cc: fs@freebsd.org Subject: Re: Do we want a periodic script for a zfs scrub? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2010 15:10:30 -0000 On Wed, Jun 09, 2010 at 04:26:27PM +0200, Alexander Leidinger wrote: > Hi, > > I noticed that we do not have an automatism to scrub a ZFS pool > periodically. Is there interest in something like this, or shall I > keep it local? For me scrub'ing takes several days without having a special big pool size and starting another scrub restarts everything. You should at least check if another one is still running. I think resilvering is also a collision case to check for. > Here's the main part of the monthly periodic script I quickly created: > ---snip--- > case "$monthly_scrub_zfs_enable" in > [Yy][Ee][Ss]) > echo > echo 'Scrubbing of zfs pools:' > > if [ -z "${monthly_scrub_zfs_pools}" ]; then > monthly_scrub_zfs_pools="$(zpool list -H -o name)" > fi > > for pool in ${monthly_scrub_zfs_pools}; do > # successful only if there is at least one pool to scrub > rc=0 > > echo " starting scrubbing of pool '${pool}'" > zpool scrub ${pool} > echo " consult 'zpool status ${pool}' for the result" > echo " or wait for the daily_status_zfs mail, if > enabled" > done > ;; > ---snip--- -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.