# mounting /usr/local  zfs filesystem on a / ufs filesystem



## Alain De Vos (Aug 30, 2020)

I think I'm doing a few thing wrong.
What I do works but is very ugly.
In rc.local I have :

```
zfs mount -a
ldconfig -v -m -R /usr/local/lib
service unbound onestop
service unbound onestart
```

The zfs mount is needed otherwise the files in /usr/local are not visible.
For a strange reason the linker is unable to find /usr/local/lib so i need to inform it explicitly. 
Unbound is dynamically linked so I need to start it manually.

Is there a more "beautifull" way, e.g. placing zfs,zpool stuff in rc.conf


----------



## rootbert (Aug 30, 2020)

"zfs set mountpoint=/usr/local pool/dataset" to set the mountpoint - /usr/local should be empty. In rc.conf put zfs_enable="YES" so it should automatically be mounted on startup, in /boot/loader.conf: zfs_load="YES" (with the "standard" zfs, openzfs_load="YES" if you use the current openzfs implementation from ports which will be merged into FreeBSD13 - it supports ZFS encryption)


----------



## Alain De Vos (Aug 30, 2020)

I try, 
zfs_enable="YES"


----------

