From owner-freebsd-questions@FreeBSD.ORG Sat Jul 11 20:26:13 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCF2E106566B for ; Sat, 11 Jul 2009 20:26:13 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: from mail-ew0-f227.google.com (mail-ew0-f227.google.com [209.85.219.227]) by mx1.freebsd.org (Postfix) with ESMTP id 477EC8FC1C for ; Sat, 11 Jul 2009 20:26:13 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: by ewy27 with SMTP id 27so829287ewy.43 for ; Sat, 11 Jul 2009 13:26:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:cc :subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to; bh=PVh4KUdA9m3Y1m/mOB3854KCyt4Fia6kw9PWmCyosVc=; b=qc2RTmxyfTR2RvS5G+fqS2AQDzT/sWKtcrAUYE62rKOrHQwJwGymBtG4Ev5DaoTUXB V+qr6TFb2bmtaQgUlWhG/yEkoKVH84jBT8zMHxMiJw0iJq5CeDPHYARsS0F5sKJclmxI Sx7ybNnF5S+4d1pyOJvgVTVhNwHwP+IFs3FA0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; b=mmpmhJR8JeuTs8SY3TBkkNCIii+JDgNNIOoXELTyUEodnplWpasj4WBcdjAtQo+mKB QOCAAc2f66TdOOAs251HURwMGHTSInF2aA6zWtOi75URVrkl71NVSNUtBkwfWmAH52Sz v2awLH9L/ymSF7y2AWwKLJt5Qt9Zolks0AEnA= Received: by 10.210.138.6 with SMTP id l6mr4126770ebd.25.1247343972382; Sat, 11 Jul 2009 13:26:12 -0700 (PDT) Received: from viper.internal.network (geeshaulage.lcdsl.co.uk [62.249.247.223]) by mx.google.com with ESMTPS id 24sm1345612ewy.25.2009.07.11.13.26.11 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 11 Jul 2009 13:26:11 -0700 (PDT) Received: by viper.internal.network (Postfix, from userid 11001) id 75C4F4AC2B; Sat, 11 Jul 2009 21:25:53 +0100 (BST) Date: Sat, 11 Jul 2009 21:25:53 +0100 From: xorquewasp@googlemail.com To: Steve Bertrand Message-ID: <20090711202553.GA38156@logik.internal.network> References: <20090711161132.GA74849@logik.internal.network> <4A58E314.4040808@ibctech.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A58E314.4040808@ibctech.ca> Cc: freebsd-questions@freebsd.org Subject: Re: ZFS scrub is finished? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2009 20:26:14 -0000 On 2009-07-11 15:08:04, Steve Bertrand wrote: > xorquewasp@googlemail.com wrote: > > Hello. > > > > I'd like to write a little shell script to run 'zpool scrub' on > > my disks weekly. I have two zpools. The manual page says that only > > one 'scrub' can be active at a time. > > > > Is there any reliable way to run 'zpool scrub X' and then run > > 'zpool scrub Y' when the first has finished? > > Perhaps it is as simple as cron-ing something like the following (of > course, replace "zpool scrub" with my cat commands. > [snipped] Hello. Problem is that 'zpool scrub' immediately returns with a success error code if command line option parsing went OK and the specified pools actually exist. You have to manually check the output of 'zpool status' to see if the scrub executed with no errors (and that may be hours later). xw