From owner-freebsd-current@FreeBSD.ORG Fri Nov 9 23:48:49 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A99116A418 for ; Fri, 9 Nov 2007 23:48:49 +0000 (UTC) (envelope-from erik@cepheid.org) Received: from mail.cepheid.org (aleph.cepheid.org [72.232.60.94]) by mx1.freebsd.org (Postfix) with ESMTP id 2A05013C4A7 for ; Fri, 9 Nov 2007 23:48:48 +0000 (UTC) (envelope-from erik@cepheid.org) Received: by mail.cepheid.org (Postfix, from userid 1006) id 421A29B40A8; Fri, 9 Nov 2007 17:51:14 -0600 (CST) Date: Fri, 9 Nov 2007 17:51:14 -0600 From: Erik Osterholm To: Henri Hennebert Message-ID: <20071109235114.GA74197@aleph.cepheid.org> Mail-Followup-To: Erik Osterholm , Henri Hennebert , Richard Arends , freebsd-current@freebsd.org, freebsd-stable@freebsd.org References: <47348CAC.5020208@restart.be> <20071109182355.GB13845@shell.unixguru.nl> <4734C4AF.9020609@restart.be> <20071109204830.GC13845@shell.unixguru.nl> <4734DF0B.7040300@restart.be> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4734DF0B.7040300@restart.be> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@freebsd.org, freebsd-stable@freebsd.org, Richard Arends Subject: Re: ZFS deadlock ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2007 23:48:49 -0000 On Fri, Nov 09, 2007 at 11:28:27PM +0100, Henri Hennebert wrote: > Richard Arends wrote: > >On Fri, Nov 09, 2007 at 09:35:59PM +0100, Henri Hennebert wrote: > > > >>>This won't start the scrubs at the same time, but after each other. And > >>>the second will only start if the first one not fails (exitcode == 0) > >>> > >>Not at all, the scrub is asynchronious, I'm sure of it > > > >Running 2 commands seperated by && will not run at the same time. Scrub > >could be asynchronious, i don't know, but that has nothing to do with the > >way you are running it. > > > >See: echo "sleep 1" && time sleep 2 && echo "sleep 2" && time sleep 2 > >and: ls -l /notfound && echo yes > > Per the man page, zpool scrub *begin* a scrub witch go on in background, > so two scrubs are running simustaneously on 2 different pools. > > Henri Henri is 100% correct. zpool scrub kicks off a scrub which occurs in the background. I'm not sure I like this behavior that much, but it's not like it's my call :) lothos# zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT tank 1.81T 368G 1.45T 19% ONLINE - lothos# time sh -c "zpool scrub tank && echo Done\?" Done? 0.000u 0.010s 0:04.35 0.2% 116+152k 14+0io 8pf+0w lothos# zpool status tank pool: tank state: ONLINE scrub: scrub in progress, 3.97% done, 0h40m to go config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 raidz1 ONLINE 0 0 0 ad4 ONLINE 0 0 0 ad5 ONLINE 0 0 0 ad6 ONLINE 0 0 0 ad7 ONLINE 0 0 0 errors: No known data errors Erik