default zfs layout - FreeBSD 11.0 - /var and /usr not mounted ?!

Matthew Seaman matthew at
Fri Feb 17 08:37:12 UTC 2017

On 17/02/2017 07:17, Rudy wrote:
> I installed a new system and did the default ZFS layout and noticed /var
> and /usr are not mounted by default.  Any reason? Seems like files
> dropped in /usr (eg, usr/local) end up in the ROOT/default.  Maybe I am
> just thinking about ZFS incorrectly...
>> zfs get mounted
> NAME                PROPERTY  VALUE    SOURCE
> zroot               mounted   yes      -
> zroot/ROOT          mounted   no       -
> zroot/ROOT/default  mounted   yes      -
> zroot/data          mounted   yes      -
> zroot/tmp           mounted   yes      -
> zroot/usr           mounted   no       -
> zroot/usr/home      mounted   yes      -
> zroot/usr/ports     mounted   yes      -
> zroot/usr/src       mounted   yes      -
> zroot/var           mounted   no       -
> zroot/var/audit     mounted   yes      -
> zroot/var/crash     mounted   yes      -
> zroot/var/log       mounted   yes      -
> zroot/var/mail      mounted   yes      -
> zroot/var/tmp       mounted   yes      -
> Seems like /usr/local would be a handy mount point as well...
> Also, i intend to use this box for jails and feel like all the
> filesystems below /zroot/var don't make much sense.  What layout are you
> using for as a jail host?
> I'm thinking of blowing away all the mount points below var and just
> having one /var with noatime, noexec, nosuid, compression.  Bad idea?

This is deliberate and a design feature intended for use with boot

The zroot/usr and zroot/var ZFSes exist solely to create the hierarchy
that allows eg. zroot/usr/ports to be mounted as an independent ZFS.
The actual /var on your system is part of the zroot/ROOT/default ZFS ---
that's one big ZFS that contains all the parts of your system that would
be affected by an upgrade.  Stuff like /var/log or /usr/ports uses this
mechanism so they can be outside the boot environment (ie. so they will
be mounted unchanged after a system upgrade) but still appear in the
standard places in your filesystem.

In some ways this is working around historical baggage -- the standard
layout of a unix filesystem was developed way before ZFS was invented,
and if we were starting from scratch now, we'd probably come up with
something different.  There's basically no chance that anyone will
support rearranging the layout nowadays though.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the freebsd-questions mailing list