From owner-freebsd-current@FreeBSD.ORG Fri Nov 16 15:45:28 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2FC9EA0B; Fri, 16 Nov 2012 15:45:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 2CDE98FC1A; Fri, 16 Nov 2012 15:45:26 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA17441; Fri, 16 Nov 2012 17:45:08 +0200 (EET) (envelope-from avg@FreeBSD.org) Message-ID: <50A65F83.5000604@FreeBSD.org> Date: Fri, 16 Nov 2012 17:45:07 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121029 Thunderbird/16.0.2 MIME-Version: 1.0 To: Guido Falsi , Bartosz Stec Subject: 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> In-Reply-To: <50A27243.408@madpilot.net> X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org, freebsd-current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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, 16 Nov 2012 15:45:28 -0000 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. 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? Apologies for the breakage. -- Andriy Gapon