Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Oct 2012 00:15:54 +0200
From:      Michael Schmiedgen <schmiedgen@gmx.net>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org, "Matthew D. Fuller" <fullermd@over-yonder.net>
Subject:   Re: ZFS cache devs UNAVAIL
Message-ID:  <5087171A.9010009@gmx.net>
In-Reply-To: <5086FCBF.4040902@FreeBSD.org>
References:  <5085CF5E.5020500@gmx.net> <20121023022410.GA66994@over-yonder.net> <508651AF.20400@FreeBSD.org> <5086DA53.6030607@gmx.net> <5086F957.8010801@FreeBSD.org> <5086FCBF.4040902@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/23/12 22:23, Andriy Gapon wrote:
> on 23/10/2012 23:08 Andriy Gapon said the following:
>> on 23/10/2012 20:56 Michael Schmiedgen said the following:
>> ...
>>> 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;

This works for me. Thank you very much! :) For zdb data see below,
it has not changed since patch-apply/readd/reboot.

  Michael



# zdb -lll /dev/ada0p1
--------------------------------------------
LABEL 0
--------------------------------------------
    version: 5000
    state: 4
    guid: 13019058935211054376
--------------------------------------------
LABEL 1
--------------------------------------------
    version: 5000
    state: 4
    guid: 13019058935211054376
--------------------------------------------
LABEL 2
--------------------------------------------
    version: 5000
    state: 4
    guid: 13019058935211054376
--------------------------------------------
LABEL 3
--------------------------------------------
    version: 5000
    state: 4
    guid: 13019058935211054376

# zdb -lll /dev/ada1p1
--------------------------------------------
LABEL 0
--------------------------------------------
    version: 5000
    state: 4
    guid: 1347428618237802818
--------------------------------------------
LABEL 1
--------------------------------------------
    version: 5000
    state: 4
    guid: 1347428618237802818
--------------------------------------------
LABEL 2
--------------------------------------------
    version: 5000
    state: 4
    guid: 1347428618237802818
--------------------------------------------
LABEL 3
--------------------------------------------
    version: 5000
    state: 4
    guid: 1347428618237802818




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5087171A.9010009>