Boot environments and zfs canmount=noauto

Allan Jude allanjude at freebsd.org
Thu Jul 28 02:18:50 UTC 2016


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.

In order to do it the way Dexter is proposing, you can set them
canmount=noauto or with mountpoint=legacy, and then mount them via fstab
(defined differently in each BE), but that kind of defeats a lot of the
purpose of ZFS.


-- 
Allan Jude

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20160727/b369f560/attachment.sig>


More information about the freebsd-current mailing list