From owner-freebsd-fs@FreeBSD.ORG Mon Feb 28 18:12:55 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A19C9106566B for ; Mon, 28 Feb 2011 18:12:55 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 48A548FC18 for ; Mon, 28 Feb 2011 18:12:54 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 2FCC645C9C; Mon, 28 Feb 2011 19:12:53 +0100 (CET) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 1016445C8A; Mon, 28 Feb 2011 19:12:47 +0100 (CET) Date: Mon, 28 Feb 2011 19:12:26 +0100 From: Pawel Jakub Dawidek To: Ruslan Yakovlev Message-ID: <20110228181226.GA2288@garage.freebsd.pl> References: <4D6B8618.40205@bk.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fUYQa+Pmc3FrFX/N" Content-Disposition: inline In-Reply-To: <4D6B8618.40205@bk.ru> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-fs@freebsd.org Subject: Re: ZFS, booting trouble X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2011 18:12:55 -0000 --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--