From owner-freebsd-fs@FreeBSD.ORG Mon Sep 9 17:44:58 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 13DBA32D for ; Mon, 9 Sep 2013 17:44:58 +0000 (UTC) (envelope-from nowakpl@platinum.linux.pl) Received: from platinum.linux.pl (platinum.edu.pl [81.161.192.4]) by mx1.freebsd.org (Postfix) with ESMTP id C6B762820 for ; Mon, 9 Sep 2013 17:44:56 +0000 (UTC) Received: by platinum.linux.pl (Postfix, from userid 87) id D35282BC178; Mon, 9 Sep 2013 19:39:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on platinum.linux.pl X-Spam-Level: X-Spam-Status: No, score=-1.3 required=3.0 tests=ALL_TRUSTED,AWL autolearn=disabled version=3.3.2 Received: from [10.255.0.2] (unknown [83.151.38.73]) by platinum.linux.pl (Postfix) with ESMTPA id 9342A2BC0C4 for ; Mon, 9 Sep 2013 19:39:00 +0200 (CEST) Message-ID: <522E07B1.5030205@platinum.linux.pl> Date: Mon, 09 Sep 2013 19:38:57 +0200 From: Adam Nowacki User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: freebsd-fs@freebsd.org Subject: Re: zfs_enable vs zfs_load in loader.conf (but neither works) References: <522D67DB.7060404@infracaninophile.co.uk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2013 17:44:58 -0000 On 2013-09-09 19:15, J David wrote: > On Mon, Sep 9, 2013 at 8:55 AM, krad wrote: >> you will find without 'zfs_enable="YES" ' set a lot of the zfs datasets >> might not get mounted > > Matthew has the same understanding of this that I do: zfs_load goes in > loader.conf and zfs_enable goes in rc.conf. > > zfs_load causes the loader to load zfs.ko and opensolaris.ko so that > the kernel can access the zpool (e.g. to mount the root filesystem) > after /boot/zfsloader finishes. > > zfs_enable in rc.conf activates the /etc/rc.d/zfs and /etc/rc.d/zvol > scripts. (And tweaks mountd on nfs servers.) > > There are several online ZFS-root recipies that say differently > (mainly that using zfs_load has been replaced by zfs_enable in > loader.conf), but I haven't found any authoritative references that > support that. Have you? (Also, it doesn't work in testing; the two > .ko's aren't loaded if zfs_load is not present.) > > In the absence of new info, that seems like the right way to do it. > > Things get sticky when it comes to establishing the ZFS root > filesystem. There are at least four ways to go about it: > > 1) Set vfs.root.mountfrom="zfs:data/root" in loader.conf. > 2) Run "zpool set bootfs=data/root data" on the pool. > 3) Run "zfs set mountpoint=/ data/root" on the root filesystem. > 4) Run "zfs set mountpoint=legacy data/root" on the root filesystem > and an /etc/fstab entry. > > Unfortunately, some of these are not sufficient by themselves, or they > don't work at all. So the question is, for 9.2, which (combination > of?) these is the authoritatively correct way to identify the ZFS root > filesystem? zfs set mountpoint=legacy data/root together with zpool set bootfs=data/root data setting vfs.root.mountfrom is not required - this is handled by the bootfs property, as is listing / in fstab