From owner-freebsd-questions@FreeBSD.ORG Mon Apr 28 12:22:18 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B51CD1065676 for ; Mon, 28 Apr 2008 12:22:18 +0000 (UTC) (envelope-from jessy@sicha.net) Received: from msg.ecetra.com (swamp.ecetra.com [193.164.224.245]) by mx1.freebsd.org (Postfix) with ESMTP id 549A68FC19 for ; Mon, 28 Apr 2008 12:22:17 +0000 (UTC) (envelope-from jessy@sicha.net) Received: from vie-rje.office.ecetra.com (vie-rje.office.ecetra.com [10.251.148.179]) by msg.ecetra.com (8.13.6/8.13.6) with ESMTP id m3SCMFdS025211; Mon, 28 Apr 2008 14:22:15 +0200 Message-ID: <4815C177.8000208@sicha.net> Date: Mon, 28 Apr 2008 14:22:15 +0200 From: Robert Jesacher User-Agent: Thunderbird 2.0.0.12 (X11/20080311) MIME-Version: 1.0 To: Guus Houtzager References: In-Reply-To: X-Enigmail-Version: 0.95.1 OpenPGP: id=1932FF4D Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: ZFS + gmirror: how? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2008 12:22:18 -0000 On 27/04/2008 20:44 Guus Houtzager wrote: > Hi, > > I'm rather new to FreeBSD and I'm having trouble with ZFS and gmirror. > I've used this guide to install FreeBSD 7 on ZFS: > http://www.ish.com.au/solutions/articles/freebsdzfs > This goes flawless, however, the /bootdir is still just /dev/ad01sa (in > my case), so if that disk breaks, I still can't boot from ad1. So I > thought I could just make a gmirror containing /dev/ad0s1a and ad1s1a > and use that for /bootdir. This however does not work. > What I did is: > - gmirror load > - gmirror label -v -b round-robin gm0 /dev/ad1s1a > - newfs /dev/mirror/gm0 > - mount /dev/mirror/gm0 /mnt/tmp > - dump -L -0 -f- /bootdir | (cd /mnt/tmp && restore -r -v -f-) > - edit /etc/fstab and /mnt/root/etc/fstab: change all references to > ad0s1a by /dev/mirror/gm0 > - echo 'geom_mirror_load="YES"' >> /boot/loader.conf > - echo 'geom_mirror_load="YES"' >> /mnt/tmp/boot/loader.conf > - reboot > However: I can see the bootprocess starting first ZFS followed by a > message saying it's waiting for GEOM gmirror to start, which it does > after a little while and then I get a prompt where I can manually tell > the system where the root filesystem is. And if I tell it > zfs:system/root it does not work (my zpool is named system). > Anyone know what I'm doing wrong and what's the best way to do this? > Thanks in advance! > > PS: please CC me in any reply, as I'm not subscribed to this list. Thanks! > > Regards, I'm not sure if this is the cause, but it looks like /boot/zfs/zpool.cache might not be up to date or missing. Once I had the same issue. You should boot up somehow (you can even use the 7.0 install CD). Make sure you have the directory /boot/zfs and do a "zpool import". After this you should have a valid zpool.cache file which you need to copy to your mirror device. PLMK if this works for you as this is also my desired setup. I "only" need to make the gmirror step tough ;-) br, Robert