From owner-freebsd-fs@FreeBSD.ORG Thu Apr 26 20:52:11 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0CD8716A401; Thu, 26 Apr 2007 20:52:11 +0000 (UTC) (envelope-from bp@barryp.org) Received: from eden.barryp.org (host-42-60-230-24.midco.net [24.230.60.42]) by mx1.freebsd.org (Postfix) with ESMTP id D62BE13C459; Thu, 26 Apr 2007 20:52:10 +0000 (UTC) (envelope-from bp@barryp.org) Received: from geo.med.und.nodak.edu ([134.129.166.11]) by eden.barryp.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1HhAwk-000CNQ-3m; Thu, 26 Apr 2007 15:52:10 -0500 Message-ID: <463110F5.1090102@barryp.org> Date: Thu, 26 Apr 2007 15:52:05 -0500 From: Barry Pederson User-Agent: Thunderbird 1.5.0.10 (X11/20070221) MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <462F65DB.5010305@barryp.org> <20070426170824.GO41670@garage.freebsd.pl> In-Reply-To: <20070426170824.GO41670@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org Subject: Re: ZFS: inherited mountpoints with root filesystem X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2007 20:52:11 -0000 Pawel Jakub Dawidek wrote: > On Wed, Apr 25, 2007 at 09:29:47AM -0500, Barry Pederson wrote: >> Is this double-mountpoint setup the way things should be? If so, is/can there be an option to have the ZFS-mountpoint for a root-mounted filesystem also be "/", so that >> inherited mountpoints for sub-filesystems are under "/" instead of "/"? > > For file systems that are mounted not via 'zfs mount -a' (eg. they are > mounted by hand or via /etc/fstab), you should set mountpoint property > to 'legacy'. So you're saying that if you're doing vfs.root.mountfrom="zfs:tank" in loader.conf, then tank's mountpoint should be "legacy"? I'm trying that now, but the drawback there is that the sub-filesystems like "tank/home" also inherit that "legacy" mountpoint, so they have to be manually listed in /etc/fstab. That seems to carry on down to sub-sub filesystems like "tank/home/bob" and so on. So you lose out on the nice auto-mounting feature in ZFS. I was hoping that booting with vfs.root.mountfrom="zfs:tank" would be equivalent to something like: zpool import -R / I wonder now if it wouldn't have been better to have created the pool as an Alternate Root Pool in the first place. Is there a way to change an existing pool's mountpoint to '/' like an Alternate Root pool? A simple "zfs set mountpoint=/" doesn't fly because it wants to unmount root to do it. I'd kind of need to change it, but not have it take effect immediately. Barry