From owner-freebsd-current@FreeBSD.ORG Mon Jul 11 15:11:54 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 47F221065675 for ; Mon, 11 Jul 2011 15:11:54 +0000 (UTC) (envelope-from mattblists@icritical.com) Received: from mail1.icritical.com (mail1.icritical.com [93.95.13.41]) by mx1.freebsd.org (Postfix) with SMTP id 96C778FC2A for ; Mon, 11 Jul 2011 15:11:53 +0000 (UTC) Received: (qmail 5231 invoked from network); 11 Jul 2011 14:45:10 -0000 Received: from localhost (127.0.0.1) by mail1.icritical.com with SMTP; 11 Jul 2011 14:45:10 -0000 Received: (qmail 5215 invoked by uid 599); 11 Jul 2011 14:45:10 -0000 Received: from unknown (HELO icritical.com) (87.127.43.249) by mail1.icritical.com (qpsmtpd/0.28) with ESMTP; Mon, 11 Jul 2011 15:45:10 +0100 Message-ID: <4E1B0C72.7030109@icritical.com> Date: Mon, 11 Jul 2011 15:45:06 +0100 From: Matt Burke User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110403 Thunderbird/3.1.9 MIME-Version: 1.0 To: Berczi Gabor References: <12DA9EAC-8677-49AD-BA6C-5A155D2A6122@berczi.be> In-Reply-To: <12DA9EAC-8677-49AD-BA6C-5A155D2A6122@berczi.be> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 11 Jul 2011 14:45:06.0453 (UTC) FILETIME=[2004A450:01CC3FD9] X-Virus-Scanned: by iCritical at mail1.icritical.com Cc: freebsd-current@freebsd.org 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: Mon, 11 Jul 2011 15:11:54 -0000 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? The following applies to 8-STABLE from 2011-06-29. I believe -CURRENT may be identical, but don't know for certain. >From 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. 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. 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". 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. (*) http://lists.freebsd.org/pipermail/freebsd-fs/2011-June/011882.html HTH, Matt.