From owner-freebsd-current@FreeBSD.ORG Wed Jul 13 06:32:53 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C258106564A for ; Wed, 13 Jul 2011 06:32:53 +0000 (UTC) (envelope-from freebsd@berczi.be) Received: from macsec.hu (cl-23.bud-01.hu.sixxs.net [IPv6:2a01:368:e000:16::2]) by mx1.freebsd.org (Postfix) with ESMTP id 001888FC12 for ; Wed, 13 Jul 2011 06:32:52 +0000 (UTC) Received: from [10.11.0.1] by macsec.hu with esmtp (Exim 4.75 (FreeBSD)) (envelope-from ) id 1Qgt07-000C9K-92 for freebsd-current@freebsd.org; Wed, 13 Jul 2011 08:32:51 +0200 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) From: Berczi Gabor In-Reply-To: <4E1B0C72.7030109@icritical.com> Date: Wed, 13 Jul 2011 08:32:50 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <12DA9EAC-8677-49AD-BA6C-5A155D2A6122@berczi.be> <4E1B0C72.7030109@icritical.com> To: freebsd-current@freebsd.org X-Mailer: Apple Mail (2.1084) Subject: Re: ZFS boot fails with two pools X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2011 06:32:53 -0000 Thanks for the explanation! The patch didn't fix it though (as it probably only works against log = partitions). On Jul 11, 2011, at 4:45 PM, Matt Burke wrote: > On 07/06/11 16:44, Berczi Gabor wrote: >> For some reason FreeBSD can't boot automatically: > ... >> I have two pools, pool2 which is a mirrored zpool, and data being a >> raid-z pool. Note how the default should be "pool2:/boot/zfsloader". = How >> can I fix this? >=20 > The following applies to 8-STABLE from 2011-06-29. I believe -CURRENT = may > be identical, but don't know for certain. >=20 >=20 >> =46rom what I could tell from researching my similar problem (*), you = can > ignore the zpool bootfs property as well as the gpt bootme flag - = they're > not looked at by the boot process, at least not before the stage 3 = loader. >=20 > What happens is gptzfsboot simply tries to boot from the first zfs = pool it > finds. The only control you have is that the first drive it scans is = the > one it boots from. >=20 > If the BIOS booted from the disk with the raid-z pool, or if there is > something like a log partition for your raid-z pool before your boot = pool > on the disk (fixed with my patch), then gptzfsboot will try to load > /boot/zfsloader from the raid-z pool, whether or not it can see enough > vdevs to actually use the pool. If it can't run zfsloader it'll = pointlessly > try /boot/kernel/kernel from it before dumping you at the boot: = prompt. > That is why you see the "Default" showing as it does - it's more "Last > tried" than "Default". >=20 > My advice is to double-check which drive your BIOS is booting from = (make > sure it's one with 'pool2' on it), and if you've got a partition = belonging > to your 'data' pool on the disk (log, cache, etc), you could try = rebuilding > gptzfsboot with my patch providing you're aware that it's untested by > anyone other than myself and by using it you risk causing irreparable > damage to your pools. I hope not seeing as I'm running it myself, but = I've > had no feedback on it. >=20 >=20 > (*) = http://lists.freebsd.org/pipermail/freebsd-fs/2011-June/011882.html >=20 >=20 > HTH, >=20 > Matt. >=20