From owner-freebsd-questions@FreeBSD.ORG Mon Jan 9 01:17:34 2012 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 0EC34106564A for ; Mon, 9 Jan 2012 01:17:34 +0000 (UTC) (envelope-from mokomull@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id 98CB18FC1E for ; Mon, 9 Jan 2012 01:17:33 +0000 (UTC) Received: by wgbdt14 with SMTP id dt14so1030128wgb.1 for ; Sun, 08 Jan 2012 17:17:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=eMj4zueYgiy3Khn2jU/95Wh66fuVVGv+q9tWaD+F4uY=; b=BJH2Zn78U5HhcFrfPTV/jAwMD7P16SMR/ct8vp+3yPvbeZkuduZpdivMzWB1HCTUJq MnPPe0xK6/86tUtmu6a26ohvl1xLZiokdYVtdNLLJ+lZXaCzkOJxv1747yrWmoZATNnK ThycO22VZNW25iGuW1W6+pcs2jV4GFq0fy4XA= MIME-Version: 1.0 Received: by 10.180.101.3 with SMTP id fc3mr1409555wib.22.1326071851040; Sun, 08 Jan 2012 17:17:31 -0800 (PST) Received: by 10.223.156.65 with HTTP; Sun, 8 Jan 2012 17:17:30 -0800 (PST) In-Reply-To: <4F08684C.2070809@mykitchentable.net> References: <4F08684C.2070809@mykitchentable.net> Date: Sun, 8 Jan 2012 17:17:30 -0800 Message-ID: From: Matt Mullins To: Drew Tomlinson Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-questions@freebsd.org Subject: Re: ZFS Root Won't Mount - Unknown Filesystem 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, 09 Jan 2012 01:17:34 -0000 On Sat, Jan 7, 2012 at 7:44 AM, Drew Tomlinson wr= ote: > I'm attempting a new install of 9.0-RC3 amd64. =A0My system has 4 500 GB > drives. =A0Using this tutorial as a guide: > > http://www.aisecure.net/2011/11/28/root-zfs-freebsd9/ When I built my ZFS-root system, I did most of these things, except I had a slightly different setup for the root filesystem itself. What I did is akin to: # zpool import -o altroot=3D/target -o cachefile=3D/tmp/zpool.cache zroot # zfs set mountpoint=3D/ zroot # cp -a /tmp/zpool.cache /target/boot/zfs/zpool.cache I did not manually set mountpoints for anything but the root filesystem. It sounds like manually-set mountpoints are the way most people do it, but you can try to clear the mountpoints by doing: # zfs inherit mountpoint zroot/fs for each filesystem in your root pool. > I created a boot and a freebsd-zfs partition on each drive. =A0Then I cre= ated > a raid1z pool using all 4 drives. =A0I followed the rest of the tutorial > exactly and ensured that I copied the zpool.cache to boot/zfs. > > When I try to boot my new system, it all goes fine up until it's time to > mount zfs:zroot. =A0It fails with an "error 2" "unknown filesystem" error= . =A0I > don't know if this means anything but at the mountfrom prompt, the system > will not accept any keyboard input. =A0Same keyboard works fine when boot= ed > into LiveCD. I had that same problem with mine for a while, and it turned out that importing with the "altroot" option implies "cachefile=3Dnone"; until I realized I needed to also specify "cachefile=3D/some/path", I had accidentally ended up with a /boot/zpool.cache that didn't actually reference any zpools. > Unfortunately because I can't figure out how to get a LiveCD type > environment with sshd running, I can't copy and paste exact error message= s > or command outputs. I was using PXE/NFS booting to install this machine, so unfortunately I can't help you here. > I've searched and the two things that seem to be important are that there= 's > a zpool.cache file and that the zfs partitions are correct. =A0A 'gpart s= how > -l' shows my partitions something close to this: > > 34 =A0 =A0ada0 =A0 =A0GPT (456G) > 34 =A0 =A0128 =A0 =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 null (128K) > 162 =A0 2 =A0 =A0 =A0 disk0 (456G) > > What have I done wrong and what do I need to do to get my zfs:zroot pool > mounted as root? It sounds like you're almost there! My guess is that the cache file is what is missing/incorrect. Reading over some man pages, make sure you don't do a "zpool export" before you copy the cache file; exporting the array removes it from the cache and/or deletes the cache file entirely. If you end up with a LiveCD that lets you copy these things, it might help to see # zpool list -o name,altroot,cachefile # zpool status # zfs list -o name,mountpoint,mounted Hope some of this helps. -- Matt Mullins