From owner-freebsd-current@FreeBSD.ORG Sat Sep 26 11:49:34 2009 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 30D61106568B for ; Sat, 26 Sep 2009 11:49:34 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from koef.zs64.net (koef.zs64.net [212.12.50.230]) by mx1.freebsd.org (Postfix) with ESMTP id C215E8FC21 for ; Sat, 26 Sep 2009 11:49:33 +0000 (UTC) Received: from localhost by koef.zs64.net (8.14.3/8.14.3) with ESMTP id n8QBnVRJ028375 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 26 Sep 2009 13:49:32 +0200 (CEST) (envelope-from stb@lassitu.de) (authenticated as stb) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Stefan Bethke In-Reply-To: <290F8258-F9F7-42C8-83EB-88266B2992E4@rabson.org> Date: Sat, 26 Sep 2009 13:49:31 +0200 Content-Transfer-Encoding: 7bit Message-Id: <781F1E7A-1365-43B0-A899-44B3039DD68F@lassitu.de> References: <20090925154125.GD48707@roberto-al.eurocontrol.fr> <290F8258-F9F7-42C8-83EB-88266B2992E4@rabson.org> To: Doug Rabson X-Mailer: Apple Mail (2.1076) Cc: FreeBSD current , Artem Belevich Subject: Re: Booting off raidz *mostly* work 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: Sat, 26 Sep 2009 11:49:34 -0000 Am 26.09.2009 um 09:21 schrieb Doug Rabson: > On 25 Sep 2009, at 22:49, Artem Belevich wrote: > >> Our bootloader implementation does not know how to read gang blocks. >> Compare the code from OpenSolaris' variant of grub with what we have >> and find the differences: >> >> Search for zio_read_data here: >> http://bitbucket.org/osunix/osunix-gate/src/1cca4617b3a8/usr/src/grub/grub-0.97/stage2/fsys_zfs.c >> >> And compare with our zio_read here: >> http://fxr.watson.org/fxr/source/boot/zfs/zfsimpl.c?im=excerpts#L900 >> >> We seem to be missing gang block check. That would explain why >> zfsboot >> works only sometimes. If all the files are written using regular >> blocks, then we're OK. However, some time later (i.e. during upgrade >> or after an edit), some data can end up written to disk in a gang >> block and that would make zfsboot choke. > > This sounds plausible - I never managed to see a gang block while I > was working on this. I'm afraid something else is wrong. I added if (DVA_GET_GANG(dva)) to zio_read, with a printf and return(EIO). Booting results in "no block copies available", but my code addition does not seem to be triggered. This is with a freshly created zpool, set up with make installworld. Stefan -- Stefan Bethke Fon +49 151 14070811