From owner-freebsd-fs@FreeBSD.ORG Wed Nov 21 07:51:25 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 BCDC45C5; Wed, 21 Nov 2012 07:51:25 +0000 (UTC) (envelope-from andy.lavr@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id C5FE68FC13; Wed, 21 Nov 2012 07:51:24 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id j13so6475567lah.13 for ; Tue, 20 Nov 2012 23:51:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3vYxNY8Pb5yRjKh6kMV/AJKlm9f9orkguveXpTuKEr4=; b=YycLE6H53Xr/n/Fr8fbXWd9okBjmVW2WStfzPrEHQBpOJAHzhDQzfTEF50JSsgs4zX oTcqUxImimQ5Q1lBsCXvRw/6ldP23Pm/yTd9kUL9ezxhRzt6i8SIfLjRSrF9X2fxzkZC ygzN6vTdyEpNnWsEh43Ag3w0M97fSmeqPF5aOS0aj2wC4m0R7mQ1icBsGCFxt7TG7n2K yf83rFH9gFszdKsDGc1eI9ZEjOA4HkYXAdeokWAeiUZ3PHcBpDrxflq2bMVkGBIbDNSS a5P3OnPFXxKIWmenPJgKgN5W4GZ4yuatP2yYaGwkcYa/2CKMapeA1/2TpTafHaGK/XFM kDBw== MIME-Version: 1.0 Received: by 10.112.88.100 with SMTP id bf4mr621937lbb.49.1353484283468; Tue, 20 Nov 2012 23:51:23 -0800 (PST) Received: by 10.114.5.5 with HTTP; Tue, 20 Nov 2012 23:51:23 -0800 (PST) In-Reply-To: <50ABA91D.9090905@FreeBSD.org> References: <50AB5202.4070906@FreeBSD.org> <50AB71A7.7050101@FreeBSD.org> <50AB80C6.1090507@FreeBSD.org> <50AB8C1F.2040108@FreeBSD.org> <50AB90E9.5070102@FreeBSD.org> <50AB9C5B.6030006@FreeBSD.org> <50ABA91D.9090905@FreeBSD.org> Date: Wed, 21 Nov 2012 09:51:23 +0200 Message-ID: Subject: Re: problem booting to multi-vdev root pool From: Andrei Lavreniyuk To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 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: Wed, 21 Nov 2012 07:51:25 -0000 2012/11/20 Andriy Gapon : > on 20/11/2012 17:06 Andriy Gapon said the following: >> on 20/11/2012 16:59 Andrei Lavreniyuk said the following: >>>>> Sorry to make you jump through so many hoops. >>>>> Now that I see that the probed config is entirely correct, the problem appears to >>>>> be quite obvious: vdev_alloc is not able to properly use spa_version in this >>>>> context because spa_ubsync is not initialized yet. >>>>> >>>>> Let me think about how to fix this. >>>> >>>> I hope that the following simple patch should fix the problem: >>>> http://people.freebsd.org/~avg/spa_import_rootpool.version.diff >>> >>> >>> At mount system trap and reboot. >>> >> >> Unexpected. Can you catch the backtrace of the panic? >> If you have it on the screen. >> >> > > Ah, found another bogosity in the code: > --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c > +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c > @@ -3925,8 +4117,6 @@ spa_import_rootpool(const char *name) > return (error); > } > > - spa_history_log_version(spa, LOG_POOL_IMPORT); > - > spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); > vdev_free(rvd); > spa_config_exit(spa, SCL_ALL, FTAG); > > > This previously "worked" only because the pool version was zero and thus the > action was a NOP anyway. > Problem solved. Raidz pool mount without zpool.cache. # zpool status -v pool: zsolar state: ONLINE scan: resilvered 2,56M in 0h0m with 0 errors on Tue Nov 20 10:26:35 2012 config: NAME STATE READ WRITE CKSUM zsolar ONLINE 0 0 0 raidz2-0 ONLINE 0 0 0 gpt/disk0 ONLINE 0 0 0 gpt/disk2 ONLINE 0 0 0 gpt/disk3 ONLINE 0 0 0 errors: No known data errors # uname -a FreeBSD opensolaris.technica-03.local 10.0-CURRENT FreeBSD 10.0-CURRENT #6 r243278M: Wed Nov 21 09:28:51 EET 2012 root@opensolaris.technica-03.local:/usr/obj/usr/src/sys/SMP64R amd64 Thanks!