Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Feb 2011 19:12:26 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Ruslan Yakovlev <quazi@bk.ru>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: ZFS, booting trouble
Message-ID:  <20110228181226.GA2288@garage.freebsd.pl>
In-Reply-To: <4D6B8618.40205@bk.ru>
References:  <4D6B8618.40205@bk.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

--fUYQa+Pmc3FrFX/N
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Feb 28, 2011 at 01:25:12PM +0200, Ruslan Yakovlev wrote:
> Hi
>=20
> I install 8.2-RELEASE root on ZFS with GPT and all works fine if I don't=
=20
> use zpool export.
> FreeBSD can't boot if bootable pool exported (when we unmount zfs after=
=20
> installation finished or when we connect disk to other machine for data=
=20
> copy):
> gptzfsboot: No ZFS pools located, can't boot
>=20
> Now it can be fixed (zpool imported) only from other machine/OS/boot devi=
ce.
> Can bootable pool will be protected from full export?

In the recent ZFSv28 import I changed that. Now only destroyed pools are
skipped, so you can boot off of exported pool.
If you want to do it now in FreeBSD 8.x try this patch:

Index: sys/boot/zfs/zfsimpl.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- sys/boot/zfs/zfsimpl.c	(wersja 218013)
+++ sys/boot/zfs/zfsimpl.c	(kopia robocza)
@@ -814,17 +814,8 @@
 		return (EIO);
 	}
=20
-#ifndef TEST
-	if (val !=3D POOL_STATE_ACTIVE) {
-		/*
-		 * Don't print a message here. If we happen to reboot
-		 * while where is an exported pool around, we don't
-		 * need a cascade of confusing messages during boot.
-		 */
-		/*printf("ZFS: pool is not active\n");*/
+	if (val =3D=3D POOL_STATE_DESTROYED)
 		return (EIO);
-	}
-#endif
=20
 	if (nvlist_find(nvlist,
 			ZPOOL_CONFIG_POOL_TXG,

You need to recompile gptzfsboot and install it with gpart(8).

--=20
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://yomoli.com

--fUYQa+Pmc3FrFX/N
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAk1r5YoACgkQForvXbEpPzQzdgCfZpNPZTAxYFxz+lussbi0FLlR
atEAoJd+W5dgNnYn5nlZ5J8O2eZloodK
=4kOT
-----END PGP SIGNATURE-----

--fUYQa+Pmc3FrFX/N--



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