ZFS, booting trouble

Pawel Jakub Dawidek pjd at FreeBSD.org
Mon Feb 28 18:12:55 UTC 2011


On Mon, Feb 28, 2011 at 01:25:12PM +0200, Ruslan Yakovlev wrote:
> Hi
> 
> I install 8.2-RELEASE root on ZFS with GPT and all works fine if I don't 
> use zpool export.
> FreeBSD can't boot if bootable pool exported (when we unmount zfs after 
> installation finished or when we connect disk to other machine for data 
> copy):
> gptzfsboot: No ZFS pools located, can't boot
> 
> Now it can be fixed (zpool imported) only from other machine/OS/boot device.
> 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
===================================================================
--- sys/boot/zfs/zfsimpl.c	(wersja 218013)
+++ sys/boot/zfs/zfsimpl.c	(kopia robocza)
@@ -814,17 +814,8 @@
 		return (EIO);
 	}
 
-#ifndef TEST
-	if (val != 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 == POOL_STATE_DESTROYED)
 		return (EIO);
-	}
-#endif
 
 	if (nvlist_find(nvlist,
 			ZPOOL_CONFIG_POOL_TXG,

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

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://yomoli.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20110228/c6cc1346/attachment.pgp


More information about the freebsd-fs mailing list