From owner-freebsd-current@freebsd.org Thu Jul 28 10:34:50 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5214BA769D for ; Thu, 28 Jul 2016 10:34:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id BEA5E1A5B; Thu, 28 Jul 2016 10:34:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA22994; Thu, 28 Jul 2016 13:34:41 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1bSieH-000EZz-2H; Thu, 28 Jul 2016 13:34:41 +0300 Subject: Re: Boot environments and zfs canmount=noauto To: Allan Jude , freebsd-current@FreeBSD.org, rwestlun@gmail.com References: <20160728020548.GD26793@gmail.com> From: Andriy Gapon Message-ID: <5e49ab87-65ff-fe20-1e50-387e3484cc47@FreeBSD.org> Date: Thu, 28 Jul 2016 13:34:03 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 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: Thu, 28 Jul 2016 10:34:50 -0000 On 28/07/2016 05:18, Allan Jude wrote: > On 2016-07-27 22:05, Randy Westlund wrote: >> I'm trying to follow Michael Dexter's post about using bhyve with boot >> environments. It involves moving all child datasets under >> zroot/ROOT/default, so that you can have entirely independent systems. >> >> http://callfortesting.org/bhyve-boot-environments/ >> >>> Let's change the datasets with "canmount on" to "canmount noauto": >>> [snip] >>> Considering that this setting is harmless to a system with a single >>> boot environment, I would not object to it being the default. Hint >>> hint. >> >> When I set all the datasets with canmount=on to canmount=noauto, only >> zroot/ROOT/default gets mounted on next boot. It's my understanding >> that 'zfs mount -a' doesn't mount datasets with canmount=noauto, but if >> I leave them with canmount=on, they will try to mount regardless of >> which BE is active. >> >> I'm trying this with 11.0-BETA2. Can sometime tell me what I'm missing? >> > > You are not missing anything. This is why the default is to have all > files that are specific to a BE be in the root dataset, and only files > that are global (like home directory, etc) be outside of the BE. Locally I have the following rc script to handle subordinate datasets of a boot environment: http://dpaste.com/0Q0JPGN.txt It is designed for exactly the scenario described above. The script is automatically enabled when zfs_enable is enabled. It would probably make sense to include the script into the OS after some testing and a review. -- Andriy Gapon