From owner-freebsd-current@FreeBSD.ORG Tue Oct 23 20:23:32 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 3890F237 for ; Tue, 23 Oct 2012 20:23:32 +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 7AC188FC08 for ; Tue, 23 Oct 2012 20:23:31 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA16775; Tue, 23 Oct 2012 23:23:28 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1TQl0Z-000H2s-Rz; Tue, 23 Oct 2012 23:23:27 +0300 Message-ID: <5086FCBF.4040902@FreeBSD.org> Date: Tue, 23 Oct 2012 23:23:27 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121013 Thunderbird/16.0.1 MIME-Version: 1.0 To: Michael Schmiedgen Subject: Re: ZFS cache devs UNAVAIL References: <5085CF5E.5020500@gmx.net> <20121023022410.GA66994@over-yonder.net> <508651AF.20400@FreeBSD.org> <5086DA53.6030607@gmx.net> <5086F957.8010801@FreeBSD.org> In-Reply-To: <5086F957.8010801@FreeBSD.org> X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org, "Matthew D. Fuller" 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: Tue, 23 Oct 2012 20:23:32 -0000 on 23/10/2012 23:08 Andriy Gapon said the following: > on 23/10/2012 20:56 Michael Schmiedgen said the following: >> FreeBSD 10.0-CURRENT #0: Tue Oct 23 00:14:32 CEST 2012 >> root@gizeh.smoke:/usr/obj/usr/src/sys/GIZEH amd64 > ... >> vdev_geom_open_by_path:519[1]: guid mismatch for provider /dev/ada0p1: >> 5267967234359339128 != 0. > > Thank you for this valuable information. > > Do you have a rough estimate of when you started to experience this issue? > > Could you please also provide output of the following command captured right > after a reboot and then after you re-add the cache disks? > $ zdb -lll /dev/ada0p > > I still would like to get the above information if possible. But here is a patch that you can try: --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c @@ -270,14 +270,16 @@ vdev_geom_read_config(struct g_consumer *cp, nvlist_t **config) continue; if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_STATE, - &state) != 0 || state >= POOL_STATE_DESTROYED) { + &state) != 0 || state == POOL_STATE_DESTROYED || + state > POOL_STATE_L2CACHE) { nvlist_free(*config); *config = NULL; continue; } - if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_TXG, - &txg) != 0 || txg == 0) { + if (state != POOL_STATE_SPARE && state != POOL_STATE_L2CACHE && + (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_TXG, + &txg) != 0 || txg == 0)) { nvlist_free(*config); *config = NULL; continue; I think that I introduced this bug because I used some old OpenSolaris code as an inspiration and completely missed the new states. -- Andriy Gapon