Skip to content

Instantly share code, notes, and snippets.

@dmilith
Created June 17, 2022 17:58
Show Gist options
  • Save dmilith/03d483314fcd432e2ab7de383d8cd660 to your computer and use it in GitHub Desktop.
Save dmilith/03d483314fcd432e2ab7de383d8cd660 to your computer and use it in GitHub Desktop.
NFSv4 server on FreeBSD 13.1 and the macOS 12.4 client setup
zfs set sharenfs="-alldirs" MyZFSPoolName
zfs share -a
service rpcbind start
service statd start
service lockd start
service nfsuserd start
service nfscbd start
service nfsd start
myhostname.home:/MySharedDataset /my/desired/mountpoint nfs rw,noatime,async,hard,vers=4,nfc,rsize=2097152,wsize=2097152,dsize=131072 0 0
# NFSv4 configuration
hostid_enable="YES"
nfscbd_enable="YES"
rpcbind_enable="YES"
nfs_server_enable="YES"
nfsv4_server_only="YES"
nfsv4_server_enable="YES"
nfsuserd_enable="YES"
mountd_enable="YES"
mountd_flags="-r"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"
My hardware:
arm64 RockPro64, 4G RAM
hdd: WD Gold 10TiBs (x1 for now)
network connection: 1Gbit
Result?
50MiBs per second of both upload and download
enough for my use cases :)
enjoy!
vfs.nfsd.async=1
vfs.nfsd.fha.max_reqs_per_nfsd=2
# this one is weird, setting it to 4 causes the setup to stop working…
vfs.nfsd.server_min_nfsvers=3
net.inet.raw.maxdgram=32768
net.inet.raw.recvspace=131070
net.inet.tcp.sendspace=131070
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment