Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Nov 2012 18:00:29 +0200
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Andrei Lavreniyuk <andy.lavr@gmail.com>
Cc:        freebsd-fs@FreeBSD.org, freebsd-current@FreeBSD.org
Subject:   Re: problem booting to multi-vdev root pool
Message-ID:  <50ABA91D.9090905@FreeBSD.org>
In-Reply-To: <50AB9C5B.6030006@FreeBSD.org>
References:  <CAGMwN0w=2c3v3UhxD65brukA%2BgbvF1a76WnqtfSv94u7VwR1Jg@mail.gmail.com> <50AB5202.4070906@FreeBSD.org> <CAGMwN0waaykfqvjE4Ua8J9zFLT=bDKJBFz1YKFEe2D9HJLMzpg@mail.gmail.com> <50AB71A7.7050101@FreeBSD.org> <CAGMwN0wPtcO_YzEkbx7WyQfE0juUhouX27h-qmZ39EhU9tgu6A@mail.gmail.com> <50AB80C6.1090507@FreeBSD.org> <CAGMwN0xhLVjuHMP_o4N%2BD4CRUoQTuj0cy6HZFOrun8K8medMXQ@mail.gmail.com> <50AB8C1F.2040108@FreeBSD.org> <50AB90E9.5070102@FreeBSD.org> <CAGMwN0zH0E9Shi3zDKdYU2Wywm_dTJmeh8rttr8KOVJAN_EwBw@mail.gmail.com> <50AB9C5B.6030006@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50ABA91D.9090905>