From owner-freebsd-fs@FreeBSD.ORG Sun Nov 18 00:26:55 2012 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9B05AD89; Sun, 18 Nov 2012 00:26:55 +0000 (UTC) (envelope-from bartosz.stec@it4pro.pl) Received: from mainframe.kkip.pl (kkip.pl [78.9.102.18]) by mx1.freebsd.org (Postfix) with ESMTP id 3C9978FC0C; Sun, 18 Nov 2012 00:26:54 +0000 (UTC) Received: from 89-69-114-93.dynamic.chello.pl ([89.69.114.93] helo=[192.168.0.100]) by mainframe.kkip.pl with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1TZsij-000I4n-0C; Sun, 18 Nov 2012 01:26:52 +0100 Message-ID: <50A82B3A.6020608@it4pro.pl> Date: Sun, 18 Nov 2012 01:26:34 +0100 From: Bartosz Stec Organization: IT4Pro User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Andriy Gapon Subject: Re: problem booting to multi-vdev root pool [Was: kern/150503: [zfs] ZFS disks are UNAVAIL and corrupted after reboot] References: <509D1DEC.6040505@FreeBSD.org> <50A27243.408@madpilot.net> <50A65F83.5000604@FreeBSD.org> <50A66701.701@madpilot.net> In-Reply-To: <50A66701.701@madpilot.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-User: bartosz.stec@it4pro.pl X-Authenticator: plain X-Sender-Verify: SUCCEEDED (sender exists & accepts mail) X-Spam-Score: -8.1 X-Spam-Score-Int: -80 X-Exim-Version: 4.80.1 (build at 26-Oct-2012 17:04:45) X-Date: 2012-11-18 01:26:52 X-Connected-IP: 89.69.114.93:51865 X-Message-Linecount: 72 X-Body-Linecount: 56 X-Message-Size: 2349 X-Body-Size: 1578 X-Received-Count: 1 X-Recipient-Count: 4 X-Local-Recipient-Count: 4 X-Local-Recipient-Defer-Count: 0 X-Local-Recipient-Fail-Count: 0 Cc: freebsd-fs@FreeBSD.org, freebsd-current@FreeBSD.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Nov 2012 00:26:55 -0000 W dniu 2012-11-16 17:17, Guido Falsi pisze: > On 11/16/12 16:45, Andriy Gapon wrote: >> on 13/11/2012 18:16 Guido Falsi said the following: >>> My idea, but is just a speculation, i could be very wrong, is that >>> the geom >>> tasting code has some problem with multiple vdev root pools. >> >> Guido, >> >> you are absolutely correct. The code for reconstructing/tasting a >> root pool >> configuration is a modified upstream code, so it inherited a >> limitation from it: >> the support for only a single top-level vdev in a root pool. >> I have an idea how to add the missing support, but it turned out not >> to be >> something that I can hack together in couple of hours. > > I can imagine, it does not look simple in any way! > >> >> So, instead I wrote the following patch that should fall back to >> using a root pool >> configuration from zpool.cache (if it's present there) for a >> multi-vdev root pool: >> http://people.freebsd.org/~avg/zfs-spa-multi_vdev_root_fallback.diff >> >> The patch also fixes a minor (single-time) memory leak. >> >> Guido, Bartosz, >> could you please test the patch? > > I have just compiler an r242910 kernel with this patch (and just this > one) applied. > > System booted so it seems to work fine! :) I've just compiled and installed fresh kernel with your patch, system booted without any problems, so apparently patch works as intended. Good job Andriy! > >> >> Apologies for the breakage. >> > > No worries, and thanks for this fix. > > Also thanks for all the work on ZFS! > Make it twice :) Regards, -- Bartosz Stec