nullfs(5) can be used to duplicate a subtree of a filesystem name space under another part of the filesystem name space.

To use nullfs in FreeBSD use the corresponding option with the mount command:

mount -t nullfs <source_folder> <destination_folder>

Use nullfs with fstab

To create nullfs mounts with fstab directly during boot the following line can be added to /etc/fstab:

# Device         Mountpoint            FStype  Options    Dump    Pass#
<source_folder>  <destination_folder>  nullfs  rw,late    0       0

The option late is mandatory here to mount the nullfs filesystem after all upstream mounts are finished.

Important option late

The option late in fstab is important and in most cases mandatory when mounting a nullfs filesystem, since it will mount folders that are relying on other filesystem mounts defined via fstab. The dependent nullfs mounts therefore need to be mounted late. Otherwise they will not be available and throw an error.