Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jul 2016 13:34:03 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Allan Jude <allanjude@FreeBSD.org>, freebsd-current@FreeBSD.org, rwestlun@gmail.com
Subject:   Re: Boot environments and zfs canmount=noauto
Message-ID:  <5e49ab87-65ff-fe20-1e50-387e3484cc47@FreeBSD.org>
In-Reply-To: <da84ccae-6a71-6338-3a5b-b39a8dc25007@freebsd.org>
References:  <20160728020548.GD26793@gmail.com> <da84ccae-6a71-6338-3a5b-b39a8dc25007@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5e49ab87-65ff-fe20-1e50-387e3484cc47>